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); } }
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); } }