//添加货架入库记录 public virtual void AddInBoundOfShelf(InBoundOfShelf inBoundOfShelf) { if (InBoundOfShelf == null) { InBoundOfShelf = new List <InBoundOfShelf>(); } InBoundOfShelf.Add(inBoundOfShelf); }
public OutBoundOfShelf(InBoundOfShelf inBoundOfShelf, OutBound outBound, int qty, string note, string createUserId) { this.OutBound = outBound; this.InBoundOfShelf = inBoundOfShelf; this.WarehouseShelf = inBoundOfShelf.WarehouseShelf; this.Qty = qty; this.Note = note; this.CreateUserId = createUserId; this.CreateDate = DateTime.Now; }
public InBound(Product product, Warehouse warehouse, WarehouseShelf warehouseShelf, int qty, float price, string currency , string note, int createUserId ) { this.Product = product; this.Warehouse = warehouse; this.Qty = qty; this.CurrentQty = qty; this.Price = price; this.Currency = currency; this.Note = note; this.CreateUserId = createUserId; this.CreateDate = DateTime.Now; InBoundOfShelf one = new InBoundOfShelf(this, warehouseShelf, qty, note, createUserId); this.AddInBoundOfShelf(one); }
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); }
//添加出库记录 public virtual void AddOutBound(int qty, float price, string note, int createUserId, int inboundShelfId) { if (this.OutBounds == null) { this.OutBounds = new List <OutBound>(); } OutBound one = new OutBound(this, qty, price, null, note, createUserId); InBoundOfShelf shelf = new InBoundOfShelf(); if (this.InBoundOfShelf != null) { shelf = this.InBoundOfShelf.Where(e => e.Id == inboundShelfId).First(); } shelf.AddOutBoundOfShelf(one, qty, note, createUserId); shelf.RefreshCurrentQty(); this.OutBounds.Add(one); this.RefreshCurrentQty(); }
//添加出库记录 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(); }