Ejemplo n.º 1
0
        private void LoadFromModel(StaffAbsence model)
        {
            StaffMemberId = model.StaffMemberId;
            AbsenceTypeId = model.AbsenceTypeId;
            IllnessTypeId = model.IllnessTypeId;
            StartDate     = model.StartDate;
            EndDate       = model.EndDate;
            Confidential  = model.Confidential;
            Notes         = model.Notes;

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

            if (model.AbsenceType != null)
            {
                AbsenceType = new StaffAbsenceTypeModel(model.AbsenceType);
            }

            if (model.IllnessType != null)
            {
                IllnessType = new StaffIllnessTypeModel(model.IllnessType);
            }
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 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);
            }
        }
        private void LoadFromModel(ParentEveningStaffMember model)
        {
            ParentEveningId   = model.ParentEveningId;
            StaffMemberId     = model.StaffMemberId;
            AvailableFrom     = model.AvailableFrom;
            AvailableTo       = model.AvailableTo;
            AppointmentLength = model.AppointmentLength;
            BreakLimit        = model.BreakLimit;

            if (model.ParentEvening != null)
            {
                ParentEvening = new ParentEveningModel(model.ParentEvening);
            }

            if (model.StaffMember != null)
            {
                StaffMember = new StaffMemberModel(model.StaffMember);
            }
        }
Ejemplo n.º 5
0
        private void LoadFromModel(SubjectStaffMember model)
        {
            SubjectId     = model.SubjectId;
            StaffMemberId = model.StaffMemberId;
            RoleId        = model.RoleId;

            if (model.Subject != null)
            {
                Subject = new SubjectModel(model.Subject);
            }

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

            if (model.Role != null)
            {
                Role = new SubjectStaffMemberRoleModel(model.Role);
            }
        }
Ejemplo n.º 6
0
        private void LoadFromModel(TrainingCertificate model)
        {
            CourseId = model.CourseId;
            StaffId  = model.StaffId;
            StatusId = model.StatusId;

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

            if (model.TrainingCourse != null)
            {
                TrainingCourse = new TrainingCourseModel(model.TrainingCourse);
            }

            if (model.Status != null)
            {
                Status = new TrainingCertificateStatusModel(model.Status);
            }
        }
Ejemplo n.º 7
0
        private void LoadFromModel(Detention model)
        {
            DetentionTypeId = model.DetentionTypeId;
            EventId         = model.EventId;
            SupervisorId    = model.SupervisorId;

            if (model.Type != null)
            {
                Type = new DetentionTypeModel(model.Type);
            }

            if (model.Event != null)
            {
                Event = new DiaryEventModel(model.Event);
            }

            if (model.Supervisor != null)
            {
                Supervisor = new StaffMemberModel(model.Supervisor);
            }
        }
Ejemplo n.º 8
0
        private void LoadFromModel(NextOfKin model)
        {
            StaffMemberId      = model.StaffMemberId;
            NextOfKinPersonId  = model.NextOfKinPersonId;
            RelationshipTypeId = model.RelationshipTypeId;

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

            if (model.NextOfKinPerson != null)
            {
                NextOfKinPerson = new PersonModel(model.NextOfKinPerson);
            }

            if (model.RelationshipType != null)
            {
                RelationshipType = new NextOfKinRelationshipTypeModel(model.RelationshipType);
            }
        }
Ejemplo n.º 9
0
        private void LoadFromModel(Observation model)
        {
            Date       = model.Date;
            ObserveeId = model.ObserveeId;
            ObserverId = model.ObserverId;
            OutcomeId  = model.OutcomeId;

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

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

            if (model.Outcome != null)
            {
                Outcome = new ObservationOutcomeModel(model.Outcome);
            }
        }
Ejemplo n.º 10
0
        private void LoadFromModel(StaffMember model)
        {
            Id             = model.Id;
            LineManagerId  = model.LineManagerId;
            PersonId       = model.PersonId;
            Code           = model.Code;
            BankName       = model.BankName;
            BankAccount    = model.BankAccount;
            BankSortCode   = model.BankSortCode;
            NiNumber       = model.NiNumber;
            Qualifications = model.Qualifications;
            TeachingStaff  = model.TeachingStaff;
            Deleted        = model.Deleted;

            if (model.Person != null)
            {
                Person = new PersonModel(model.Person);
            }

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