Beispiel #1
0
        public StudentProperties(StudentList parent, ScheduleRepository repo, int studentId, StudentDetailsMode mode)
        {
            InitializeComponent();

            _studentList = parent;
            _repo = repo;
            _student = _repo.Students.GetStudent(studentId);
            _mode = mode;

            if ((_student == null) && mode == StudentDetailsMode.Edit)
            {
                Close();
            }
        }
Beispiel #2
0
        private void ShowStudentListForm()
        {
            if (_studentListFormOpened)
            {
                StudentListForm.Activate();
                StudentListForm.Focus();
                return;
            }

            StudentListForm = new StudentList(Repo);
            _studentListFormOpened = true;
            StudentListForm.Show();
            _studentListFormOpened = false;
        }