protected virtual ExamSheetViewModel CreateClosedSheet(ExamSheetModel model) { return(new ExamSheetViewModel() { Id = model.Id, CloseDate = model.CloseDate, Group = GroupManager.GetById(model.GroupId), Faculty = CreateFacultyViewModel(FacultyManager.GetById(model.FacultyId)), Subject = SubjectManager.GetById(model.SubjectId), Teacher = TeacherManager.GetById(model.TeacherId), Semester = model.Semester, State = (Models.ExamSheetState)model.State, Year = model.Year, Ratings = CreateRatings(model.Id) }); }
protected virtual ExamSheetListViewModel ExamSheetListViewModel(ExamSheetModel examSheet) { var model = new ExamSheetListViewModel(); model.CloseDate = examSheet.CloseDate; model.Faculty = FacultyManager.GetById(examSheet.FacultyId); model.Group = GroupManager.GetById(examSheet.GroupId); model.Id = examSheet.Id; //model.OpenDate = examSheet.OpenDate; model.Semester = examSheet.Semester; model.State = (Models.ExamSheetState)examSheet.State; model.Subject = SubjectManager.GetById(examSheet.SubjectId); model.Teacher = TeacherManager.GetById(examSheet.TeacherId); model.Year = examSheet.Year; return(model); }