private void buttonUserDelete_Click(object sender, EventArgs e) { if (listBoxUser.SelectedItem is Customer) { Customer customer = (Customer)listBoxUser.SelectedItem; if (customer.EmailAddress != FormController.CurrentCustomer.EmailAddress) { if (Feedback.AskCustomerDelete() == DialogResult.Yes) { if (DBController.TryDeleteUser(customer)) { UpdateTable(); Feedback.SuccessCustomersDelete(); } else { Feedback.ErrorDatabaseCustomersDelete(); } } } else { Feedback.ErrorCustomersDeleteHimself(); } } else { Feedback.ErrorNoSelectedItem(); } }