Ejemplo n.º 1
0
function updateService($sessionkey, $appcode, $Servicedata)
{
    $main_result = "<VPROFILERESULT>";
    $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>";
    $userId = ValidateSession($sessionkey, $appcode);
    if ($userId > -1) {
        $main_result = "<AUTHSTATUS>1</AUTHSTATUS>";
        $obj_Service = new Service();
        foreach ($Userdata["[UPPERTEMPLATENAME"] as $key => $child) {
            switch ($key) {
                case "SERVICEID":
                    $obj_Service->ServiceId = $child;
                    break;
                case "SERVICENAME":
                    $obj_Service->ServiceName = $child;
                    break;
                case "DESCRIPTION":
                    $obj_Service->Description = $child;
                    break;
            }
        }
        $obj_retResult_Service = DAL_manageService::updateService($obj_Service);
        if ($obj_retResult_Service->type == 1) {
            $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>";
            $main_result .= getServiceXml($obj_retResult_Service->data);
        } else {
            $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>";
        }
    }
    $main_result .= "</VPROFILERESULT>";
    return $main_result;
}
Ejemplo n.º 2
0
 public static function updateService2($ServiceId, $ServiceName, $Description)
 {
     $obj_retResult = new returnResult();
     $obj_newService = new Service();
     $obj_newService->ServiceId = $ServiceId;
     $obj_newService->ServiceName = $ServiceName;
     $obj_newService->Description = $Description;
     $issuccess = DAL_manageService::updateService($obj_newService);
     if ($issuccess) {
         $obj_retResult->type = 1;
         //	$obj_retResult->data = BL_manageService::getServiceByServiceId($obj_newService->ServiceId);
         $obj_retResult->msg = "Service updation is Success";
     } else {
         $obj_retResult->type = 0;
         $obj_retResult->msg = "Service updation is Failed";
     }
     return $obj_retResult;
 }