function updateGeographytype($sessionkey, $appcode, $Geographytypedata)
{
    $main_result = "<VPROFILERESULT>";
    $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>";
    $userId = ValidateSession($sessionkey, $appcode);
    if ($userId > -1) {
        $main_result = "<AUTHSTATUS>1</AUTHSTATUS>";
        $obj_Geographytype = new Geographytype();
        foreach ($Userdata["[UPPERTEMPLATENAME"] as $key => $child) {
            switch ($key) {
                case "GEOGROPHYTYPEID":
                    $obj_Geographytype->GeogrophyTypeId = $child;
                    break;
                case "NAME":
                    $obj_Geographytype->Name = $child;
                    break;
                case "DESCRIPTION":
                    $obj_Geographytype->Description = $child;
                    break;
            }
        }
        $obj_retResult_Geographytype = DAL_manageGeographytype::updateGeographytype($obj_Geographytype);
        if ($obj_retResult_Geographytype->type == 1) {
            $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>";
            $main_result .= getGeographytypeXml($obj_retResult_Geographytype->data);
        } else {
            $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
        }
    }
    $main_result .= "</VPROFILERESULT>";
    return $main_result;
}
 public static function updateGeographytype2($GeogrophyTypeId, $Name, $Description)
 {
     $obj_retResult = new returnResult();
     $obj_newGeographytype = new Geographytype();
     $obj_newGeographytype->GeogrophyTypeId = $GeogrophyTypeId;
     $obj_newGeographytype->Name = $Name;
     $obj_newGeographytype->Description = $Description;
     $issuccess = DAL_manageGeographytype::updateGeographytype($obj_newGeographytype);
     if ($issuccess) {
         $obj_retResult->type = 1;
         //	$obj_retResult->data = BL_manageGeographytype::getGeographytypeByGeogrophyTypeId($obj_newGeographytype->GeogrophyTypeId);
         $obj_retResult->msg = "Geographytype updation is Success";
     } else {
         $obj_retResult->type = 0;
         $obj_retResult->msg = "Geographytype updation is Failed";
     }
     return $obj_retResult;
 }