Beispiel #1
0
        public IActionResult All(IndexViewModel model)
        {
            var viewModel = new AllDoctorViewModel()
            {
                Doctors = this.doctorsService.GetFilteredDoctors <DoctorViewModelForAll>(model),
            };

            return(this.View(viewModel));
        }
Beispiel #2
0
        public IActionResult All(int id = 1)
        {
            id = id <= 0 ? 1 : id;
            var viewModel = new AllDoctorViewModel()
            {
                ItemsPerPage = ItemsPerPage,
                PageNumber   = id,
                DoctorsCount = this.doctorsService.GetDoctorsCount(),
                Doctors      = this.doctorsService.GetAll <DoctorViewModelForAll>(id, ItemsPerPage),
            };

            return(this.View(viewModel));
        }
Beispiel #3
0
        public IActionResult AllNearPatient(int id = 1)
        {
            var patient = this.patientsService.GetPatientByUserId(this.User.FindFirst(ClaimTypes.NameIdentifier).Value);
            var doctors =
                this.doctorsService.GetAllDoctorsNearPatient <DoctorViewModelForAll>(id, ItemsPerPage, patient.Town);
            var viewModel = new AllDoctorViewModel()
            {
                ItemsPerPage = ItemsPerPage,
                PageNumber   = id,
                DoctorsCount = doctors.Count(),
                Doctors      = doctors,
                Towns        = this.townsService.GetAllTowns <TownWithCoordinatesViewModel>(),
            };

            return(this.View(viewModel));
        }