private void DeleteButton_Click(object sender, System.Windows.RoutedEventArgs e) { var Cust_List = new CustomerDataObjects(); Cust_List.Customer_ID = Convert.ToInt32(txt_ID.Text); _icust = new CustomerDataAccessLayer(); _icust.DeleteCustomer(Cust_List); Clear(); CustomerdataGrid.ItemsSource = GetCustomerList(); }
public Customer DeleteCustomer(int id) { return(_customerBusinessLayer.DeleteCustomer(id)); }