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);
            }
        }
 //新增细单
 // 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);
 }