public static function deleteSocierytype($obj_mainpacket)
 {
     $packet = $obj_mainpacket->packet;
     $SocieryTypeId = $packet[0];
     $msg = "failed";
     $result = 0;
     $result_SocieryTypeId = 0;
     $retResult = BL_manageSocierytype::getSocierytypeListBySocieryTypeId($SocieryTypeId);
     if ($retResult->type == 1) {
         $obj_Socierytype = $retResult->data[0];
         $obj_result2 = DAL_manageSocierytype::deleteSocierytype($obj_Socierytype->SocieryTypeId);
         if ($obj_result2->type == 1) {
             $result = 1;
             $result_SocieryTypeId = $obj_Socierytype->SocieryTypeId;
             $msg = "success";
         } else {
             $msg = "Sorry!!! Problem occured while deleting this Socierytype";
         }
     } else {
         $msg = "Sorry!!! The Socierytype you are tring to delete is not found";
     }
     $obj_mainpacket->returnValues = array($result, $obj_Socierytype->SocieryTypeId, $msg);
     $obj_mainpacket->main_setPacket();
 }
function getSocierytypeBySocieryTypeId($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_manageSocierytype::getSocierytypeListBySocieryTypeId($id);
        if ($result->type == 1) {
            $arr_SocierytypeList = $result->data;
            if (count($arr_SocierytypeList) > 0) {
                $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>";
                foreach ($arr_SocierytypeList as $obj_Socierytype) {
                    $main_result .= getSocierytypeXml($obj_Socierytype);
                }
            } else {
                $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
            }
        } else {
            $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
        }
    }
    $main_result .= "</VPROFILERESULT>";
    return $main_result;
}