Exemple #1
0
        private void newSubjectButton_Click(object sender, EventArgs e)
        {
            var newSubjectController = new NewSubjectFormController(_controller.SubjectType);
            var newSubjectForm       = new NewSubjectForm(newSubjectController);

            if (newSubjectForm.ShowDialog() == DialogResult.OK)
            {
                ISubject newSubject = newSubjectController.Subject;
                _controller.AddSuject(newSubject);
            }
            ShowSubjects();
        }
Exemple #2
0
        private void newSubjectBbutton_Click(object sender, EventArgs e)
        {
            if (_controller.SelectedSubject == null)
            {
                return;
            }
            var newSubjectController = new NewSubjectFormController(_controller.SubjectType);
            var newSubjectForm       = new NewSubjectForm(newSubjectController);

            if (newSubjectForm.ShowDialog() == DialogResult.OK)
            {
                ISubject newSubject = newSubjectController.Subject;
                _controller.AddSubject(newSubject);
            }
            ShowSessions();
        }