public ActionResult DeleteConfirmed(int id) { GUEST_SHOPS gUEST_SHOPS = db.GUEST_SHOPS.Find(id); db.GUEST_SHOPS.Remove(gUEST_SHOPS); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "GuestID,ProductID,TransactionID,Quantity,TransactionDate")] GUEST_SHOPS gUEST_SHOPS) { if (ModelState.IsValid) { db.Entry(gUEST_SHOPS).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.GuestID = new SelectList(db.GUESTs, "GuestID", "FirstName", gUEST_SHOPS.GuestID); ViewBag.ProductID = new SelectList(db.INVENTORies, "ProductID", "ProductName", gUEST_SHOPS.ProductID); return(View(gUEST_SHOPS)); }
// GET: Guest_Shops/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } GUEST_SHOPS gUEST_SHOPS = db.GUEST_SHOPS.Find(id); if (gUEST_SHOPS == null) { return(HttpNotFound()); } return(View(gUEST_SHOPS)); }
// GET: Guest_Shops/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } GUEST_SHOPS gUEST_SHOPS = db.GUEST_SHOPS.Find(id); if (gUEST_SHOPS == null) { return(HttpNotFound()); } ViewBag.GuestID = new SelectList(db.GUESTs, "GuestID", "FirstName", gUEST_SHOPS.GuestID); ViewBag.ProductID = new SelectList(db.INVENTORies, "ProductID", "ProductName", gUEST_SHOPS.ProductID); return(View(gUEST_SHOPS)); }