private void DisplayUpdateForm() { Student selectedStu = lstStudents.SelectedItem as Student; var updateForm = new FrmAddUpdateStudent(selectedStu); updateForm.ShowDialog(); }
private void BtnAddStudent_Click(object sender, EventArgs e) { FrmAddUpdateStudent addStuForm = new FrmAddUpdateStudent(); addStuForm.ShowDialog(); PopulateStudentListBox(); }