private void buttonDelete_Click(object sender, EventArgs e) { try { DALStudent.Delete(_theStudent); RefreshStudentList(); MessageBox.Show("Record Deleted Successfully"); } catch (Exception ex) { MessageBox.Show(ex.Message); } }