Ejemplo n.º 1
0
        public Secretary GetEager(UserID id)
        {
            var secretary  = GetByID(id);
            var timetables = _timeTableRepository.GetAll();

            secretary.TimeTable = GetTimeTableById(secretary.TimeTable, timetables);
            var hospitals = _hospitalRepository.GetAll();

            secretary.Hospital = GetHospitalById(secretary.Hospital, hospitals);
            return(secretary);
        }
Ejemplo n.º 2
0
        public Manager GetEager(UserID id)
        {
            var manager = GetByID(id);

            var timetables = _timeTableRepository.GetAll();

            manager.TimeTable = GetTimeTableById(manager.TimeTable, timetables);

            var hospitals = _hospitalRepository.GetAll();

            manager.Hospital = GetHospitalById(manager.Hospital, hospitals);

            return(manager);
        }
Ejemplo n.º 3
0
        public IList <TimeTableModel> GetAllTimetables()
        {
            IList <TimeTableEntity> timetables = timeTableRepository.GetAll();

            return(timetables.Select(x => new TimeTableModel(x.Id, x.Day, new ClassModel(x.Class.Id)
                                                             , new SubjectModel(x.Subject.Id, x.Subject.Name))).ToList());
        }
Ejemplo n.º 4
0
        public Doctor GetEager(UserID id)
        {
            var doctor = GetByID(id);

            var hospitals = _hospitalRepository.GetAll();

            doctor.Hospital = GetHospitalById(doctor.Hospital, hospitals);

            var timetables = _timeTableRepository.GetAll();

            doctor.TimeTable = GetTimeTableById(doctor.TimeTable, timetables);

            var rooms = _roomRepository.GetAll();

            doctor.Office = GetOfficeById(doctor.Office, rooms);

            return(doctor);
        }
Ejemplo n.º 5
0
 public IEnumerable <TimeTable> GetTimeTables()
 {
     return(_timeTableRepository.GetAll());
 }