Exemplo n.º 1
0
        public static DeliveryVoucher Create(Guid departmentID, Guid customerID, string creater)
        {
            DeliveryVoucher newdeliveryVoucher = new DeliveryVoucher();

            newdeliveryVoucher.State        = DeliveryVoucherState.Unconfirmed;
            newdeliveryVoucher.Creater      = creater;
            newdeliveryVoucher.CreateTime   = DateTime.Now;
            newdeliveryVoucher.DepartmentID = departmentID;
            newdeliveryVoucher.CustomerID   = customerID;
            newdeliveryVoucher.SubmitUser   = "";
            return(newdeliveryVoucher);
        }
Exemplo n.º 2
0
 public static DeliveryVoucher Create(Guid departmentID, Guid customerID, string creater)
 {
     DeliveryVoucher newdeliveryVoucher = new DeliveryVoucher();
     newdeliveryVoucher.State = DeliveryVoucherState.Unconfirmed;
     newdeliveryVoucher.Creater = creater;
     newdeliveryVoucher.CreateTime = DateTime.Now;
     newdeliveryVoucher.DepartmentID = departmentID;
     newdeliveryVoucher.CustomerID = customerID;
     newdeliveryVoucher.SubmitUser = "";
     return newdeliveryVoucher;
 }
Exemplo n.º 3
0
 public void UpdateStock(DeliveryVoucher voucher)
 {
     if (voucher.State == DeliveryVoucherState.Confirmed)
     {
         foreach (DeliveryVoucherItem item in voucher.Items)
         {
             StockOut(voucher.DepartmentID, item.ProductSkuInfo.SkuID, item.Quantity, item.Weight, item.PositionID, item.ProductNumber);
         }
     }
 }