Esempio n. 1
0
 public static function deleteLocation($obj_mainpacket)
 {
     $packet = $obj_mainpacket->packet;
     $LocationId = $packet[0];
     $msg = "failed";
     $result = 0;
     $result_LocationId = 0;
     $retResult = BL_manageLocation::getLocationListByLocationId($LocationId);
     if ($retResult->type == 1) {
         $obj_Location = $retResult->data[0];
         $obj_result2 = DAL_manageLocation::deleteLocation($obj_Location->LocationId);
         if ($obj_result2->type == 1) {
             $result = 1;
             $result_LocationId = $obj_Location->LocationId;
             $msg = "success";
         } else {
             $msg = "Sorry!!! Problem occured while deleting this Location";
         }
     } else {
         $msg = "Sorry!!! The Location you are tring to delete is not found";
     }
     $obj_mainpacket->returnValues = array($result, $obj_Location->LocationId, $msg);
     $obj_mainpacket->main_setPacket();
 }