Exemplo n.º 1
0
 //新增主单
 // POST: /StockOutBill/Create/
 public ActionResult Create(OutBillMaster outBillMaster)
 {
     string errorInfo = string.Empty;
     bool bResult = OutBillMasterService.Add(outBillMaster, this.User.Identity.Name.ToString(), out errorInfo);
     string msg = bResult ? "新增成功" : "新增失败";
     return Json(JsonMessageHelper.getJsonMessage(bResult, msg, errorInfo), "text", JsonRequestBehavior.AllowGet);
 }
Exemplo n.º 2
0
 public OutBillMaster CreateOutBillMaster(string warehouseCode, string billTypeCode, string operatePersonID)
 {
     //添加移库单主单
     string billNo = CreateOutBillNo();
     OutBillMaster outBillMaster = new OutBillMaster();
     outBillMaster.BillNo = billNo;
     outBillMaster.BillDate = DateTime.Now;
     outBillMaster.BillTypeCode = billTypeCode;
     outBillMaster.Origin = "1";
     outBillMaster.WarehouseCode = warehouseCode;
     outBillMaster.OperatePersonID = Guid.Parse(operatePersonID);
     outBillMaster.Status = "1";            ;
     outBillMaster.IsActive = "1";
     outBillMaster.UpdateTime = DateTime.Now;
     OutBillMasterRepository.Add(outBillMaster);
     return outBillMaster;
 }
Exemplo n.º 3
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);
            }
        }
Exemplo n.º 4
0
 //修改主单
 // POST: /StockOutBill/Edit/
 public ActionResult Edit(OutBillMaster outBillMaster)
 {
     string errorInfo = string.Empty;
     bool bResult = OutBillMasterService.Save(outBillMaster, out errorInfo);
     string msg = bResult ? "修改成功" : "修改失败";
     return Json(JsonMessageHelper.getJsonMessage(bResult, msg, errorInfo), "text", JsonRequestBehavior.AllowGet);
 }