Esempio n. 1
0
        private void FillDropDownsInfo()
        {
            buildings.ItemsSource        = ClassRoomsDao.GetAllBuildings();
            classRoomNumbers.ItemsSource = ClassRoomsDao.GetAllNumbers();

            var allSpecialties = SpecialtyDao.GetAllSpecialties();
            var allSubjects    = ScheduleRecordDao.GetAllSubjects();
            var allYears       = ScheduleRecordDao.GetAllYears();

            teacherSpecialtyCb.ItemsSource      = allSpecialties;
            teacherSubjectCb.ItemsSource        = allSubjects;
            teacherYearOfStudyingCb.ItemsSource = allYears;

            studentSpecialtyCb.ItemsSource      = allSpecialties;
            studentSubjectCb.ItemsSource        = allSubjects;
            studentYearOfStudyingCb.ItemsSource = allYears;

            var allWeeks = WeeksDao.GetFormattedWeeks();

            mquery2Weeks.ItemsSource = allWeeks;

            var selectWeeks = new string[allWeeks.Length + 1];

            selectWeeks[0] = "Всі тижні";
            Array.Copy(allWeeks, 0, selectWeeks, 1, allWeeks.Length);
            teacherWeekSelect.ItemsSource   = selectWeeks;
            teacherWeekSelect.SelectedIndex = 0;

            mquery1Weeks.ItemsSource   = selectWeeks;
            mquery1Weeks.SelectedIndex = 0;

            teacherNameSelect.ItemsSource = TeacherDao.GetFormattedTeachers();

            studentWeekSelect.ItemsSource      = selectWeeks;
            studentWeekSelect.SelectedIndex    = 0;
            studentSpecialtySelect.ItemsSource = allSpecialties;
            studentCourseSelect.ItemsSource    = allYears;
        }