Beispiel #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);
            }
        }
Beispiel #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);
            }
        }
Beispiel #3
0
        public SessionModel(Session model) : base(model)
        {
            ClassId   = model.ClassId;
            PeriodId  = model.PeriodId;
            TeacherId = model.TeacherId;
            RoomId    = model.RoomId;
            StartDate = model.StartDate;
            EndDate   = model.EndDate;

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

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

            if (model.Class != null)
            {
                Class = new ClassModel(model.Class);
            }

            if (model.Room != null)
            {
                Room = new RoomModel(model.Room);
            }
        }