public static Mark Create(MarkView v) { var o = new Mark(); Copy.Members(v, o.Data); return(o); }
public static MarkView Create(Mark o) { var v = new MarkView(); Copy.Members(o.Data, v); return(v); }
private void UpdateMarkTeachersList(MarkView markView) { var marksTeachers = mtRepo.markAll(markView.id); var teachers = tRepo.all(); var markTeachersView = MarkTeacherView.FromMarkTeacherList(marksTeachers, teachers); MarksTeachersGrid.DataSource = markTeachersView; FormatMarksTeachersGrid(); }
public MarkViewWPF(MarkView mark, IEnumerable <PatternView> patterns) { var pattern = patterns.SingleOrDefault(x => x.Id == mark.pattern_Id); Pattern = pattern.Name; Mark = mark.mark; Percent = mark.percent; Difficulty = mark.difficulty; }
private void UpdateSemesterDisciplineMarks(DisciplineWithMark dwm) { var marks = mRepo.studentDisciplineSemesterAll(currentStudentId, dwm.id); marks = Utilities.ConstrainMarksToOneAttestation(marks, dwm); var teachers = tRepo.all().ToDictionary(t => t.id, t => t); var markTypes = mtypeRepo.all(); var markTypeOptions = mtoRepo.all(); SetMarkTypeAndAttestationType(dwm); MarksGridView.DataSource = MarkView .FromMarkList(marks, markTypes, markTypeOptions, teachers, mtRepo) .OrderBy(mv => mv.attempt) .ToList(); FormatMarksGrid(); }