private void CopyTable(ClassesTable table, sClassesSchedule schedule) { var oldTable = table.Table; Table = new sClassRecord[oldTable.Length][]; for (int i = 0; i < oldTable.Length; ++i) { Table[i] = new sClassRecord[oldTable[i].Length]; for (int j = 0; j < oldTable[i].Length; ++j) { if (oldTable[i][j] != null) { Table[i][j] = new sClassRecord(oldTable[i][j], schedule); } } } }
private void CopyYearOfStudy(ClassesTable table, sClassesSchedule schedule) { YearOfStudy = schedule.YearsOfStudy[table.YearOfStudy.GetHashCode()]; }
public sClassRecord(ClassRecord classRecord, sClassesSchedule schedule) : base(classRecord) { Subject = classRecord.Subject == null ? null : schedule.Subjects[classRecord.Subject.GetHashCode()]; Lecturer = classRecord.Lecturer == null ? null : schedule.Lecturers[classRecord.Lecturer.GetHashCode()]; Classroom = classRecord.Classroom == null ? null : schedule.Classrooms[classRecord.Classroom.GetHashCode()]; }
public sClassesTable(ClassesTable table, sClassesSchedule schedule) : base(table.YearOfStudy) { CopyYearOfStudy(table, schedule); CopyTable(table, schedule); }
public sGroup(Group group, sClassesSchedule schedule) : base(group) { Specialization = schedule.Specializations[group.Specialization.GetHashCode()]; YearOfStudy = schedule.YearsOfStudy[group.YearOfStudy.GetHashCode()]; }