public void DeleteCustomers(Customer customer) { try { //remove customer MainModuleServiceClient client = new MainModuleServiceClient(); client.RemoveCustomerCompleted += delegate { //refresh customer list this.GetCustomers(); }; client.RemoveCustomerAsync(customer); } catch (FaultException <ServiceError> ex) { MessageBox.Show(ex.Detail.ErrorMessage); } }
public void DeleteCustomers(Customer customer) { try { //remove customer MainModuleServiceClient client = new MainModuleServiceClient(); client.RemoveCustomerCompleted += delegate { //refresh customer list this.GetCustomers(); }; client.RemoveCustomerAsync(customer); } catch (FaultException<ServiceError> ex) { MessageBox.Show(ex.Detail.ErrorMessage); } }