public static function updateLocation($obj_mainpacket) { $retrunUserpacket = array(); $packet = $obj_mainpacket->packet; $obj_Location = new Location(); if (count($packet) >= 2) { $obj_Location->LocationId = $packet[0]; $obj_Location->Name = $packet[1]; $obj_Location->LocationType = $packet[2]; $obj_Location->Description = $packet[3]; $obj_retResult = new returnResult(); $obj_retResult_Location = DAL_manageLocation::update($obj_Location); if ($obj_retResult_Location->type == 1) { $obj_retResult->type = 1; $obj_retResult->msg = "Location updation is Success"; $retrunUserpacket = $obj_retResult_Location->data->wsGetLocationData(); } else { $obj_retResult->type = 0; $obj_retResult->msg = "Location updation is Failed"; $result_Location = DAL_manageLocation::getLocationByLocationId($obj_Location->LocationId); if ($result_Location->type == 1) { $retrunUserpacket = $result_Location->data->wsGetLocationData(); } } $returnPacket = array($obj_retResult->type, $obj_retResult->msg); $returnPacket = array_merge($returnPacket, $retrunUserpacket); $obj_mainpacket->returnValues = $returnPacket; $obj_mainpacket->main_setPacket(); } }