private void button_Accept_Click(object sender, EventArgs e) { if (SQLFunctions.checkExistsClassroom(textBox_ClassName.Text) == true) { SQLFunctions.deleteClassroom(textBox_ClassName.Text); MessageBox.Show("Class " + textBox_ClassName.Text + " was deleted!"); this.Hide(); FormMenuAdmin adminForm = new FormMenuAdmin(); adminForm.Show(); } else { MessageBox.Show("Classroom could not be located in the database"); } }
private void button_Accept_Click(object sender, EventArgs e) { if (SQLFunctions.checkExistsClassroom(listView1.SelectedItems[0].SubItems[0].Text) == true) { SQLFunctions.deleteClassroom(listView1.SelectedItems[0].SubItems[0].Text); MessageBox.Show("Class " + listView1.SelectedItems[0].SubItems[0].Text + " was deleted!"); this.Hide(); FormMenuAdmin adminForm = new FormMenuAdmin(); adminForm.Show(); } else { MessageBox.Show("Classroom was not found"); } }