private void AddOrEdit(int id) { switch (FormType) { case STUDENTS: StudentEditForm form1 = new StudentEditForm(id); form1.ShowDialog(); break; case TRAINERS: TrainerEditForm form2 = new TrainerEditForm(id); form2.ShowDialog(); break; case SCHEDULE: ScheduleEditForm form3 = new ScheduleEditForm(id); form3.ShowDialog(); break; case GROUPS: GroupsEditForm form4 = new GroupsEditForm(id); form4.ShowDialog(); break; } RefreshResults(false); }
public void openUpdateStudentForm() { StudentEditForm edit = new StudentEditForm(getStudentFromTextBoxes()); edit.ShowDialog(); getListOfStudents(); reloadStudGrid(); }