public ActionResult Confirmation(GuestDetailForm model) { if (ModelState.IsValid) { var detail = Session["Detail"] as DetailModel; GuestModel Guest = new GuestModel { FirstName = model.FirstName, LastName = model.LastName, Email = model.Email, Phone = model.Phone, Country = model.Country }; db.Guests.Add(Guest); db.SaveChanges(); detail.Booking.BookingStatus = BookingStatus.NEW; detail.Booking.Paid = false; detail.Booking.GuestId = Guest.GuestId; db.Bookings.Add(detail.Booking); db.SaveChanges(); return RedirectToAction("PayWithPayPal"); } return View(model); }
// // GET: /Booking/ public ActionResult Confirmation() { GuestDetailForm model = new GuestDetailForm(); return View(model); }