public JsonResult RemoveReceiptDetail(int id) { var item = InventoryReceiptDetail.Find(id); using (var scope = new TransactionScope()) { item.DeleteAndFlush(); } return(Json(new { id = id, result = true })); }
public JsonResult EditReceiptDetailQuantity(int id, decimal value) { var detail = InventoryReceiptDetail.Find(id); if (value >= 0) { detail.Quantity = value; using (var scope = new TransactionScope()) { detail.UpdateAndFlush(); } } return(Json(new { id = id, value = detail.Quantity })); }
public ActionResult GetReceiptItem(int id) { return(PartialView("Receipts/_DetailEditView", InventoryReceiptDetail.Find(id))); }