public PartialViewResult RefreshUndescribedDetails() { var empty = new UndescribedDetails { AppointmentID = 0, Comment = "", Price = 0 }; return(PartialView("_UndescribedDetails", empty)); }
public ActionResult UndescribedAppointments() { var undescribed = GetUndescribed(CurrentUserInfo.id); var empty = new UndescribedDetails { AppointmentID = 0, Comment = "", Price = 0 }; var model = new UndescribedViewModel { Undescribed = undescribed, Details = empty }; return(View(model)); }
public PartialViewResult DescribeAppointment(UndescribedDetails model) { if (ModelState.IsValid) { _IAppointmentsRepository.EditAppointment(new Appointment { id = model.AppointmentID, comment = model.Comment, price = model.Price }); TempData["Success"] = "Pomyślnie opisano wizytę."; } else { TempData["Warning"] = "Wystąpił błąd przy opisywaniu wizyty. Spróbuj jeszcze raz."; } var undescribed = GetUndescribed(CurrentUserInfo.id); return(PartialView("_undescribedList", undescribed)); }