public ActionResult InventoryDestroy([DataSourceRequest] DataSourceRequest request, Inventory inventory) { BL.InventoryClass blInventoryClass = new BL.InventoryClass(); Inventory model = blInventoryClass.SoftDelete(inventory); return(Json(new[] { model }.ToDataSourceResult(request, ModelState), JsonRequestBehavior.AllowGet)); }
public ActionResult InventorySelectAll([DataSourceRequest] DataSourceRequest request) { BL.InventoryClass blInventoryClass = new BL.InventoryClass(); List <Inventory> model = blInventoryClass.SelectAll(); return(Json(model.ToDataSourceResult(request), JsonRequestBehavior.AllowGet)); }
public ActionResult InventoryCreate([DataSourceRequest] DataSourceRequest request, Inventory inventory) { BL.InventoryClass blInventoryClass = new BL.InventoryClass(); Inventory newItem = new Inventory { InventoryID = inventory.InventoryID, ProductID = inventory.ProductID, ZoneID = inventory.ZoneID, Quantity = inventory.Quantity }; Inventory model = blInventoryClass.Insert(newItem); return(Json(new[] { model }.ToDataSourceResult(request, ModelState), JsonRequestBehavior.AllowGet)); }