public ActionResult Create(BookingReceived bookingreceived) { if (ModelState.IsValid) { db.BookingReceiveds.Add(bookingreceived); db.SaveChanges(); return RedirectToAction("Index"); } ViewBag.HotelDetails = db.HotelDetails.ToList(); ViewBag.AgentDetails = db.AgentDetails.ToList(); ViewBag.ConsultantDetails = db.ConsultantDetails.ToList(); return View(bookingreceived); }
public ActionResult Edit(BookingReceived bookingreceived) { if (ModelState.IsValid) { db.Entry(bookingreceived).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(bookingreceived); }