public static function deleteGeographytype($obj_mainpacket)
 {
     $packet = $obj_mainpacket->packet;
     $GeogrophyTypeId = $packet[0];
     $msg = "failed";
     $result = 0;
     $result_GeogrophyTypeId = 0;
     $retResult = BL_manageGeographytype::getGeographytypeListByGeogrophyTypeId($GeogrophyTypeId);
     if ($retResult->type == 1) {
         $obj_Geographytype = $retResult->data[0];
         $obj_result2 = DAL_manageGeographytype::deleteGeographytype($obj_Geographytype->GeogrophyTypeId);
         if ($obj_result2->type == 1) {
             $result = 1;
             $result_GeogrophyTypeId = $obj_Geographytype->GeogrophyTypeId;
             $msg = "success";
         } else {
             $msg = "Sorry!!! Problem occured while deleting this Geographytype";
         }
     } else {
         $msg = "Sorry!!! The Geographytype you are tring to delete is not found";
     }
     $obj_mainpacket->returnValues = array($result, $obj_Geographytype->GeogrophyTypeId, $msg);
     $obj_mainpacket->main_setPacket();
 }
function getGeographytypeByGeogrophyTypeId($sessionkey, $appcode, $id)
{
    $main_result = "<VPROFILERESULT>";
    $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>";
    $userId = ValidateSession($sessionkey, $appcode);
    if ($userId > -1) {
        $main_result .= "<AUTHSTATUS>1</AUTHSTATUS>";
        $result = BL_manageGeographytype::getGeographytypeListByGeogrophyTypeId($id);
        if ($result->type == 1) {
            $arr_GeographytypeList = $result->data;
            if (count($arr_GeographytypeList) > 0) {
                $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>";
                foreach ($arr_GeographytypeList as $obj_Geographytype) {
                    $main_result .= getGeographytypeXml($obj_Geographytype);
                }
            } else {
                $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
            }
        } else {
            $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
        }
    }
    $main_result .= "</VPROFILERESULT>";
    return $main_result;
}