Beispiel #1
0
 public void TranslateTimeslotDTOToTimeslotBDo(Timeslot timeslot, TimeslotBDO tBDO)
 {
     tBDO.TimeSlotCode = timeslot.TimeSlotCode;
     tBDO.TimeStart = timeslot.TimeStart;
     tBDO.TimeEnd = timeslot.TimeEnd;
     tBDO.Days = timeslot.Days;
 }
Beispiel #2
0
 public Boolean CreateTimeslot(ref Timeslot timeslot, ref string message)
 {
     message = String.Empty;
     TimeslotBDO tbdo = new TimeslotBDO();
     TranslateTimeslotDTOToTimeslotBDo(timeslot, tbdo);
     return timeslotLogic.CreateTimeslot(ref tbdo, ref message);
 }
Beispiel #3
0
 public void TranslateTimeslotBDOToTimeslotDTo(TimeslotBDO tBDO, Timeslot timeslot)
 {
     timeslot.TimeSlotCode = tBDO.TimeSlotCode;
     timeslot.TimeStart = tBDO.TimeStart;
     timeslot.TimeEnd = tBDO.TimeEnd;
     timeslot.Days = tBDO.Days;
 }
 public Boolean UpdateTimeslot(ref Timeslot timeslot, ref string message)
 {
     message = String.Empty;
     TimeslotBDO tBDO = new TimeslotBDO();
     TranslateTimeslotDTOToTimeslotBDo(timeslot, tBDO);
     return timeslotLogic.UpdateTimeslot(ref tBDO, ref message);
 }
Beispiel #5
0
        public Boolean UpdateTimeslot(ref Timeslot timeslot, ref string message)
        {
            message = String.Empty;
            TimeslotBDO tBDO = new TimeslotBDO();

            TranslateTimeslotDTOToTimeslotBDo(timeslot, tBDO);
            return(timeslotLogic.UpdateTimeslot(ref tBDO, ref message));
        }
Beispiel #6
0
        public Boolean CreateTimeslot(ref Timeslot timeslot, ref string message)
        {
            message = String.Empty;
            TimeslotBDO tbdo = new TimeslotBDO();

            TranslateTimeslotDTOToTimeslotBDo(timeslot, tbdo);
            return(timeslotLogic.CreateTimeslot(ref tbdo, ref message));
        }
Beispiel #7
0
 public void TranslateTimeslotBDOToTimeslotDTo(TimeslotBDO tBDO, Timeslot timeslot)
 {
     timeslot.TimeSlotCode = tBDO.TimeSlotCode;
     timeslot.TimeStart = tBDO.TimeStart;
     timeslot.TimeEnd = tBDO.TimeEnd;
     timeslot.Days = tBDO.Days;
     timeslot.TotalMins = tBDO.TotalMins;
     timeslot.TimeSlotInfo= tBDO.Days + " " + tBDO.TimeStart + "-" + tBDO.TimeEnd;
 }
Beispiel #8
0
        public Timeslot GetTimeslot(string timeslotCode)
        {
            TimeslotBDO tbdo = new TimeslotBDO();
            tbdo = timeslotLogic.GetTimeslot(timeslotCode);
            Timeslot t = new Timeslot();
            TranslateTimeslotBDOToTimeslotDTo(tbdo, t);

            return t;
        }
Beispiel #9
0
        public Timeslot GetTimeslot(string timeslotCode)
        {
            TimeslotBDO tbdo = new TimeslotBDO();

            tbdo = timeslotLogic.GetTimeslot(timeslotCode);
            Timeslot t = new Timeslot();

            TranslateTimeslotBDOToTimeslotDTo(tbdo, t);

            return(t);
        }
Beispiel #10
0
 public List<Timeslot> GetAllTimeslots()
 {
     List<TimeslotBDO> tBDOList = timeslotLogic.GetAllTimeslots();
     List<Timeslot> allTimeslot = new List<Timeslot>();
     foreach (TimeslotBDO tBDO in tBDOList)
     {
         Timeslot t = new Timeslot();
         TranslateTimeslotBDOToTimeslotDTo(tBDO, t);
         allTimeslot.Add(t);
     }
     return allTimeslot;
 }
Beispiel #11
0
        public List <Timeslot> GetAllTimeslots()
        {
            List <TimeslotBDO> tBDOList    = timeslotLogic.GetAllTimeslots();
            List <Timeslot>    allTimeslot = new List <Timeslot>();

            foreach (TimeslotBDO tBDO in tBDOList)
            {
                Timeslot t = new Timeslot();
                TranslateTimeslotBDOToTimeslotDTo(tBDO, t);
                allTimeslot.Add(t);
            }
            return(allTimeslot);
        }
        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;
        }