protected Statistic(ClassesSchedule schedule, TSubject subject, Func <FullClassRecord, TSubject> getField) { Subject = subject; Schedule = schedule; SetClasses(getField); SetCounts(); }
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++; } } }
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); }
public StatisticOfSubject(ClassesSchedule schedule, Subject subject) : base(schedule, subject, f => f.Subject) { }
public static void Save(ClassesSchedule schedule, string path) { sClassesSchedule.Create(schedule).Save(path); }
public static StatisticOfLecturer StaticticOfLecturer(ClassesSchedule schedule, Lecturer lecturer) { return(new StatisticOfLecturer(schedule, lecturer)); }
public static StatisticOfGroup StaticticOfGroup(ClassesSchedule schedule, Group group) { return(new StatisticOfGroup(schedule, group)); }
public static StatisticOfSubject StaticticOfSubject(ClassesSchedule schedule, Subject subject) { return(new StatisticOfSubject(schedule, subject)); }
public static StatisticOfTime StaticticOfTime(ClassesSchedule schedule, ClassTime time) { return(new StatisticOfTime(schedule, time)); }
public static StatisticOfClassroom StaticticOfClassroom(ClassesSchedule schedule, Classroom classroom) { return(new StatisticOfClassroom(schedule, classroom)); }
public StatisticOfClassroom(ClassesSchedule schedule, Classroom subject) : base(schedule, subject, f => f.Classroom) { CountGroupsInClassroom = new Dictionary <ClassTime, int>(schedule.TimeLine.Count); SetCountGroupsInClassroom(); }
public StatisticOfLecturer(ClassesSchedule schedule, Lecturer subject) : base(schedule, subject, f => f.Lecturer) { }
public StatisticOfTime(ClassesSchedule schedule, ClassTime subject) : base(schedule, subject, f => f.Time) { }
public StatisticOfGroup(ClassesSchedule schedule, Group subject) : base(schedule, subject, f => f.Group) { }
public static Conflicts NextClassesAtDifferentAddress(ClassesSchedule schedule) { return(NextClassesAtDifferentAddress(schedule.ToList())); }
public static Conflicts LecterersInDifferentClassrooms(ClassesSchedule schedule) { return(LecterersInDifferentClassrooms(schedule.ToList())); }
public static Conflicts GroupsInDifferentClassrooms(ClassesSchedule schedule) { return(GroupsInDifferentClassrooms(schedule.ToList())); }
public static Conflicts GreaterFourClassesPerDay(ClassesSchedule schedule) { return(GreaterFourClassesPerDay(schedule.ToList())); }