Пример #1
0
 public bool IsChange(BatchIndex batchIndex)
 {
     return(this.BatchID != batchIndex.BatchID || this.BatchCode != batchIndex.BatchCode || this.EntryMonthID != batchIndex.EntryMonthID || this.CommodityID != batchIndex.CommodityID || this.AutoCarton != batchIndex.AutoCarton ||
            this.NextPackNo != batchIndex.NextPackNo || this.NextCartonNo != batchIndex.NextCartonNo || this.NextPalletNo != batchIndex.NextPalletNo ||
            this.SentPackNo != batchIndex.SentPackNo || this.SentCartonNo != batchIndex.SentCartonNo || this.SentPalletNo != batchIndex.SentPalletNo);
     //|| this.BatchPackNo != batchIndex.BatchPackNo || this.BatchCartonNo != batchIndex.BatchCartonNo || this.BatchPalletNo != batchIndex.BatchPalletNo
 }
Пример #2
0
        private int Compare(BatchMessageId m)
        {
            var ledgercompare = LedgerId.CompareTo(m.LedgerId);

            if (ledgercompare != 0)
            {
                return(ledgercompare);
            }

            var entryCompare = EntryId.CompareTo(m.EntryId);

            if (entryCompare != 0)
            {
                return(entryCompare);
            }

            var batchCompare = BatchIndex.CompareTo(m.BatchIndex);

            if (batchCompare != 0)
            {
                return(batchCompare);
            }

            var partitionCompare = PartitionIndex.CompareTo(m.PartitionIndex);

            if (partitionCompare != 0)
            {
                return(partitionCompare);
            }

            return(0);
        }
Пример #3
0
        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;
            }
        }
Пример #4
0
        private void fastBatchIndex_FormatRow(object sender, FormatRowEventArgs e)
        {
            BatchIndex batchIndex = (BatchIndex)e.Model;

            if (batchIndex.InActive)
            {
                e.Item.ForeColor = Color.Gray;
            }
        }
Пример #5
0
        public BatchIndex GetActiveBatchIndex()
        {
            BatchIndex goodsReceiptIndexes = this.GetBatchIndexes(GlobalEnums.ActiveOption.Active).Where(w => w.IsDefault).FirstOrDefault();

            return(goodsReceiptIndexes);
        }
Пример #6
0
        public BatchIndex GetBatchByID(int batchID)
        {
            BatchIndex goodsReceiptIndexes = this.GetBatchIndexes(batchID, false, GlobalEnums.ActiveOption.Both, false).FirstOrDefault();

            return(goodsReceiptIndexes);
        }