public ActionResult DeleteConfirmed(int accessoireId) { if (AccessoireRepo.DeleteAccessoire(accessoireId)) { return(RedirectToAction("Index")); } return(View(AccessoireRepo.GetAccessoire(accessoireId))); }
public ActionResult Delete(int accessoireId) { var VM = new AccessoireVM() { Accessoire = AccessoireRepo.GetAccessoire(accessoireId), Animals = AnimalRepo.GetAnimals() }; return(View(VM)); }
public ActionResult Edit(AccessoireVM VM) { VM.Accessoire.Animal = VM.AnimalId; if (AccessoireRepo.EditAccessoire(VM.Accessoire)) { return(RedirectToAction("Index")); } VM.Animals = AnimalRepo.GetAnimals(); return(View(VM)); }
public ActionResult SecondStep(BookingVM bookingVM) { var tempBooking = (BookingVM)TempData["Booking"]; if (bookingVM.AccessoireIds != null) { foreach (var accessoireId in bookingVM.AccessoireIds) { tempBooking.Booking.Accessoires.Add(AccessoireRepo.GetAccessoire(accessoireId)); } } tempBooking.AccessoireIds = bookingVM.AccessoireIds; TempData["Booking"] = tempBooking; return(RedirectToAction("ThirdStep")); }
public ActionResult Index() { return(View(AccessoireRepo.GetAccessoires())); }