public SubjectViewModel(Lesson lesson) { Subject = lesson.Subject; Lector = Employee.ToShortName(lesson.Employee); Place = lesson.Auditory ?? string.Empty; Subgroup = lesson.Subgroup; Time = lesson.Time; Type = lesson.Type; }
private SubjectViewModel SubjectDataFromLesson(Lesson l) { return new SubjectViewModel() { Lector = Employee.ToShortName(l.Employee), Number = GetLessonOrder(l.Time), Subject = l.Subject, Subgroup = l.Subgroup, Place = l.Auditory ?? string.Empty, Time = l.Time, Type = l.Type, Weeks = l.Weeks }; }