Esempio n. 1
0
        private void GetUnAllocatedHours()
        {
            int result     = 0;
            var unsettings = ScheduleLayer.GetUnallocatedSubjects(SelectedGroup.Name);

            if (unsettings != null)
            {
                foreach (Settings set in unsettings)
                {
                    result += set.Hours;
                }
            }
            UnallocatedHours = result;
            this.SendPropertyChanged(nameof(UnallocatedHours));
        }
Esempio n. 2
0
        private void GetUnAllocatedSchedule(Schedule schedule)
        {
            var             unloc  = ScheduleLayer.GetUnallocatedSubjects(schedule.GroupName);
            List <Settings> result = new List <Settings>();

            if (unloc != null)
            {
                foreach (Settings set in unloc)
                {
                    if (ScheduleLayer.CanInputHere(new Schedule {
                        Lesson = schedule.Lesson, WeekDay = schedule.WeekDay, Room = set.Room, Teacher1 = set.Teacher1, GroupName = set.GroupName
                    }))
                    {
                        result.Add(set);
                    }
                }
            }
            result.Add(new Settings {
                Subject = "Обед"
            });
            UnallocatedSchedule = result;
            this.SendPropertyChanged(nameof(UnallocatedSchedule));
        }