Esempio n. 1
0
        public void TranslateStudentSubjectBDOToStudentSubject(StudentSubjectBDO ssbdo, StudentSubject ss)
        {
            SubjectService s   = new SubjectService();
            Subject        sub = new Subject();

            s.TranslateSubjectBDOToSubject(ssbdo.Subject, sub);


            RegistrationService r  = new RegistrationService();
            StudentEnrollment   se = new StudentEnrollment();

            r.TranslatEnrolBDOToEnrol(ssbdo.StudentEnrollment, se);
            ss.StudentEnr = se;

            ss.Description          = sub.Description;
            ss.FirstPeriodicRating  = ssbdo.FirstPeriodicRating;
            ss.SecondPeriodicRating = ssbdo.SecondPeriodicRating;
            ss.ThirdPeriodicRating  = ssbdo.ThirdPeriodicRating;
            ss.FourthPeriodicRating = ssbdo.FourthPeriodicRating;

            ss.FirstEntered  = ssbdo.FirstEntered;
            ss.SecondEntered = ssbdo.SecondEntered;
            ss.ThirdEntered  = ssbdo.ThirdEntered;
            ss.FourthEntered = ssbdo.FourthEntered;

            ss.LockFirst  = (bool)ssbdo.LockFirst;
            ss.LockFourth = (bool)ssbdo.LockFourth;
            ss.LockSecond = (bool)ssbdo.LockSecond;
            ss.LockThird  = (bool)ssbdo.LockThird;

            ss.FirstLocked  = ssbdo.FirstLocked;
            ss.SecondLocked = ssbdo.SecondLocked;
            ss.ThirdLocked  = ssbdo.ThirdLocked;
            ss.FourthLocked = ssbdo.FourthLocked;

            ss.Remarks = ssbdo.Remarks;

            ss.StudentEnrSubCode = ssbdo.StudentEnrSubCode;

            ss.StudentEnrSubCode = ssbdo.StudentEnrSubCode;
            ss.StudentSubjectsID = ssbdo.StudentSubjectsID;
            ss.StudentSY         = ssbdo.StudentSY;
            ss.SubjectCode       = ssbdo.SubjectCode;


            ss.StudentId   = se.StudentId;
            ss.StudentName = se.StudentName;
        }
Esempio n. 2
0
        private void TranslateCurriculumSubjectBDOToCurriculumSubject(CurriculumSubjectBDO cs, CurriculumSubject csbdo)
        {
            Subject             sbdo = new Subject();
            SubjectService      ss   = new SubjectService();
            LearningAreaService las  = new LearningAreaService();
            LearningArea        la   = new LearningArea();

            csbdo.CurriculumSubjectsID = cs.CurriculumSubjectsID;
            csbdo.CurriculumCode       = cs.CurriculumCode;
            csbdo.CurrSubCode          = cs.CurrSubCode;
            csbdo.Deactivated          = cs.Deactivated;
            ss.TranslateSubjectBDOToSubject(cs.Sub, sbdo);
            csbdo.Subj        = sbdo;
            csbdo.SubjectCode = cs.SubjectCode;
            la                       = las.GetLearningArea(sbdo.LearningAreaCode);
            csbdo.Academic           = la.Academic;
            csbdo.RatePerUnit        = la.RatePerUnit;
            csbdo.Units              = la.Units;
            csbdo.SubjectDescription = sbdo.Description;
            csbdo.GradeLevel         = sbdo.GradeLevel;
            csbdo.LearningAreaCode   = sbdo.LearningAreaCode;
        }
Esempio n. 3
0
        public void TranslateScheduleBDOToSchedule(SubjectAssignmentBDO sabdo, SubjectAssignment sched)
        {
            GradeSectionService gs = new GradeSectionService();
            GradeSection        g  = new GradeSection();

            gs.TranslateGradeSectionBDOToGradeSection(sabdo.GradeSection, g);
            sched.GradeSection = g;
            sched.Section      = g.Section;
            sched.GradeLevel   = g.GradeLevel;
            sched.Class        = (int)g.Class;

            RoomService rs = new RoomService();
            Room        r  = new Room();

            rs.TranslateRoomBDOtoRoomDTO(sabdo.Room, r);
            sched.Room     = r;
            sched.RoomCode = r.RoomCode;

            SubjectService ss = new SubjectService();
            Subject        s  = new Subject();

            ss.TranslateSubjectBDOToSubject(sabdo.Subject, s);
            sched.Subject = s;

            TeacherService ts = new TeacherService();
            Teacher        t  = new Teacher();

            ts.TranslateTeacherBDOToTeacherDTO(sabdo.Teacher, t);
            sched.Teacher = t;
            if (t.MiddleName == String.Empty)
            {
                sched.TeacherName = t.LastName + ", " + t.FirstName;
            }
            else
            {
                sched.TeacherName = t.LastName + ", " + t.FirstName + " " + t.MiddleName.Substring(0, 1) + ".";
            }

            TimeslotService times = new TimeslotService();
            Timeslot        time  = new Timeslot();

            times.TranslateTimeslotBDOToTimeslotDTo(sabdo.Timeslot, time);
            sched.Timeslot  = time;
            sched.Timestart = time.TimeStart;
            sched.TimeEnd   = time.TimeEnd;
            sched.Days      = time.Days;

            sched.Deactivated          = sabdo.Deactivated;
            sched.GradeSectionCode     = sabdo.GradeSectionCode;
            sched.RoomId               = sabdo.RoomId;
            sched.SubjectAssignmentsID = sabdo.SubjectAssignmentsID;
            sched.SubjectCode          = sabdo.SubjectCode;

            sched.SY           = sabdo.SY;
            sched.TeacherId    = sabdo.TeacherId;
            sched.TimeSlotCode = sabdo.TimeSlotCode;

            sched.TimeslotInfo = time.Days + " " + time.TimeStart + "-" + time.TimeEnd;
            sched.SubjectInfo  = sabdo.SubjectCode + " " + sched.Section + " " + sched.TimeslotInfo;

            sched.SubjectDescription = s.Description;
        }
Esempio n. 4
0
        private void TranslateCurriculumSubjectBDOToCurriculumSubject(CurriculumSubjectBDO cs, CurriculumSubject csbdo)
        {
            Subject sbdo = new Subject();
            SubjectService ss = new SubjectService();
            LearningAreaService las = new LearningAreaService();
            LearningArea la = new LearningArea();
            csbdo.CurriculumSubjectsID = cs.CurriculumSubjectsID;
            csbdo.CurriculumCode = cs.CurriculumCode;
            csbdo.CurrSubCode = cs.CurrSubCode;
            csbdo.Deactivated = cs.Deactivated;
            ss.TranslateSubjectBDOToSubject(cs.Sub, sbdo);
            csbdo.Subj = sbdo;
            csbdo.SubjectCode = cs.SubjectCode;
            la = las.GetLearningArea(sbdo.LearningAreaCode);
            csbdo.Academic = la.Academic;
            csbdo.RatePerUnit = la.RatePerUnit;
            csbdo.Units = la.Units;
            csbdo.SubjectDescription = sbdo.Description;
            csbdo.GradeLevel = sbdo.GradeLevel;
            csbdo.LearningAreaCode = sbdo.LearningAreaCode;

        }
Esempio n. 5
0
        public void TranslateStudentSubjectBDOToStudentSubject(StudentSubjectBDO ssbdo, StudentSubject ss)
        {
            SubjectService s = new SubjectService();
            Subject sub = new Subject();
            s.TranslateSubjectBDOToSubject(ssbdo.Subject, sub);


            RegistrationService r = new RegistrationService();
            StudentEnrollment se = new StudentEnrollment();
            r.TranslatEnrolBDOToEnrol(ssbdo.StudentEnrollment, se);
            ss.StudentEnr = se;

            ss.Description = sub.Description;
            ss.FirstPeriodicRating = ssbdo.FirstPeriodicRating;
            ss.SecondPeriodicRating = ssbdo.SecondPeriodicRating;
            ss.ThirdPeriodicRating = ssbdo.ThirdPeriodicRating;
            ss.FourthPeriodicRating = ssbdo.FourthPeriodicRating;

            ss.FirstEntered = ssbdo.FirstEntered;
            ss.SecondEntered = ssbdo.SecondEntered;
            ss.ThirdEntered = ssbdo.ThirdEntered;
            ss.FourthEntered = ssbdo.FourthEntered;

            ss.LockFirst = (bool)ssbdo.LockFirst;
            ss.LockFourth = (bool)ssbdo.LockFourth;
            ss.LockSecond = (bool)ssbdo.LockSecond;
            ss.LockThird = (bool)ssbdo.LockThird;

            ss.FirstLocked = ssbdo.FirstLocked;
            ss.SecondLocked = ssbdo.SecondLocked;
            ss.ThirdLocked = ssbdo.ThirdLocked;
            ss.FourthLocked = ssbdo.FourthLocked;

            ss.Remarks = ssbdo.Remarks;

            ss.StudentEnrSubCode = ssbdo.StudentEnrSubCode;

            ss.StudentEnrSubCode = ssbdo.StudentEnrSubCode;
            ss.StudentSubjectsID = ssbdo.StudentSubjectsID;
            ss.StudentSY = ssbdo.StudentSY;
            ss.SubjectCode = ssbdo.SubjectCode;


            ss.StudentId = se.StudentId;
            ss.StudentName = se.StudentName;

        }
Esempio n. 6
0
        public void TranslateStuSubjectsBDOToStuSubjects(StudentSubjectBDO sbdo, StudentSubject s)
        {
            SubjectService ss  = new SubjectService();
            Subject        sub = new Subject();

            ss.TranslateSubjectBDOToSubject(sbdo.Subject, sub);
            s.SubjectCode = sbdo.SubjectCode;
            s.Description = sub.Description;

            RegistrationService rs = new RegistrationService();
            StudentEnrollment   se = new StudentEnrollment();

            rs.TranslatEnrolBDOToEnrol(sbdo.StudentEnrollment, se);
            s.StudentEnr = se;

            s.StudentSY = sbdo.StudentSY;

            s.StudentId   = se.StudentId;
            s.StudentName = se.StudentName;

            s.StudentSubjectsID    = sbdo.StudentSubjectsID;
            s.StudentEnrSubCode    = sbdo.StudentEnrSubCode;
            s.Remarks              = sbdo.Remarks;
            s.FirstPeriodicRating  = sbdo.FirstPeriodicRating;
            s.SecondPeriodicRating = sbdo.SecondPeriodicRating;
            s.ThirdPeriodicRating  = sbdo.ThirdPeriodicRating;
            s.FourthPeriodicRating = sbdo.FourthPeriodicRating;
            s.Description          = sub.Description;
            s.SubjectAssignments   = sbdo.SubjectAssignments;
            s.FirstEntered         = sbdo.FirstEntered;
            s.FirstLocked          = sbdo.FirstLocked;
            s.FourthEntered        = sbdo.FourthEntered;
            s.FourthLocked         = sbdo.FourthLocked;
            s.LockFirst            = sbdo.LockFirst;
            s.LockFourth           = sbdo.LockFourth;
            s.LockSecond           = sbdo.LockSecond;
            s.LockThird            = sbdo.LockThird;
            s.SecondEntered        = sbdo.SecondEntered;
            s.SecondLocked         = sbdo.SecondLocked;
            s.ThirdEntered         = sbdo.ThirdEntered;
            s.ThirdLocked          = sbdo.ThirdLocked;
            s.FinalRating          = (double)sbdo.FourthPeriodicRating;

            if (s.FinalRating > 90)
            {
                s.Proficiency = "O";
            }
            else if (s.FinalRating >= 85)
            {
                s.Proficiency = "VS";
            }
            else if (s.FinalRating >= 80)
            {
                s.Proficiency = "S";
            }
            else if (s.FinalRating >= 75)
            {
                s.Proficiency = "FS";
            }
            else if (s.FinalRating <= 74)
            {
                s.Proficiency = "D";
            }
        }
Esempio n. 7
0
        public void TranslateScheduleBDOToSchedule(SubjectAssignmentBDO sabdo, SubjectAssignment sched)
        {
            GradeSectionService gs = new GradeSectionService();
            GradeSection g = new GradeSection();
            gs.TranslateGradeSectionBDOToGradeSection(sabdo.GradeSection, g);
            sched.GradeSection = g;
            sched.Section = g.Section;
            sched.GradeLevel = g.GradeLevel;
            sched.Class = (int)g.Class;

            RoomService rs = new RoomService();
            Room r = new Room();
            rs.TranslateRoomBDOtoRoomDTO(sabdo.Room, r);
            sched.Room = r;
            sched.RoomCode = r.RoomCode;

            SubjectService ss = new SubjectService();
            Subject s = new Subject();
            ss.TranslateSubjectBDOToSubject(sabdo.Subject, s);
            sched.Subject = s;

            TeacherService ts = new TeacherService();
            Teacher t = new Teacher();
            ts.TranslateTeacherBDOToTeacherDTO(sabdo.Teacher, t);
            sched.Teacher = t;
            if (t.MiddleName == String.Empty)
                sched.TeacherName = t.LastName + ", " + t.FirstName;
            else
                sched.TeacherName = t.LastName + ", " + t.FirstName + " " + t.MiddleName.Substring(0, 1) + ".";

            TimeslotService times = new TimeslotService();
            Timeslot time = new Timeslot();
            times.TranslateTimeslotBDOToTimeslotDTo(sabdo.Timeslot, time);
            sched.Timeslot = time;
            sched.Timestart = time.TimeStart;
            sched.TimeEnd = time.TimeEnd;
            sched.Days = time.Days;

            sched.Deactivated = sabdo.Deactivated;
            sched.GradeSectionCode = sabdo.GradeSectionCode;
            sched.RoomId = sabdo.RoomId;
            sched.SubjectAssignmentsID = sabdo.SubjectAssignmentsID;
            sched.SubjectCode = sabdo.SubjectCode;

            sched.SY = sabdo.SY;
            sched.TeacherId = sabdo.TeacherId;
            sched.TimeSlotCode = sabdo.TimeSlotCode;

            sched.TimeslotInfo = time.Days + " " + time.TimeStart + "-" + time.TimeEnd;
            sched.SubjectInfo = sabdo.SubjectCode + " " + sched.Section + " " + sched.TimeslotInfo;

            sched.SubjectDescription = s.Description;

        }
Esempio n. 8
0
        public void TranslateStuSubjectsBDOToStuSubjects(StudentSubjectBDO sbdo, StudentSubject s)
        {
            SubjectService ss = new SubjectService();
            Subject sub = new Subject();

            ss.TranslateSubjectBDOToSubject(sbdo.Subject, sub);
            s.SubjectCode = sbdo.SubjectCode;
            s.Description = sub.Description;

            RegistrationService rs = new RegistrationService();
            StudentEnrollment se = new StudentEnrollment();
            rs.TranslatEnrolBDOToEnrol(sbdo.StudentEnrollment, se);
            s.StudentEnr = se;

            s.StudentSY = sbdo.StudentSY;

            s.StudentId = se.StudentId;
            s.StudentName = se.StudentName;

            s.StudentSubjectsID = sbdo.StudentSubjectsID;
            s.StudentEnrSubCode = sbdo.StudentEnrSubCode;
            s.Remarks = sbdo.Remarks;
            s.FirstPeriodicRating = sbdo.FirstPeriodicRating;
            s.SecondPeriodicRating = sbdo.SecondPeriodicRating;
            s.ThirdPeriodicRating = sbdo.ThirdPeriodicRating;
            s.FourthPeriodicRating = sbdo.FourthPeriodicRating;
            s.Description = sub.Description;
            s.SubjectAssignments = sbdo.SubjectAssignments;
            s.FirstEntered = sbdo.FirstEntered;
            s.FirstLocked = sbdo.FirstLocked;
            s.FourthEntered = sbdo.FourthEntered;
            s.FourthLocked = sbdo.FourthLocked;
            s.LockFirst = sbdo.LockFirst;
            s.LockFourth = sbdo.LockFourth;
            s.LockSecond = sbdo.LockSecond;
            s.LockThird = sbdo.LockThird;
            s.SecondEntered = sbdo.SecondEntered;
            s.SecondLocked = sbdo.SecondLocked;
            s.ThirdEntered = sbdo.ThirdEntered;
            s.ThirdLocked = sbdo.ThirdLocked;
            s.FinalRating = (double)sbdo.FourthPeriodicRating;

            if (s.FinalRating > 90)
                s.Proficiency = "O";
            else if (s.FinalRating >= 85)
                s.Proficiency = "VS";
            else if (s.FinalRating >= 80)
                s.Proficiency = "S";
            else if (s.FinalRating >= 75)
                s.Proficiency = "FS";
            else if (s.FinalRating <= 74)
                s.Proficiency = "D";

        }