예제 #1
0
        public ActionResult DeleteConfirmed(string id)
        {
            Package_Booking package_Booking = db.Package_Booking.Find(id);

            db.Package_Booking.Remove(package_Booking);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "PACKAGEID,CUSTOMERID,BOOKING_DATE")] Package_Booking package_Booking)
 {
     if (ModelState.IsValid)
     {
         db.Entry(package_Booking).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CUSTOMERID = new SelectList(db.Customers, "CUSTOMERID", "NAME", package_Booking.CUSTOMERID);
     ViewBag.PACKAGEID  = new SelectList(db.Packages, "PACKAGEID", "PRICE", package_Booking.PACKAGEID);
     return(View(package_Booking));
 }
예제 #3
0
        // GET: Package_Booking/Details/5
        public ActionResult Details(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Package_Booking package_Booking = db.Package_Booking.Find(id);

            if (package_Booking == null)
            {
                return(HttpNotFound());
            }
            return(View(package_Booking));
        }
예제 #4
0
        // GET: Package_Booking/Edit/5
        public ActionResult Edit(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Package_Booking package_Booking = db.Package_Booking.Find(id);

            if (package_Booking == null)
            {
                return(HttpNotFound());
            }
            ViewBag.CUSTOMERID = new SelectList(db.Customers, "CUSTOMERID", "NAME", package_Booking.CUSTOMERID);
            ViewBag.PACKAGEID  = new SelectList(db.Packages, "PACKAGEID", "PRICE", package_Booking.PACKAGEID);
            return(View(package_Booking));
        }