Exemple #1
0
        public XExamVM(XExam exam)
        {
            _exam = exam;
            _paramsObsCollection = new ObservableCollection<XParamVM>();

            foreach (var v in this.Exam.ParamsCollection)
                _paramsObsCollection.Add(new XParamVM(v));

            _paramCVS = new CollectionViewSource();
            _paramCVS.Source = _paramsObsCollection;

            _examType = new XExamTypeVM(Exam.ExamType);
        }
Exemple #2
0
 internal void RemoveExam(XExam examToRemove)
 {
     DbContext.Parameters.RemoveRange(examToRemove.ParamsCollection);
     DbContext.Exams.Remove(examToRemove);
 }