AdministrationClientCreateRegion Method |
Create a new Region, from the submitted values.
A Region can be related to many Districts The Region RSN can be fetched from the Web Service Method: SelectRegion.
public Result CreateRegion( ManagementGroupRequestOfRegion request )
using (var svc = new AdministrationService.AdministrationClient()) { var request = new AdministrationService.ManagementGroupRequestOfRegion(); request.Token = "Token";//Required - Token returned from AccountService.ManagementGroupLogin request.ManagementGroup = "Management group";//Required - ManagementGroup supplied when calling AccountService.ManagementGroupLogin var region = new AdministrationService.Region(); region.RSN = Guid.NewGuid();//Optional - will be generated if not supplied region.Region_Name = "Northland"; //Required region.Region_ID = "NL"; //Required region.DisplayOrder = 1; //Required // add region to request request.Value = region; AdministrationService.Result result = svc.CreateRegion(request); if (result.FaultCode == 0) { //Request succeeded } else { //Request failed throw new Exception(result.FaultDescription); } }