public ActionResult DeleteConfirmed(int id) { MOVE_ORDERS mOVE_ORDERS = db.MOVE_ORDERS.Find(id); db.MOVE_ORDERS.Remove(mOVE_ORDERS); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "MOVE_ORDER_ID,MOVE_ORDER_NUMBER,ITEM_ID,PRICE,QUANTITY,STORE_ID,STOCK_ID")] MOVE_ORDERS mOVE_ORDERS) { if (ModelState.IsValid) { db.Entry(mOVE_ORDERS).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ITEM_ID = new SelectList(db.ITEMS, "ITEM_ID", "ITEM_DESRIPTION", mOVE_ORDERS.ITEM_ID); ViewBag.STOCK_ID = new SelectList(db.STOCKS, "STOCK_ID", "ADDRESS", mOVE_ORDERS.STOCK_ID); ViewBag.STORE_ID = new SelectList(db.STORE, "STORE_ID", "STORE_NAME", mOVE_ORDERS.STORE_ID); return(View(mOVE_ORDERS)); }
// GET: MOVE_ORDERS/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MOVE_ORDERS mOVE_ORDERS = db.MOVE_ORDERS.Find(id); if (mOVE_ORDERS == null) { return(HttpNotFound()); } return(View(mOVE_ORDERS)); }
// GET: MOVE_ORDERS/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MOVE_ORDERS mOVE_ORDERS = db.MOVE_ORDERS.Find(id); if (mOVE_ORDERS == null) { return(HttpNotFound()); } ViewBag.ITEM_ID = new SelectList(db.ITEMS, "ITEM_ID", "ITEM_DESRIPTION", mOVE_ORDERS.ITEM_ID); ViewBag.STOCK_ID = new SelectList(db.STOCKS, "STOCK_ID", "ADDRESS", mOVE_ORDERS.STOCK_ID); ViewBag.STORE_ID = new SelectList(db.STORE, "STORE_ID", "STORE_NAME", mOVE_ORDERS.STORE_ID); return(View(mOVE_ORDERS)); }