Exemplo n.º 1
0
 public void AddRange(List <OutInOrderItem> items, OutInOrderType orderType)
 {
     foreach (var line in items)
     {
         line.OutInOrderId = this.Id;
         line.SetPlusMinus(orderType);
         if (this.Items.Exists(n => n.ProductId == line.ProductId))
         {
             var first = this.Items.FirstOrDefault(n => n.ProductId == line.ProductId);
             first.Quantity += line.Quantity;
         }
         else
         {
             this.Items.Add(line);
         }
     }
 }
Exemplo n.º 2
0
 public void SetPlusMinus(OutInOrderType orderType)
 {
     this.PlusMinus = (int)orderType.OutInInventory;
 }