private void EditStudent() { ClsStudent lcStudent = (ClsStudent)lstStudents.SelectedItem; if (lcStudent != null && lcStudent.ViewEdit()) { UpdateDisplay(); } }
private void btnDltStudent_Click(object sender, EventArgs e) { ClsStudent lcStudent = (ClsStudent)lstStudents.SelectedItem; if (lcStudent != null && DialogResult.Yes == MessageBox.Show("Are you sure you want to delete the selected Student?", "Delete Student", MessageBoxButtons.YesNo)) { ClsInstitute.StudentList.Remove(lcStudent.ID); UpdateDisplay(); } }
private void btnCreateStudent_Click(object sender, EventArgs e) { ClsStudent lcStudent = ClsStudent.NewStudent(cboStudentType.SelectedIndex); if (lcStudent != null && lcStudent.ViewEdit()) { ClsInstitute.StudentList.Add(lcStudent.ID, lcStudent); UpdateDisplay(); } }
public DialogResult ShowDialog(ClsStudent prStudent) { _Student = prStudent; UpdateDisplay(); return(ShowDialog()); }