function updateForesttype($sessionkey, $appcode, $Foresttypedata) { $main_result = "<VPROFILERESULT>"; $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>"; $userId = ValidateSession($sessionkey, $appcode); if ($userId > -1) { $main_result = "<AUTHSTATUS>1</AUTHSTATUS>"; $obj_Foresttype = new Foresttype(); foreach ($Userdata["[UPPERTEMPLATENAME"] as $key => $child) { switch ($key) { case "FORESTTYPEID": $obj_Foresttype->ForestTypeId = $child; break; case "NAME": $obj_Foresttype->Name = $child; break; case "DESCRIPTION": $obj_Foresttype->Description = $child; break; } } $obj_retResult_Foresttype = DAL_manageForesttype::updateForesttype($obj_Foresttype); if ($obj_retResult_Foresttype->type == 1) { $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>"; $main_result .= getForesttypeXml($obj_retResult_Foresttype->data); } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } $main_result .= "</VPROFILERESULT>"; return $main_result; }
public static function updateForesttype2($ForestTypeId, $Name, $Description) { $obj_retResult = new returnResult(); $obj_newForesttype = new Foresttype(); $obj_newForesttype->ForestTypeId = $ForestTypeId; $obj_newForesttype->Name = $Name; $obj_newForesttype->Description = $Description; $issuccess = DAL_manageForesttype::updateForesttype($obj_newForesttype); if ($issuccess) { $obj_retResult->type = 1; // $obj_retResult->data = BL_manageForesttype::getForesttypeByForestTypeId($obj_newForesttype->ForestTypeId); $obj_retResult->msg = "Foresttype updation is Success"; } else { $obj_retResult->type = 0; $obj_retResult->msg = "Foresttype updation is Failed"; } return $obj_retResult; }