public async Task <ActionResult> Review(string appointmentId) { var model = new ReviewProcedureInputModel() { Appointment = await this.appointmentsService.GetByIdAsync <AppointmentViewModel>(appointmentId), }; return(this.View(model)); }
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 })); }