コード例 #1
0
ファイル: StockEntry.cs プロジェクト: CASMPostol/SmartFactory
        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;
            }
        }
コード例 #2
0
ファイル: Material.cs プロジェクト: CASMPostol/SmartFactory
        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;
            }
        }