Пример #1
0
 public void TranslateSubjectToSubjectBDO(Subject sub, SubjectBDO sbdo) {
     LearningAreaService las = new LearningAreaService();
     LearningAreaBDO lb = new LearningAreaBDO();
     sbdo.SubjectID = sub.SubjectID;
     sbdo.Description = sub.Description;
     sbdo.GradeLevel = sub.GradeLevel;
     sbdo.LearningAreaCode = sub.LearningAreaCode;
     sbdo.SubjectCode = sub.SubjectCode;
     las.TranslateLearningAreaToLearningAreaBDO(sub.LArea, lb);
     sbdo.LearningArea = lb;
 }
Пример #2
0
 public void TranslateSubjectBDOToSubject(SubjectBDO sub, Subject sbdo)
 {
     //LearningAreaService las = new LearningAreaService();
     //LearningArea lb = new LearningArea();
     sbdo.SubjectID = sub.SubjectID;
     sbdo.Description = sub.Description;
     sbdo.GradeLevel = sub.GradeLevel;
     sbdo.LearningAreaCode = sub.LearningAreaCode;
     sbdo.SubjectCode = sub.SubjectCode;
     sbdo.Academic = sub.Academic;
     sbdo.MPW = sub.MPW;
       //  las.TranslateLearningAreaBDOToLearningArea(sub.LearningArea, lb);
        // sbdo.LArea = lb;
 }
Пример #3
0
 public List<Subject> ToSubjectList(List<SubjectBDO> sList)
 {
     List<Subject> slist = new List<Subject>();
     foreach (SubjectBDO s in sList)
     {
         Subject sbdo = new Subject();
         sbdo.SubjectID = s.SubjectID;
         sbdo.LearningAreaCode = s.LearningAreaCode;
         sbdo.Description = s.Description;
         sbdo.GradeLevel = s.GradeLevel;
         sbdo.SubjectCode = s.SubjectCode;
         slist.Add(sbdo);
     }
     return slist;
 }
Пример #4
0
        public void TranslateCurrSub(Subject s, CurriculumSubject cs)
        {
            LearningAreaService las = new LearningAreaService();
            LearningArea la = new LearningArea();
            SubjectService ss = new SubjectService();
            Subject subj = new Subject();
            subj = ss.GetSubject(s.SubjectCode);
            cs.Subj = s;
            cs.SubjectCode = s.SubjectCode;
            la = las.GetLearningArea(s.LearningAreaCode);
            cs.Academic = la.Academic;
            cs.RatePerUnit = la.RatePerUnit;
            cs.Units = la.Units;
            cs.SubjectDescription = subj.Description;
            cs.GradeLevel = subj.GradeLevel;
            cs.LearningAreaCode = subj.LearningAreaCode;

        }
Пример #5
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;
 }
Пример #6
0
 public Subject GetSubject(string subjectCode)
 {
     Subject s = new Subject();
     TranslateSubjectBDOToSubject(slogic.GetSubject(subjectCode), s);
     return s;
 }
Пример #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;
        }
Пример #8
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;
        }