private void buttonDelete_Click(object sender, EventArgs e) { Customer customer = customerVM.GetDisplayedCustomer(); CustomerInfoRepository.DeleteCustomer(customer); customerVM.Customers = CustomerInfoRepository.GetAllCustomers(); listBoxCustomers.DataSource = customerVM.Customers; listBoxCustomers.DisplayMember = "CustomerCode"; }
public bool DeleteCustomer(int id) { return(_customerRepository.DeleteCustomer(id)); }