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";
        }
예제 #2
0
 public bool DeleteCustomer(int id)
 {
     return(_customerRepository.DeleteCustomer(id));
 }