Exemple #1
0
        public static Mark Create(MarkView v)
        {
            var o = new Mark();

            Copy.Members(v, o.Data);

            return(o);
        }
Exemple #2
0
        public static MarkView Create(Mark o)
        {
            var v = new MarkView();

            Copy.Members(o.Data, v);

            return(v);
        }
Exemple #3
0
        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;
        }
Exemple #5
0
        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();
        }