function updateVillage_neartowns($sessionkey, $appcode, $Village_neartownsdata) { $main_result = "<VPROFILERESULT>"; $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>"; $userId = ValidateSession($sessionkey, $appcode); if ($userId > -1) { $main_result = "<AUTHSTATUS>1</AUTHSTATUS>"; $obj_Village_neartowns = new Village_neartowns(); foreach ($Userdata["[UPPERTEMPLATENAME"] as $key => $child) { switch ($key) { case "VILLAGEID": $obj_Village_neartowns->VillageId = $child; break; case "TOWNID": $obj_Village_neartowns->TownId = $child; break; case "DISTANCE": $obj_Village_neartowns->Distance = $child; break; case "DESCRIPTION": $obj_Village_neartowns->Description = $child; break; } } $obj_retResult_Village_neartowns = DAL_manageVillage_neartowns::updateVillage_neartowns($obj_Village_neartowns); if ($obj_retResult_Village_neartowns->type == 1) { $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>"; $main_result .= getVillage_neartownsXml($obj_retResult_Village_neartowns->data); } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } $main_result .= "</VPROFILERESULT>"; return $main_result; }
public static function updateVillage_neartowns2($VillageId, $TownId, $Distance, $Description) { $obj_retResult = new returnResult(); $obj_newVillage_neartowns = new Village_neartowns(); $obj_newVillage_neartowns->VillageId = $VillageId; $obj_newVillage_neartowns->TownId = $TownId; $obj_newVillage_neartowns->Distance = $Distance; $obj_newVillage_neartowns->Description = $Description; $issuccess = DAL_manageVillage_neartowns::updateVillage_neartowns($obj_newVillage_neartowns); if ($issuccess) { $obj_retResult->type = 1; // $obj_retResult->data = BL_manageVillage_neartowns::getVillage_neartownsByTownId($obj_newVillage_neartowns->TownId); $obj_retResult->msg = "Village_neartowns updation is Success"; } else { $obj_retResult->type = 0; $obj_retResult->msg = "Village_neartowns updation is Failed"; } return $obj_retResult; }