public static void Copy(ClassRecord from, ClassRecord to) { if (from == null || to == null) { return; } to.Subject = from.Subject; to.Lecturer = from.Lecturer; to.Classroom = from.Classroom; }
private void CreateTable() { int rowsCount = _schedule.TimeLine.Count(); int colsCount = Groups.Count(); Table = new ClassRecord[rowsCount][]; for (int i = 0; i < rowsCount; i++) { Table[i] = new ClassRecord[colsCount]; } }
protected bool Equals(ClassRecord other) { return(Equals(_subject, other._subject) && Equals(_lecturer, other._lecturer) && Equals(_classroom, other._classroom)); }
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()]; }