public void AddClass(int id, string name, string classNumber) { ClassStorage.Add(new Class { Id = id, Name = name, Description = name, ChalkableDepartmentRef = null, ClassNumber = classNumber, PrimaryTeacherRef = DemoSchoolConstants.TeacherId, SchoolYearRef = DemoSchoolConstants.CurrentSchoolYearId }); var mpcList = new List <MarkingPeriodClass> { new MarkingPeriodClass { MarkingPeriodRef = DemoSchoolConstants.FirstMarkingPeriodId, ClassRef = id }, new MarkingPeriodClass { MarkingPeriodRef = DemoSchoolConstants.SecondMarkingPeriodId, ClassRef = id } }; AssignClassToMarkingPeriod(mpcList); var clsAnnouncementTypeList = new List <ClassAnnouncementType> { new ClassAnnouncementType { ClassRef = id, Description = "Academic Achievement", Gradable = true, Name = "Academic Achievement", Percentage = 50 }, new ClassAnnouncementType { ClassRef = id, Description = "Academic Practice", Gradable = true, Name = "Academic Practice", Percentage = 50 } }; ((DemoClassAnnouncementTypeService)ServiceLocator.ClassAnnouncementTypeService).Add(clsAnnouncementTypeList); var periods = ServiceLocator.PeriodService.GetPeriods(DemoSchoolConstants.CurrentSchoolYearId); ServiceLocator.ClassPeriodService.Add(periods.Select(period => new ClassPeriod() { ClassRef = id, DayTypeRef = DemoSchoolConstants.DayTypeId1, PeriodRef = period.Id, Period = period }).ToList()); AddTeachers(new[] { new ClassTeacher { ClassRef = id, PersonRef = DemoSchoolConstants.TeacherId, IsPrimary = true } }); ServiceLocator.ClassroomOptionService.Add(new[] { new ClassroomOption() { Id = id, SeatingChartColumns = 3, SeatingChartRows = 3, AveragingMethod = "P", DefaultActivitySortOrder = "D", StandardsCalculationMethod = "A", StandardsCalculationRule = "G", DisplayStudentAverage = true } }); for (var gp = DemoSchoolConstants.GradingPeriodQ1; gp <= DemoSchoolConstants.GradingPeriodQ4; ++gp) { AddGradeBookForClass(id, gp); } }
public void Add(IList <Class> classes) { ClassStorage.Add(classes); }