public ActionResult Create() { DoctorHospitalViewModel viewModel = new DoctorHospitalViewModel { Hospitals = hospitalRepository.GetAll() }; return(View(viewModel)); }
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); }
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); }
public void UpdateListBox1() { repository = new HospitalRepository(); listBox1.Items.Clear(); foreach (Doctor doctor in repository.GetAll()) { listBox1.Items.Add(doctor); } }
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); }
public List <HospitalDTO> GetAllHospitals() { try { List <HospitalDTO> hospitalDTOList = new List <HospitalDTO>(); IEnumerable <Hospital> hospitalDTO = _hospitalRepository.GetAll(); foreach (var hospital in hospitalDTO) { var objhospitalDTO = ConvertTODTO(hospital); hospitalDTOList.Add(objhospitalDTO); } return(hospitalDTOList); } catch (Exception ex) { log.ErrorFormat("Exception occured while retreiving list of Hospital Details Info Ex:{0}", ex.Message); return(null); } }
public async Task <IActionResult> GetAll([FromServices] IHospitalRepository repository) { var result = await repository.GetAll(); return(Ok(_mapper.Map <IEnumerable <HospitalViewModel> >(result))); }
public IEnumerable <Hospital> GetAll() { return(_hospitalRepository.GetAll()); }
public async Task <IEnumerable <Hospital> > GetAll() { var response = await _hospitalRepository.GetAll(); return(response); }