Пример #1
0
 /// <summary>
 /// Constructor for Issues
 /// </summary>
 /// <param name="item"></param>
 /// <param name="loc"></param>
 /// <param name="newIssue"></param>
 /// <param name="orderData"></param>
 public ZoneData(NewWhlSku item, LocationData loc, NewIssue newIssue, NewOrder orderData)
 {
     LocationInfo        = loc;
     ItemData            = item;
     IssueData           = newIssue;
     CurrentZoneDataType = ZoneDataType.Issue;
     AmountNeeded        = newIssue.Quantity;
     OrderData           = orderData;
 }
Пример #2
0
 /// <summary>
 /// Constructor for LowLevels
 /// </summary>
 /// <param name="item"></param>
 /// <param name="loc"></param>
 /// <param name="minimumAmount"></param>
 /// <param name="capableAmount"></param>
 public ZoneData(NewWhlSku item, LocationData loc, int minimumAmount, int capableAmount)
 {
     LocationInfo        = loc;
     LocationInfo.Sku    = item.Sku;
     ItemData            = item;
     CurrentZoneDataType = ZoneDataType.LowLevel;
     MaximumInLocation   = capableAmount;
     MinimumInLocation   = minimumAmount;
 }
Пример #3
0
 /// <summary>
 /// Constructor for Orders (Demand)
 /// </summary>
 /// <param name="item"></param>
 /// <param name="loc"></param>
 /// <param name="order"></param>
 public ZoneData(NewWhlSku item, LocationData loc, NewOrder order)
 {
     LocationInfo        = loc;
     ItemData            = item;
     CurrentZoneDataType = ZoneDataType.Demand;
     OrderData           = order;
     try
     {
         AmountNeeded = order.SimpleItemData.First(x => x.Key == item.Sku).Value;
     }
     catch (Exception)
     {
         AmountNeeded = 0;
     }
 }