public void AddToMoveBillDetail(MoveBillMaster moveBillMaster, Storage sourceStorage, Storage targetStorage, decimal moveQuantity) { if (moveQuantity > 0) { Locker.LockKey = moveBillMaster.BillNo; MoveBillDetail detail = new MoveBillDetail(); detail.BillNo = moveBillMaster.BillNo; detail.ProductCode = sourceStorage.ProductCode; detail.OutCellCode = sourceStorage.CellCode; detail.OutStorageCode = sourceStorage.StorageCode; detail.InCellCode = targetStorage.CellCode; detail.InStorageCode = targetStorage.StorageCode; detail.UnitCode = sourceStorage.Product.UnitCode; detail.RealQuantity = moveQuantity; detail.Status = "0"; moveBillMaster.MoveBillDetails.Add(detail); sourceStorage.OutFrozenQuantity += moveQuantity; targetStorage.ProductCode = sourceStorage.ProductCode; targetStorage.InFrozenQuantity += moveQuantity; } }
public ActionResult MoveBillDetailEdit(MoveBillDetail moveBillDetail) { string strResult = string.Empty; bool bResult = MoveBillDetailService.Save(moveBillDetail, out strResult); string msg = bResult ? "修改成功" : "修改失败"; return Json(JsonMessageHelper.getJsonMessage(bResult, msg, strResult), "text", JsonRequestBehavior.AllowGet); }