private void btnDeleteCustomer_Click(object sender, EventArgs e) { if (listViewCustomers.SelectedIndices.Count == 0) { MessageBox.Show("Please select a customer from the list above", "No Customer Selected", MessageBoxButtons.OK, MessageBoxIcon.Error); } else if (listViewCustomers.SelectedIndices.Count == 1) { DeleteCustomer(); RefreshCustomersListView(); CustomerDB.SaveDatabase(); LoginInformation.LoadLoginInformation(); } }
public MainMenu() { InitializeComponent(); CustomerDB.LoadDatabase(); LoginInformation.LoadLoginInformation(); }