コード例 #1
0
        private void LoadFromModel(ExamComponent model)
        {
            BaseComponentId  = model.BaseComponentId;
            ExamSeriesId     = model.ExamSeriesId;
            AssessmentModeId = model.AssessmentModeId;
            ExamDateId       = model.ExamDateId;
            DateDue          = model.DateDue;
            DateSubmitted    = model.DateSubmitted;
            MaximumMark      = model.MaximumMark;

            if (model.BaseComponent != null)
            {
                BaseComponent = new ExamBaseComponentModel(model.BaseComponent);
            }

            if (model.Series != null)
            {
                Series = new ExamSeriesModel(model.Series);
            }

            if (model.AssessmentMode != null)
            {
                AssessmentMode = new ExamAssessmentModeModel(model.AssessmentMode);
            }

            if (model.ExamDate != null)
            {
                ExamDate = new ExamDateModel(model.ExamDate);
            }
        }
コード例 #2
0
        private void LoadFromModel(ExamBaseComponent model)
        {
            AssessmentModeId = model.AssessmentModeId;
            ExamAssessmentId = model.ExamAssessmentId;
            ComponentCode    = model.ComponentCode;

            if (model.AssessmentMode != null)
            {
                AssessmentMode = new ExamAssessmentModeModel(model.AssessmentMode);
            }

            if (model.Assessment != null)
            {
                Assessment = new ExamAssessmentModel(model.Assessment);
            }
        }