public ActionResult DeleteConfirmed(int id)
        {
            Inventory_List inventory_List = db.Inventory_Lists.Find(id);

            db.Inventory_Lists.Remove(inventory_List);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Item_id,Item_Code,Invent_Type,Item_Description,Pref_Vendor,Reorder_Point_Min,Reorder_Point_Max,Quantity_on_Hand,Quantity_on_Order,Quantity_on_Available,Mark_up_Level,Cost")] Inventory_List inventory_List)
 {
     if (ModelState.IsValid)
     {
         db.Entry(inventory_List).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(inventory_List));
 }
예제 #3
0
    public override void Set(ScriptableObject obj)
    {
        items = new List <Item_Base>();
        Inventory_List list = obj as Inventory_List;

        if (list == null)
        {
            return;
        }
        foreach (var item in list.items)
        {
            items.Add(item);
        }
    }
        // GET: Inventory_List/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Inventory_List inventory_List = db.Inventory_Lists.Find(id);

            if (inventory_List == null)
            {
                return(HttpNotFound());
            }
            return(View(inventory_List));
        }