Exemple #1
0
        public void ConvertGradeSectionToGradeSectionBDO(GradeSection gs, GradeSectionBDO gsBDO)
        {
            RoomDAO r = new RoomDAO();
            RoomBDO room = new RoomBDO();
            TeacherDAO t = new TeacherDAO();
            TeacherBDO teach = new TeacherBDO();
            SchoolYearDAO s = new SchoolYearDAO();
            SchoolYearBDO sy = new SchoolYearBDO();

            s.ConvertSYToSYBDO(gs.SchoolYear, sy);
            t.ConvertTeacherToTeacherBDO(gs.Teacher, teach);
            r.ConvertRoomToRoomBDO(gs.Room, room);

            gsBDO.Deactivated = gs.Deactivated;
            gsBDO.GradeLevel = gs.GradeLevel;
            gsBDO.GradeSectionCode = gs.GradeSectionCode;
            gsBDO.HomeRoomNumber = (int)gs.HomeRoomNumber;
            gsBDO.HomeRoomTeacherId = gs.HomeRoomTeacherId;
            gsBDO.Section = gs.Section;
            gsBDO.SY = gs.SY;
            gsBDO.Class = gs.Class;

            gsBDO.HomeRoom = room;
            gsBDO.HomeRoomTeacher = teach;
            gsBDO.SchoolYear = sy;
        }
        public void ConvertSubjectAssignmentToSubjectAssignmentBDO(SubjectAssignment sa, SubjectAssignmentBDO sabdo)
        {
            sabdo.Deactivated = (bool)sa.Deactivated;
            GradeSectionDAO gd = new GradeSectionDAO();
            GradeSectionBDO g = new GradeSectionBDO();
            g = gd.GetGradeSectionBDO((int)sa.GradeSectionCode);
            sabdo.GradeSection = g;
            sabdo.GradeSectionCode = g.GradeSectionCode;
            RoomBDO r = new RoomBDO();
            RoomDAO rd = new RoomDAO();
            rd.ConvertRoomToRoomBDO(sa.Room, r);
            sabdo.Room = r;
            sabdo.RoomId = r.RoomId;
            SubjectDAO sd = new SubjectDAO();
            SubjectBDO sb = new SubjectBDO();
            sd.ConvertSubjectToSubjectBDO(sa.Subject, sb);
            sabdo.Subject = sb;
            sabdo.SubjectAssignmentsID = sa.SubjectAssignmentsID;
            sabdo.SubjectCode = sa.SubjectCode;
            sabdo.SY = sa.SY;
            TeacherDAO td = new TeacherDAO();
            TeacherBDO tb = new TeacherBDO();
            td.ConvertTeacherToTeacherBDO(sa.Teacher, tb);
            sabdo.Teacher = tb;
            sabdo.TeacherId = tb.TeacherId;
            TimeslotDAO tid = new TimeslotDAO();
            TimeslotBDO tib = new TimeslotBDO();
            tid.ConvertTimeslotToTimeslotBDO(sa.Timeslot, tib);
            sabdo.Timeslot = tib;
            sabdo.TimeSlotCode = tib.TimeSlotCode;

            sabdo.GradeLevel = g.GradeLevel;
        }
Exemple #3
0
        public void ConvertGradeSectionToGradeSectionBDO(GradeSection gs, GradeSectionBDO gsBDO)
        {
            RoomDAO       r     = new RoomDAO();
            RoomBDO       room  = new RoomBDO();
            TeacherDAO    t     = new TeacherDAO();
            TeacherBDO    teach = new TeacherBDO();
            SchoolYearDAO s     = new SchoolYearDAO();
            SchoolYearBDO sy    = new SchoolYearBDO();

            s.ConvertSYToSYBDO(gs.SchoolYear, sy);
            t.ConvertTeacherToTeacherBDO(gs.Teacher, teach);
            r.ConvertRoomToRoomBDO(gs.Room, room);

            gsBDO.Deactivated       = gs.Deactivated;
            gsBDO.GradeLevel        = gs.GradeLevel;
            gsBDO.GradeSectionCode  = gs.GradeSectionCode;
            gsBDO.HomeRoomNumber    = (int)gs.HomeRoomNumber;
            gsBDO.HomeRoomTeacherId = gs.HomeRoomTeacherId;
            gsBDO.Section           = gs.Section;
            gsBDO.SY    = gs.SY;
            gsBDO.Class = gs.Class;

            gsBDO.HomeRoom        = room;
            gsBDO.HomeRoomTeacher = teach;
            gsBDO.SchoolYear      = sy;
        }
        public void ConvertSubjectAssignmentToSubjectAssignmentBDO(SubjectAssignment sa, SubjectAssignmentBDO sabdo)
        {
            sabdo.Deactivated = (bool)sa.Deactivated;
            GradeSectionDAO gd = new GradeSectionDAO();
            GradeSectionBDO g  = new GradeSectionBDO();

            g = gd.GetGradeSectionBDO((int)sa.GradeSectionCode);
            sabdo.GradeSection     = g;
            sabdo.GradeSectionCode = g.GradeSectionCode;
            RoomBDO r  = new RoomBDO();
            RoomDAO rd = new RoomDAO();

            rd.ConvertRoomToRoomBDO(sa.Room, r);
            sabdo.Room   = r;
            sabdo.RoomId = r.RoomId;
            SubjectDAO sd = new SubjectDAO();
            SubjectBDO sb = new SubjectBDO();

            sd.ConvertSubjectToSubjectBDO(sa.Subject, sb);
            sabdo.Subject = sb;
            sabdo.SubjectAssignmentsID = sa.SubjectAssignmentsID;
            sabdo.SubjectCode          = sa.SubjectCode;
            sabdo.SY = sa.SY;
            TeacherDAO td = new TeacherDAO();
            TeacherBDO tb = new TeacherBDO();

            td.ConvertTeacherToTeacherBDO(sa.Teacher, tb);
            sabdo.Teacher   = tb;
            sabdo.TeacherId = tb.TeacherId;
            TimeslotDAO tid = new TimeslotDAO();
            TimeslotBDO tib = new TimeslotBDO();

            tid.ConvertTimeslotToTimeslotBDO(sa.Timeslot, tib);
            sabdo.Timeslot     = tib;
            sabdo.TimeSlotCode = tib.TimeSlotCode;

            sabdo.GradeLevel = g.GradeLevel;
        }