public static function deleteOrganization_subtype($obj_mainpacket) { $packet = $obj_mainpacket->packet; $OrganizationSubTypeId = $packet[0]; $msg = "failed"; $result = 0; $result_OrganizationSubTypeId = 0; $retResult = BL_manageOrganization_subtype::getOrganization_subtypeListByOrganizationSubTypeId($OrganizationSubTypeId); if ($retResult->type == 1) { $obj_Organization_subtype = $retResult->data[0]; $obj_result2 = DAL_manageOrganization_subtype::deleteOrganization_subtype($obj_Organization_subtype->OrganizationSubTypeId); if ($obj_result2->type == 1) { $result = 1; $result_OrganizationSubTypeId = $obj_Organization_subtype->OrganizationSubTypeId; $msg = "success"; } else { $msg = "Sorry!!! Problem occured while deleting this Organization_subtype"; } } else { $msg = "Sorry!!! The Organization_subtype you are tring to delete is not found"; } $obj_mainpacket->returnValues = array($result, $obj_Organization_subtype->OrganizationSubTypeId, $msg); $obj_mainpacket->main_setPacket(); }
function getOrganization_subtypeByOrganizationSubTypeId($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_manageOrganization_subtype::getOrganization_subtypeListByOrganizationSubTypeId($id); if ($result->type == 1) { $arr_Organization_subtypeList = $result->data; if (count($arr_Organization_subtypeList) > 0) { $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>"; foreach ($arr_Organization_subtypeList as $obj_Organization_subtype) { $main_result .= getOrganization_subtypeXml($obj_Organization_subtype); } } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } $main_result .= "</VPROFILERESULT>"; return $main_result; }