Beispiel #1
0
 public OutBound(InBound inBound, InOutReason inOutReason, int qty, string note, Users user)
 {
     this.InBound     = inBound;
     this.Product     = inBound.Product;
     this.Warehouse   = inBound.Warehouse;
     this.InOutReason = inOutReason;
     this.Qty         = qty;
     this.Price       = inBound.Price;
     this.Currency    = inBound.Currency;
     this.Note        = note;
     this.User        = user;
     this.CreateDate  = DateTime.Now;
 }
Beispiel #2
0
        //添加出库记录
        public virtual void AddOutBound(InOutReason inOutReason, int qty, string note, Users user)
        {
            if (this.OutBounds == null)
            {
                this.OutBounds = new List <OutBound>();
            }
            //新建入库记录
            OutBound one = new OutBound(this, inOutReason, qty, note, user);
            //新建货架号出库库记录
            InBoundOfShelf shelf = new InBoundOfShelf();

            if (this.InBoundOfShelf != null)
            {
                shelf = this.InBoundOfShelf.OrderBy(s => s.CreateDate).First();
            }
            shelf.AddOutBoundOfShelf(one, qty, note, user.Id);
            //更新现货库存
            shelf.RefreshCurrentQty();
            this.OutBounds.Add(one);
            this.RefreshCurrentQty();
        }
Beispiel #3
0
        public InBound(Product product, Warehouse warehouse, WarehouseShelf warehouseShelf, InOutReason inOutReason, int qty, float price, string currency
                       , string note, Users user
                       )
        {
            this.Product     = product;
            this.Warehouse   = warehouse;
            this.InOutReason = inOutReason;
            this.Qty         = qty;
            this.CurrentQty  = qty;
            this.Price       = price;
            this.Currency    = currency;
            this.Note        = note;
            this.User        = user;
            this.CreateDate  = DateTime.Now;
            InBoundOfShelf one = new InBoundOfShelf(this, warehouseShelf, qty, note, user.Id);

            this.AddInBoundOfShelf(one);
        }