public static function updateVillage_history($obj_mainpacket) { $retrunUserpacket = array(); $packet = $obj_mainpacket->packet; $obj_Village_history = new Village_history(); if (count($packet) >= 2) { $obj_Village_history->TblId = $packet[0]; $obj_Village_history->VillageId = $packet[1]; $obj_Village_history->DescriptionType = $packet[2]; $obj_Village_history->Description = $packet[3]; $obj_retResult = new returnResult(); $obj_retResult_Village_history = DAL_manageVillage_history::update($obj_Village_history); if ($obj_retResult_Village_history->type == 1) { $obj_retResult->type = 1; $obj_retResult->msg = "Village_history updation is Success"; $retrunUserpacket = $obj_retResult_Village_history->data->wsGetVillage_historyData(); } else { $obj_retResult->type = 0; $obj_retResult->msg = "Village_history updation is Failed"; $result_Village_history = DAL_manageVillage_history::getVillage_historyByTblId($obj_Village_history->TblId); if ($result_Village_history->type == 1) { $retrunUserpacket = $result_Village_history->data->wsGetVillage_historyData(); } } $returnPacket = array($obj_retResult->type, $obj_retResult->msg); $returnPacket = array_merge($returnPacket, $retrunUserpacket); $obj_mainpacket->returnValues = $returnPacket; $obj_mainpacket->main_setPacket(); } }