function addGroupmissiontype($sessionkey, $appcode, $Groupmissiontypedata) { $main_result = "<VPROFILERESULT>"; $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>"; $userId = ValidateSession($sessionkey, $appcode); if ($userId > -1) { $main_result = "<AUTHSTATUS>1</AUTHSTATUS>"; $obj_Groupmissiontype = new Groupmissiontype(); foreach ($Userdata["[UPPERTEMPLATENAME"] as $key => $child) { switch ($key) { case "GROUPMISSIONTYPEID": $obj_Groupmissiontype->GroupMissionTypeId = $child; break; case "GROUPMISSIONTYPENAME": $obj_Groupmissiontype->GroupMissionTypeName = $child; break; case "DESCRIPTION": $obj_Groupmissiontype->Description = $child; break; } } $obj_retResult_Groupmissiontype = DAL_manageGroupmissiontype::addGroupmissiontype($obj_Groupmissiontype); if ($obj_retResult_Groupmissiontype->type == 1) { $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>"; $main_result .= getGroupmissiontypeXml($obj_retResult_Groupmissiontype->data); } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } $main_result .= "</VPROFILERESULT>"; return $main_result; }
public static function addGroupmissiontype2($GroupMissionTypeId, $GroupMissionTypeName, $Description) { $obj_retResult = new returnResult(); $obj_newGroupmissiontype = new Groupmissiontype(); $obj_newuser->setGroupmissiontype($GroupMissionTypeId, $GroupMissionTypeName, $Description); // $isExist = BL_manageGroupmissiontype::isExist($obj_newGroupmissiontype->id); if (!$isExist) { $obj_retResult_Groupmissiontype = DAL_manageGroupmissiontype::addGroupmissiontype($obj_newGroupmissiontype); if ($obj_retResult_Groupmissiontype->type == 1) { $obj_retResult->type = 1; $obj_retResult->msg = "Success"; $obj_retResult->data = $obj_retResult_Groupmissiontype->data; } else { $obj_retResult->type = 0; $obj_retResult->msg = "Failed"; } } else { $obj_retResult->type = 0; $obj_retResult->msg = "Sorry! Groupmissiontype already exist"; } return $obj_retResult; }