示例#1
0
        private void LoadFromModel(ReportCardEntry model)
        {
            ReportCardId = model.ReportCardId;
            CreatedById  = model.CreatedById;
            WeekId       = model.WeekId;
            PeriodId     = model.PeriodId;
            Comments     = model.Comments;

            if (model.ReportCard != null)
            {
                ReportCard = new ReportCardModel(model.ReportCard);
            }

            if (model.CreatedBy != null)
            {
                CreatedBy = new UserModel(model.CreatedBy);
            }

            if (model.AttendanceWeek != null)
            {
                AttendanceWeek = new AttendanceWeekModel(model.AttendanceWeek);
            }

            if (model.Period != null)
            {
                Period = new AttendancePeriodModel(model.Period);
            }
        }
示例#2
0
        private void LoadFromModel(ReportCardTarget model)
        {
            ReportCardId = model.ReportCardId;
            TargetId     = model.TargetId;

            if (model.ReportCard != null)
            {
                ReportCard = new ReportCardModel(model.ReportCard);
            }

            if (model.Target != null)
            {
                Target = new BehaviourTargetModel(model.Target);
            }
        }