Пример #1
0
 protected Statistic(ClassesSchedule schedule, TSubject subject, Func <FullClassRecord, TSubject> getField)
 {
     Subject  = subject;
     Schedule = schedule;
     SetClasses(getField);
     SetCounts();
 }
Пример #2
0
        public TimeLineMarkup(ClassesSchedule schedule)
        {
            int currectRow = 0;
            var days       =
                (from t in schedule.TimeLine
                 select t.Day).Distinct();

            foreach (var day in days)
            {
                var ls =
                    (from t in schedule.TimeLine
                     where t.Day == day
                     select t).ToList();
                int d = ls.Count();
                if (d == 0)
                {
                    continue;
                }
                Days.Add(new TableItem <Weekdays>(day)
                {
                    Row = currectRow, Column = 0, RowSpan = d
                });
                foreach (var timeInterval in ls)
                {
                    ClassesIntervals.Add(new TableItem <ClassTime>(timeInterval)
                    {
                        Row = currectRow, Column = 1
                    });
                    currectRow++;
                }
            }
        }
Пример #3
0
        public static Conflicts SearchAllConflicts(ClassesSchedule schedule)
        {
            var conflicts  = new Conflicts();
            var allClasses = schedule.ToList();

            conflicts.AddRange(GreaterFourClassesPerDay(allClasses));
            conflicts.AddRange(GroupsInDifferentClassrooms(allClasses));
            conflicts.AddRange(LecterersInDifferentClassrooms(allClasses));
            conflicts.AddRange(NextClassesAtDifferentAddress(allClasses));
            return(conflicts);
        }
Пример #4
0
 public StatisticOfSubject(ClassesSchedule schedule, Subject subject)
     : base(schedule, subject, f => f.Subject)
 {
 }
Пример #5
0
 public static void Save(ClassesSchedule schedule, string path)
 {
     sClassesSchedule.Create(schedule).Save(path);
 }
Пример #6
0
 public static StatisticOfLecturer StaticticOfLecturer(ClassesSchedule schedule, Lecturer lecturer)
 {
     return(new StatisticOfLecturer(schedule, lecturer));
 }
Пример #7
0
 public static StatisticOfGroup StaticticOfGroup(ClassesSchedule schedule, Group group)
 {
     return(new StatisticOfGroup(schedule, group));
 }
Пример #8
0
 public static StatisticOfSubject StaticticOfSubject(ClassesSchedule schedule, Subject subject)
 {
     return(new StatisticOfSubject(schedule, subject));
 }
Пример #9
0
 public static StatisticOfTime StaticticOfTime(ClassesSchedule schedule, ClassTime time)
 {
     return(new StatisticOfTime(schedule, time));
 }
Пример #10
0
 public static StatisticOfClassroom StaticticOfClassroom(ClassesSchedule schedule, Classroom classroom)
 {
     return(new StatisticOfClassroom(schedule, classroom));
 }
Пример #11
0
 public StatisticOfClassroom(ClassesSchedule schedule, Classroom subject)
     : base(schedule, subject, f => f.Classroom)
 {
     CountGroupsInClassroom = new Dictionary <ClassTime, int>(schedule.TimeLine.Count);
     SetCountGroupsInClassroom();
 }
Пример #12
0
 public StatisticOfLecturer(ClassesSchedule schedule, Lecturer subject)
     : base(schedule, subject, f => f.Lecturer)
 {
 }
Пример #13
0
 public StatisticOfTime(ClassesSchedule schedule, ClassTime subject)
     : base(schedule, subject, f => f.Time)
 {
 }
Пример #14
0
 public StatisticOfGroup(ClassesSchedule schedule, Group subject)
     : base(schedule, subject, f => f.Group)
 {
 }
Пример #15
0
 public static Conflicts NextClassesAtDifferentAddress(ClassesSchedule schedule)
 {
     return(NextClassesAtDifferentAddress(schedule.ToList()));
 }
Пример #16
0
 public static Conflicts LecterersInDifferentClassrooms(ClassesSchedule schedule)
 {
     return(LecterersInDifferentClassrooms(schedule.ToList()));
 }
Пример #17
0
 public static Conflicts GroupsInDifferentClassrooms(ClassesSchedule schedule)
 {
     return(GroupsInDifferentClassrooms(schedule.ToList()));
 }
Пример #18
0
 public static Conflicts GreaterFourClassesPerDay(ClassesSchedule schedule)
 {
     return(GreaterFourClassesPerDay(schedule.ToList()));
 }