Click or drag to resize

AdministrationClientUpdateDistrict Method

Update the District Detail from the submitted Values.

The District RSN can be fetched from the Web Service Method: SelectDistrict.

Syntax
C#
public Result UpdateDistrict(
	ManagementGroupRequestOfDistrict request
)

Parameters

request
Type: AdministrationServiceManagementGroupRequestOfDistrict

Return Value

Type: Result
Examples
C#
using (var svc = new AdministrationService.AdministrationClient())
{
  var request = new AdministrationService.ManagementGroupRequestOfDistrict();
  request.Token = "Token";//Required - Token returned from AccountService.ManagementGroupLogin
  request.ManagementGroup = "Management group";//Required - ManagementGroup supplied when calling AccountService.ManagementGroupLogin

  var district = new AdministrationService.District();
  district.RSN = new Guid("74e903b5-7c8b-4900-96fd-e9f80b3ae392");; //Required
  district.Region_RSN = new Guid("98ecbb0e-6f22-4aaa-944c-216e1e01320b");; //Required Value from Region.RSN
  district.District_Name = "Rodney"; //Required
  district.District_ID = "4"; //Required
  district.DisplayOrder = 1; //Required

  // add district to request
  request.Value = district;//Required

  AdministrationService.Result result = svc.UpdateDistrict(request);

  if (result.FaultCode == 0)
  {
    //Request succeeded
  }
  else
  {
    //Request failed
    throw new Exception(result.FaultDescription);
  }
}
See Also