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 #2
0
        public List <SubjectBDO> ToSubjectBDOList(ICollection <Subject> slist)
        {
            SubjectDAO        sd       = new SubjectDAO();
            List <SubjectBDO> sbdoList = new List <SubjectBDO>();

            foreach (Subject s in slist)
            {
                SubjectBDO sbdo = new SubjectBDO();
                sd.ConvertSubjectToSubjectBDO(s, sbdo);
                sbdoList.Add(sbdo);
            }
            return(sbdoList);
        }
        public void ConvertStuSubjectsToStuSubjectsBDO(StudentSubject s, StudentSubjectBDO sbdo)
        {
            StudentEnrolmentDAO  sed  = new StudentEnrolmentDAO();
            StudentEnrollmentBDO sedb = new StudentEnrollmentBDO();

            sed.ConvertEnrolToEnrolBDO(s.StudentEnrollment, sedb);
            sbdo.StudentEnrollment = sedb;

            StudentDAO sd = new StudentDAO();
            StudentBDO sb = new StudentBDO();

            sd.ConvertStudentToStudentBDO(s.StudentEnrollment.Student, sb);
            sbdo.StudentEnrollment.Student = sb;

            SubjectDAO subd = new SubjectDAO();
            SubjectBDO sbo  = new SubjectBDO();

            subd.ConvertSubjectToSubjectBDO(s.Subject, sbo);
            sbdo.Subject = sbo;

            sbdo.StudentSY         = s.StudentSY;
            sbdo.SubjectCode       = s.SubjectCode;
            sbdo.StudentSubjectsID = s.StudentSubjectsID;
            sbdo.StudentEnrSubCode = s.StudentEnrSubCode;
            sbdo.Remarks           = s.Remarks;

            sbdo.FirstPeriodicRating  = s.FirstPeriodicRating;
            sbdo.SecondPeriodicRating = s.SecondPeriodicRating;
            sbdo.ThirdPeriodicRating  = s.ThirdPeriodicRating;
            sbdo.FourthPeriodicRating = s.FourthPeriodicRating;

            sbdo.StudentEnrSubCode = s.StudentEnrSubCode;

            sbdo.SubjectAssignments = s.SubjectAssignments;

            sbdo.FirstEntered  = s.FirstEntered;
            sbdo.SecondEntered = s.SecondEntered;
            sbdo.FourthEntered = s.FourthEntered;
            sbdo.ThirdEntered  = s.ThirdEntered;

            sbdo.LockFirst  = s.LockFirst;
            sbdo.LockSecond = s.LockSecond;
            sbdo.LockThird  = s.LockThird;
            sbdo.LockFourth = s.LockFourth;

            sbdo.FirstLocked  = s.FirstLocked;
            sbdo.SecondLocked = s.SecondLocked;
            sbdo.ThirdLocked  = s.ThirdLocked;
            sbdo.FourthLocked = s.FourthLocked;
        }
Exemple #4
0
        public void ConvertStuSubjectsToStuSubjectsBDO(StudentSubject s, StudentSubjectBDO sbdo)
        {
            StudentEnrolmentDAO sed = new StudentEnrolmentDAO();
            StudentEnrollmentBDO sedb = new StudentEnrollmentBDO();
            sed.ConvertEnrolToEnrolBDO(s.StudentEnrollment, sedb);
            sbdo.StudentEnrollment = sedb;

            StudentDAO sd = new StudentDAO();
            StudentBDO sb = new StudentBDO();
            sd.ConvertStudentToStudentBDO(s.StudentEnrollment.Student, sb);
            sbdo.StudentEnrollment.Student = sb;

            SubjectDAO subd = new SubjectDAO();
            SubjectBDO sbo = new SubjectBDO();
            subd.ConvertSubjectToSubjectBDO(s.Subject, sbo);
            sbdo.Subject = sbo;

            sbdo.StudentSY = s.StudentSY;
            sbdo.SubjectCode = s.SubjectCode;
            sbdo.StudentSubjectsID = s.StudentSubjectsID;
            sbdo.StudentEnrSubCode = s.StudentEnrSubCode;
            sbdo.Remarks = s.Remarks;

            sbdo.FirstPeriodicRating = s.FirstPeriodicRating;
            sbdo.SecondPeriodicRating = s.SecondPeriodicRating;
            sbdo.ThirdPeriodicRating = s.ThirdPeriodicRating;
            sbdo.FourthPeriodicRating = s.FourthPeriodicRating;

            sbdo.StudentEnrSubCode = s.StudentEnrSubCode;

            sbdo.SubjectAssignments = s.SubjectAssignments;

            sbdo.FirstEntered = s.FirstEntered;
            sbdo.SecondEntered = s.SecondEntered;
            sbdo.FourthEntered = s.FourthEntered;
            sbdo.ThirdEntered = s.ThirdEntered;

            sbdo.LockFirst = s.LockFirst;
            sbdo.LockSecond = s.LockSecond;
            sbdo.LockThird = s.LockThird;
            sbdo.LockFourth = s.LockFourth;

            sbdo.FirstLocked = s.FirstLocked;
            sbdo.SecondLocked = s.SecondLocked;
            sbdo.ThirdLocked = s.ThirdLocked;
            sbdo.FourthLocked = s.FourthLocked;
        }
        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;
        }
 public List<SubjectBDO> ToSubjectBDOList(ICollection<Subject> slist)
 {
     SubjectDAO sd = new SubjectDAO();
     List<SubjectBDO> sbdoList = new List<SubjectBDO>();
     foreach (Subject s in slist)
     {
         SubjectBDO sbdo = new SubjectBDO();
         sd.ConvertSubjectToSubjectBDO(s, sbdo);
         sbdoList.Add(sbdo);
     }
     return sbdoList;
 }