private void LoadFromModel(CoverArrangement model)
        {
            WeekId    = model.WeekId;
            SessionId = model.SessionId;
            TeacherId = model.TeacherId;
            RoomId    = model.RoomId;
            Comments  = model.Comments;

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

            if (model.Session != null)
            {
                Session = new SessionModel(model.Session);
            }

            if (model.Teacher != null)
            {
                Teacher = new StaffMemberModel(model.Teacher);
            }

            if (model.Room != null)
            {
                Room = new RoomModel(model.Room);
            }
        }
Esempio n. 2
0
        private void LoadFromModel(AttendanceMark model)
        {
            StudentId   = model.StudentId;
            WeekId      = model.WeekId;
            PeriodId    = model.PeriodId;
            CodeId      = model.CodeId;
            Comments    = model.Comments;
            MinutesLate = model.MinutesLate;

            if (model.AttendancePeriod != null)
            {
                AttendancePeriod = new AttendancePeriodModel(model.AttendancePeriod);
            }

            if (model.AttendanceCode != null)
            {
                AttendanceCode = new AttendanceCodeModel(model.AttendanceCode);
            }

            if (model.Student != null)
            {
                Student = new StudentModel(model.Student);
            }

            if (model.Week != null)
            {
                Week = new AttendanceWeekModel(model.Week);
            }
        }
Esempio n. 3
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);
            }
        }