Ejemplo n.º 1
0
        public void AddToOutBillDetail(OutBillMaster outBillMaster, Product  product,decimal price, decimal quantity)
        {
            if (quantity > 0)
            {
                Locker.LockKey = outBillMaster.BillNo;
                OutBillDetail detail = new OutBillDetail();

                detail.BillNo = outBillMaster.BillNo;
                detail.ProductCode = product.ProductCode;
                detail.UnitCode = product.UnitCode;
                detail.Price = price;
                detail.BillQuantity = quantity;
                detail.AllotQuantity = 0;
                detail.RealQuantity = 0;

                outBillMaster.OutBillDetails.Add(detail);
            }
        }
Ejemplo n.º 2
0
 //新增细单
 // POST: /StockOutBill/OutBillDetailCreate/
 public ActionResult OutBillDetailCreate(OutBillDetail outBillDetail)
 {
     string errorInfo = string.Empty;
     bool bResult = OutBillDetailService.Add(outBillDetail, out errorInfo);
     string msg = bResult ? "新增成功" : "新增失败";
     return Json(JsonMessageHelper.getJsonMessage(bResult, msg, errorInfo), "text", JsonRequestBehavior.AllowGet);
 }