Ejemplo n.º 1
0
        public ViewResult CreateAppointment(int id)
        {
            AppointmentViewModel appointment = new AppointmentViewModel();

            appointment.DoctorID = _doctorRepository.GetDoctor(id).DoctorID;
            //parsowanie do int
            appointment.UserID = userManager.GetUserId(User);
            return(View(appointment));
        }
Ejemplo n.º 2
0
        public ViewResult Details(int id)
        {
            HomeDetailsViewModel homeDetailsViewModel = new HomeDetailsViewModel()
            {
                Doctor    = _doctorRepository.GetDoctor(id),
                PageTitle = "Doctor Details"
            };

            return(View(homeDetailsViewModel));
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="doctor"></param>
        /// <returns></returns>
        public DoctorDto DoctorUpdate(Doctor doctor)
        {
            MapperConfig.ConfigAutoMapper();

            if (DocRepo.GetDoctor(doctor.DoctorId) != null)
            {
                doctor.CreatedDate = DocRepo.GetDoctor(doctor.DoctorId).CreatedDate;

                doctor.ModifiedBy = DocRepo.GetDoctor(doctor.DoctorId).ModifiedBy;

                doctor.CreatedBy = DocRepo.GetDoctor(doctor.DoctorId).CreatedBy;

                doctor.ModifiedDate = DateTime.Now;

                {
                    DocRepo.Update(Mapper.Map <Doctor>(doctor));
                }
            }
            else
            {
                throw new ArgumentNullException("Doctor not found!");
            }
            return(null);
        }
Ejemplo n.º 4
0
        public ActionResult Detail(Guid nodeGuid, string nodeAlias)
        {
            var doctor = DoctorRepository.GetDoctor(nodeGuid);

            if (doctor == null)
            {
                return(HttpNotFound());
            }

            // Sets cache dependency on single page based on NodeGUID
            // System clears the cache when given doctor is deleted or edited in Kentico
            Dependencies.CacheService.SetOutputCacheDependency(nodeGuid);

            var model = GetPageViewModel(new DoctorDetailViewModel()
            {
                Doctor = doctor
            }, doctor.FullName);

            return(View(model));
        }
Ejemplo n.º 5
0
 public Doctor ViewProfile(string jmbg)
 {
     return(doctorRepository.GetDoctor(jmbg));
 }