public ActionResult DeleteConfirmed(int id) { Inv_ProductInventory inv_productinventory = db.Inv_ProductInventory.Find(id); db.Inv_ProductInventory.Remove(inv_productinventory); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Inv_ProductInventoryId,Inv_OrdersId,Inv_ProductId,QuantityStock,AleartMinStock,InventoryDate,Note,CreatedDate,UpdateDate,IsActive,IsDeleted,CompanyId,UserId")] Inv_ProductInventory inv_productinventory) { if (ModelState.IsValid) { db.Entry(inv_productinventory).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Inv_OrdersId = new SelectList(db.Inv_Orders, "Inv_OrdersId", "OrderDetails", inv_productinventory.Inv_OrdersId); return(View(inv_productinventory)); }
// GET: /ProductInventory/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Inv_ProductInventory inv_productinventory = db.Inv_ProductInventory.Find(id); if (inv_productinventory == null) { return(HttpNotFound()); } return(View(inv_productinventory)); }
// GET: /ProductInventory/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Inv_ProductInventory inv_productinventory = db.Inv_ProductInventory.Find(id); if (inv_productinventory == null) { return(HttpNotFound()); } ViewBag.Inv_OrdersId = new SelectList(db.Inv_Orders, "Inv_OrdersId", "OrderDetails", inv_productinventory.Inv_OrdersId); return(View(inv_productinventory)); }