public ActionResult DeleteConfirmed(int id) { Inventory_Type inventory_Type = db.Inventory_Type.Find(id); db.Inventory_Type.Remove(inventory_Type); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "InventoryType_ID,InventoryType_Name,InventoryType_Description")] Inventory_Type inventory_Type) { if (ModelState.IsValid) { db.Entry(inventory_Type).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(inventory_Type)); }
public ActionResult Create([Bind(Include = "InventoryType_ID,InventoryType_Name,InventoryType_Description")] Inventory_Type inventory_Type) { if (ModelState.IsValid) { db.Inventory_Type.Add(inventory_Type); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(inventory_Type)); }
//public ActionResult Index() //{ // return View(db.Inventory_Type.ToList()); //} // GET: Inventory_Type/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Inventory_Type inventory_Type = db.Inventory_Type.Find(id); if (inventory_Type == null) { return(HttpNotFound()); } return(View(inventory_Type)); }