public ActionResult DeleteConfirmed(int id) { GoodsWh goodsWh = db.GOODS_WH.Find(id); db.GOODS_WH.Remove(goodsWh); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,ID_WH,ID_GOODS,QUANTITY")] GoodsWh goodsWh) { if (ModelState.IsValid) { db.Entry(goodsWh).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(goodsWh)); }
public ActionResult Create([Bind(Include = "ID,ID_WH,ID_GOODS,QUANTITY")] GoodsWh goodsWh) { if (ModelState.IsValid) { db.GOODS_WH.Add(goodsWh); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(goodsWh)); }
// GET: GoodsWhs/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } GoodsWh goodsWh = db.GOODS_WH.Find(id); if (goodsWh == null) { return(HttpNotFound()); } return(View(goodsWh)); }