예제 #1
0
 public Group ToNonSerializable(sSchedule schedule)
 {
     return(new Group
     {
         Name = Name,
         Specialization = Specialization == null ? null : schedule.Dictionaries.Specializations[Specialization.ID],
         YearOfStudy = YearOfStudy == null ? null : schedule.Dictionaries.YearsOfStudy[YearOfStudy.ID]
     });
 }
예제 #2
0
 public sGroup(Group group, sSchedule schedule) : base(group)
 {
     if (group == null)
     {
         return;
     }
     Specialization = group.Specialization == null ? null : schedule.sDictionaries.Specializations[group.Specialization.GetHashCode()];
     YearOfStudy    = group.YearOfStudy == null ? null : schedule.sDictionaries.YearsOfStudy[group.YearOfStudy.GetHashCode()];
 }
예제 #3
0
 public ClassRecord ToNoneSerializable(sSchedule schedule)
 {
     return(new ClassRecord
     {
         Classroom = Classroom == null ? null : schedule.Dictionaries.Classrooms[Classroom.ID],
         ClassTime = ClassTime == null ? null : schedule.Dictionaries.TimeLine[ClassTime.ID],
         Lecturer = Lecturer == null ? null : schedule.Dictionaries.Lecturers[Lecturer.ID],
         Subject = Subject == null ? null : schedule.Dictionaries.Subjects[Subject.ID],
         Group = Group == null ? null : schedule.Dictionaries.Groups[Group.ID]
     });
 }
예제 #4
0
 public sClassRecord(ClassRecord classRecord, sSchedule schedule) : base(classRecord)
 {
     if (classRecord == null)
     {
         return;
     }
     Subject   = classRecord.Subject == null ? null : schedule.sDictionaries.Subjects[classRecord.Subject.GetHashCode()];
     Lecturer  = classRecord.Lecturer == null ? null : schedule.sDictionaries.Lecturers[classRecord.Lecturer.GetHashCode()];
     Classroom = classRecord.Classroom == null ? null : schedule.sDictionaries.Classrooms[classRecord.Classroom.GetHashCode()];
     ClassTime = classRecord.ClassTime == null ? null : schedule.sDictionaries.TimeLine[classRecord.ClassTime.GetHashCode()];
     Group     = classRecord.Group == null ? null : schedule.sDictionaries.Groups[classRecord.Group.GetHashCode()];
 }