function updatePrimarygeolayertype($sessionkey, $appcode, $Primarygeolayertypedata) { $main_result = "<VPROFILERESULT>"; $main_result .= "<AUTHSTATUS>0</AUTHSTATUS>"; $userId = ValidateSession($sessionkey, $appcode); if ($userId > -1) { $main_result = "<AUTHSTATUS>1</AUTHSTATUS>"; $obj_Primarygeolayertype = new Primarygeolayertype(); foreach ($Userdata["[UPPERTEMPLATENAME"] as $key => $child) { switch ($key) { case "PRIMARYGEOLAYERTYPEID": $obj_Primarygeolayertype->PrimaryGeoLayerTypeId = $child; break; case "PRIMARYGEOLAYERNAME": $obj_Primarygeolayertype->PrimaryGeoLayerName = $child; break; case "DESCRIPTION": $obj_Primarygeolayertype->Description = $child; break; } } $obj_retResult_Primarygeolayertype = DAL_managePrimarygeolayertype::updatePrimarygeolayertype($obj_Primarygeolayertype); if ($obj_retResult_Primarygeolayertype->type == 1) { $main_result .= "<RESULTSTATUS>1</RESULTSTATUS>"; $main_result .= getPrimarygeolayertypeXml($obj_retResult_Primarygeolayertype->data); } else { $main_result .= "<RESULTSTATUS>0</RESULTSTATUS>"; } } $main_result .= "</VPROFILERESULT>"; return $main_result; }
public static function updatePrimarygeolayertype2($PrimaryGeoLayerTypeId, $PrimaryGeoLayerName, $Description) { $obj_retResult = new returnResult(); $obj_newPrimarygeolayertype = new Primarygeolayertype(); $obj_newPrimarygeolayertype->PrimaryGeoLayerTypeId = $PrimaryGeoLayerTypeId; $obj_newPrimarygeolayertype->PrimaryGeoLayerName = $PrimaryGeoLayerName; $obj_newPrimarygeolayertype->Description = $Description; $issuccess = DAL_managePrimarygeolayertype::updatePrimarygeolayertype($obj_newPrimarygeolayertype); if ($issuccess) { $obj_retResult->type = 1; // $obj_retResult->data = BL_managePrimarygeolayertype::getPrimarygeolayertypeByPrimaryGeoLayerTypeId($obj_newPrimarygeolayertype->PrimaryGeoLayerTypeId); $obj_retResult->msg = "Primarygeolayertype updation is Success"; } else { $obj_retResult->type = 0; $obj_retResult->msg = "Primarygeolayertype updation is Failed"; } return $obj_retResult; }