Exemple #1
0
 internal void GetInventory(Entities edc, Balance.StockDictionary balanceStock)
 {
     foreach (StockEntry _sex in this.StockEntry(edc))
     {
         _sex.GetInventory(edc, balanceStock);
     }
 }
        internal void GetInventory(Entities edc, Balance.StockDictionary balanceStock)
        {
            switch (ProductType.Value)
            {
            case Linq.ProductType.Cutfiller:
                if (IPRType.Value && BatchIndex != null)
                {
                    BatchIndex.GetInventory(edc, balanceStock, Balance.StockDictionary.StockValueKey.TobaccoInCutfillerWarehouse, this.Quantity.Value);
                }
                break;

            case Linq.ProductType.Cigarette:
                if (IPRType.Value && BatchIndex != null)
                {
                    BatchIndex.GetInventory(edc, balanceStock, Balance.StockDictionary.StockValueKey.TobaccoInCigarettesProduction, this.Quantity.Value);
                }
                break;

            case Linq.ProductType.IPRTobacco:
                balanceStock.Sum(this.Quantity.Value, this.Batch, Balance.StockDictionary.StockValueKey.TobaccoInWarehouse);
                break;

            case Linq.ProductType.Tobacco:
            case Linq.ProductType.Other:
                break;
            }
        }
Exemple #3
0
        internal void GetInventory(Balance.StockDictionary balanceStock, Balance.StockDictionary.StockValueKey key, double portion)
        {
            switch (this.ProductType.Value)
            {
            case Linq.ProductType.Cutfiller:
            case Linq.ProductType.Cigarette:
            case Linq.ProductType.Tobacco:
            case Linq.ProductType.Other:
                break;

            case Linq.ProductType.IPRTobacco:
                balanceStock.Sum(Convert.ToDecimal(this.TobaccoQuantity * portion), this.Batch, key);
                break;
            }
        }