public JsonResult RemoveTransferDetail(int id) { var item = InventoryTransferDetail.Find(id); using (var scope = new TransactionScope()) { item.DeleteAndFlush(); } return(Json(new { id = id, result = true })); }
public JsonResult EditTransferDetailQuantity(int id, decimal value) { var detail = InventoryTransferDetail.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 GetTransferItem(int id) { return(PartialView("Transfers/_DetailEditView", InventoryTransferDetail.Find(id))); }