function updateSoiltype($sessionkey, $appcode, $Soiltypedata) { $main_result = "<VPROFILERESULT>"; $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>"; $userId = ValidateSession($sessionkey, $appcode); if ($userId > -1) { $main_result = "<AUTHSTATUS>1</AUTHSTATUS>"; $obj_Soiltype = new Soiltype(); foreach ($Userdata["[UPPERTEMPLATENAME"] as $key => $child) { switch ($key) { case "TBLID": $obj_Soiltype->TblId = $child; break; case "SOILTYPEID": $obj_Soiltype->SoilTypeId = $child; break; case "SOILTYPENAME": $obj_Soiltype->SoilTypeName = $child; break; case "DESCRIPTION": $obj_Soiltype->Description = $child; break; } } $obj_retResult_Soiltype = DAL_manageSoiltype::updateSoiltype($obj_Soiltype); if ($obj_retResult_Soiltype->type == 1) { $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>"; $main_result .= getSoiltypeXml($obj_retResult_Soiltype->data); } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } $main_result .= "</VPROFILERESULT>"; return $main_result; }
public static function updateSoiltype2($TblId, $SoilTypeId, $SoilTypeName, $Description) { $obj_retResult = new returnResult(); $obj_newSoiltype = new Soiltype(); $obj_newSoiltype->TblId = $TblId; $obj_newSoiltype->SoilTypeId = $SoilTypeId; $obj_newSoiltype->SoilTypeName = $SoilTypeName; $obj_newSoiltype->Description = $Description; $issuccess = DAL_manageSoiltype::updateSoiltype($obj_newSoiltype); if ($issuccess) { $obj_retResult->type = 1; // $obj_retResult->data = BL_manageSoiltype::getSoiltypeByTblId($obj_newSoiltype->TblId); $obj_retResult->msg = "Soiltype updation is Success"; } else { $obj_retResult->type = 0; $obj_retResult->msg = "Soiltype updation is Failed"; } return $obj_retResult; }