コード例 #1
0
        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);
        }
コード例 #2
0
        public ActionResult Edit(BookingReceived bookingreceived)
        {
            if (ModelState.IsValid)
            {

                db.Entry(bookingreceived).State = EntityState.Modified;
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(bookingreceived);
        }