/// <summary> /// Updates the working order. /// </summary> /// <param name="state">A generic thread argument.</param> void UpdateWorkingOrderThread(Object state) { // Extract the batch of working orders from the generic argument. WebService.WorkingOrder[] workingOrders = state as WebService.WorkingOrder[]; // A Web Service client is required to update the working orders. using (WebService.WebServiceClient webServiceClient = new WebService.WebServiceClient(Settings.Default.WebServiceEndpoint)) { try { // Call the server to update the batch of working orders. webServiceClient.UpdateWorkingOrder(workingOrders); } catch (FaultException faultException) { // Call the foreground to process any security errors. this.Dispatcher.BeginInvoke( DispatcherPriority.Normal, new FaultCallback(this.HandleFaultException), workingOrders, faultException); } } }
public CustomerData() { CustomerData = new WebService.WebServiceClient(); }