public ActionResult Create(BookingVm bookingvm) { if (ModelState.IsValid) { var bookingBo = new BookingBo() { BookId = bookingvm.BookId, Customer = bookingvm.Customer, Email = "*****@*****.**" }; try { bookingServiceClient.AddBooking(bookingBo); } catch (FaultException ex) { ModelState.AddModelError(string.Empty, ex.Message); return View(bookingvm); } return RedirectToAction("Index", "Book"); } return View(bookingvm); }
// // GET: /Booking/Delete/5 public ActionResult Delete(int id) { // TODO find it BookingVm book = new BookingVm() { BookId = id, Customer = "To Delete" }; return View(book); }
// // GET: /Booking/Create public ActionResult Create(int id) { var booking = new BookingVm() { BookId = id }; return View(booking); }