function updateVillage_agriculture($sessionkey, $appcode, $Village_agriculturedata) { $main_result = "<VPROFILERESULT>"; $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>"; $userId = ValidateSession($sessionkey, $appcode); if ($userId > -1) { $main_result = "<AUTHSTATUS>1</AUTHSTATUS>"; $obj_Village_agriculture = new Village_agriculture(); foreach ($Userdata["[UPPERTEMPLATENAME"] as $key => $child) { switch ($key) { case "AGRICULTUREID": $obj_Village_agriculture->AgricultureId = $child; break; case "VILLAGEID": $obj_Village_agriculture->VillageId = $child; break; case "BUSINESSID": $obj_Village_agriculture->BusinessId = $child; break; case "DESCRIPTION": $obj_Village_agriculture->Description = $child; break; } } $obj_retResult_Village_agriculture = DAL_manageVillage_agriculture::updateVillage_agriculture($obj_Village_agriculture); if ($obj_retResult_Village_agriculture->type == 1) { $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>"; $main_result .= getVillage_agricultureXml($obj_retResult_Village_agriculture->data); } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } $main_result .= "</VPROFILERESULT>"; return $main_result; }
public static function updateVillage_agriculture2($AgricultureId, $VillageId, $BusinessId, $Description) { $obj_retResult = new returnResult(); $obj_newVillage_agriculture = new Village_agriculture(); $obj_newVillage_agriculture->AgricultureId = $AgricultureId; $obj_newVillage_agriculture->VillageId = $VillageId; $obj_newVillage_agriculture->BusinessId = $BusinessId; $obj_newVillage_agriculture->Description = $Description; $issuccess = DAL_manageVillage_agriculture::updateVillage_agriculture($obj_newVillage_agriculture); if ($issuccess) { $obj_retResult->type = 1; // $obj_retResult->data = BL_manageVillage_agriculture::getVillage_agricultureByBusinessId($obj_newVillage_agriculture->BusinessId); $obj_retResult->msg = "Village_agriculture updation is Success"; } else { $obj_retResult->type = 0; $obj_retResult->msg = "Village_agriculture updation is Failed"; } return $obj_retResult; }