コード例 #1
0
        public async Task <ActionResult> Review(string appointmentId)
        {
            var model = new ReviewProcedureInputModel()
            {
                Appointment = await this.appointmentsService.GetByIdAsync <AppointmentViewModel>(appointmentId),
            };

            return(this.View(model));
        }
コード例 #2
0
        public async Task <ActionResult> Review(ReviewProcedureInputModel input)
        {
            if (!this.ModelState.IsValid)
            {
                input.Appointment = await
                                    this.appointmentsService.GetByIdAsync <AppointmentViewModel>(input.AppoitmentId);

                return(this.View(input));
            }

            await this.proceduresService.AddProcedureReviewsAsync(input.AppoitmentId, input.Content, input.Points);

            this.TempData["InfoMessage"] = GlobalMessages.SuccessCreateMessage;

            return(this.RedirectToAction("GetUsersHistory", "Appointments", new { Id = input.AppoitmentId }));
        }