private void button_Accept_Click(object sender, EventArgs e) { if (SQLFunctions.checkExistsUsers(Convert.ToInt32(listView1.SelectedItems[0].SubItems[0].Text)) == true) { SQLFunctions.deleteUser(Convert.ToInt32(listView1.SelectedItems[0].SubItems[0].Text)); MessageBox.Show("User with ID: " + listView1.SelectedItems[0].SubItems[0].Text + " was deleted!"); this.Hide(); FormMenuAdmin adminForm = new FormMenuAdmin(); adminForm.Show(); } else { MessageBox.Show("User ID could not be located in the database"); } }