示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            GoodsWh goodsWh = db.GOODS_WH.Find(id);

            db.GOODS_WH.Remove(goodsWh);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 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));
 }
示例#3
0
        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));
        }
示例#4
0
        // 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));
        }