public MainViewViewModel(MainWindow view)
        {
            this.view = view;

            examPeriodTabs = new ObservableCollection <TabItem>();

            foreach (var activeExamPeriod in ServiceDataProvider.GetActiveExamPeriods())
            {
                examPeriodTabs.Add(new TabItem()
                {
                    Header = activeExamPeriod.Name, Tag = activeExamPeriod.ExamPeriodId
                });
            }

            Courses  = ServiceDataProvider.GetProfessorCourses(4);
            students = new ObservableCollection <ExamRegistration>();
            view.Tabcontrol.SelectedIndex     = 0;
            view.cbxCourses.SelectedIndex     = 0;
            view.OnSelectionComboBoxChanged   = delegate { ProvideRegistredStudentsAndExamInfo(); };
            view.OnSelectionTabControlChanged = delegate { ProvideRegistredStudentsAndExamInfo(); };
        }