function updateVillage_climate($sessionkey, $appcode, $Village_climatedata) { $main_result = "<VPROFILERESULT>"; $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>"; $userId = ValidateSession($sessionkey, $appcode); if ($userId > -1) { $main_result = "<AUTHSTATUS>1</AUTHSTATUS>"; $obj_Village_climate = new Village_climate(); foreach ($Userdata["[UPPERTEMPLATENAME"] as $key => $child) { switch ($key) { case "CLIMATEID": $obj_Village_climate->ClimateId = $child; break; case "VILLAGEID": $obj_Village_climate->VillageId = $child; break; case "CLIMATEREAGION": $obj_Village_climate->ClimateReagion = $child; break; case "RAINFALL": $obj_Village_climate->RainFall = $child; break; case "TEMPARATURE": $obj_Village_climate->Temparature = $child; break; case "HUMIDITY": $obj_Village_climate->Humidity = $child; break; } } $obj_retResult_Village_climate = DAL_manageVillage_climate::updateVillage_climate($obj_Village_climate); if ($obj_retResult_Village_climate->type == 1) { $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>"; $main_result .= getVillage_climateXml($obj_retResult_Village_climate->data); } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } $main_result .= "</VPROFILERESULT>"; return $main_result; }
public static function updateVillage_climate2($ClimateId, $VillageId, $ClimateReagion, $RainFall, $Temparature, $Humidity) { $obj_retResult = new returnResult(); $obj_newVillage_climate = new Village_climate(); $obj_newVillage_climate->ClimateId = $ClimateId; $obj_newVillage_climate->VillageId = $VillageId; $obj_newVillage_climate->ClimateReagion = $ClimateReagion; $obj_newVillage_climate->RainFall = $RainFall; $obj_newVillage_climate->Temparature = $Temparature; $obj_newVillage_climate->Humidity = $Humidity; $issuccess = DAL_manageVillage_climate::updateVillage_climate($obj_newVillage_climate); if ($issuccess) { $obj_retResult->type = 1; // $obj_retResult->data = BL_manageVillage_climate::getVillage_climateByClimateId($obj_newVillage_climate->ClimateId); $obj_retResult->msg = "Village_climate updation is Success"; } else { $obj_retResult->type = 0; $obj_retResult->msg = "Village_climate updation is Failed"; } return $obj_retResult; }