private void btnDeleteUser_Click(object sender, EventArgs e) { try { AppUserDAO.removeAppUser(comboBox1.Text); MessageBox.Show("User deleted successfully.", "HUGO", MessageBoxButtons.OK, MessageBoxIcon.Information); updateAdminControls(); } catch (Exception exception) { MessageBox.Show("Error: " + exception.Message, "Error dialog", MessageBoxButtons.OK, MessageBoxIcon.Error); } }