Ejemplo n.º 1
0
 public static function deleteForesttype($obj_mainpacket)
 {
     $packet = $obj_mainpacket->packet;
     $ForestTypeId = $packet[0];
     $msg = "failed";
     $result = 0;
     $result_ForestTypeId = 0;
     $retResult = BL_manageForesttype::getForesttypeListByForestTypeId($ForestTypeId);
     if ($retResult->type == 1) {
         $obj_Foresttype = $retResult->data[0];
         $obj_result2 = DAL_manageForesttype::deleteForesttype($obj_Foresttype->ForestTypeId);
         if ($obj_result2->type == 1) {
             $result = 1;
             $result_ForestTypeId = $obj_Foresttype->ForestTypeId;
             $msg = "success";
         } else {
             $msg = "Sorry!!! Problem occured while deleting this Foresttype";
         }
     } else {
         $msg = "Sorry!!! The Foresttype you are tring to delete is not found";
     }
     $obj_mainpacket->returnValues = array($result, $obj_Foresttype->ForestTypeId, $msg);
     $obj_mainpacket->main_setPacket();
 }