コード例 #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));
        }
コード例 #2
0
        public ViewResult Details(int id)
        {
            HomeDetailsViewModel homeDetailsViewModel = new HomeDetailsViewModel()
            {
                Doctor    = _doctorRepository.GetDoctor(id),
                PageTitle = "Doctor Details"
            };

            return(View(homeDetailsViewModel));
        }
コード例 #3
0
        /// <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);
        }
コード例 #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));
        }
コード例 #5
0
 public Doctor ViewProfile(string jmbg)
 {
     return(doctorRepository.GetDoctor(jmbg));
 }