Пример #1
0
        public void Sampling()
        {
            foreach (CreditCardInformation card in CreditCards)
            {
                if (!string.IsNullOrEmpty(card.CreditCardNo))
                {
                    GridCreditCardTransaction data = new GridCreditCardTransaction();
                    data.CreditCardNo   = card.CreditCardNo;
                    data.CardholderName = card.CardholderName;

                    double?NegativeAmount = 0.0;
                    double?PositiveAmount = 0.0;

                    foreach (CreditCardTransaction trx in Transactions)
                    {
                        if (trx.CreditCardNo == card.CreditCardNo)
                        {
                            if (CCTransaction.HistoricalTransactionCodesForNegativeAmount.Contains(trx.TransactionCode))
                            {
                                NegativeAmount += trx.Amount;
                            }
                            else
                            {
                                PositiveAmount += trx.Amount;
                            }
                            data.Trx.Add(trx);
                        }
                    }

                    data.SubTotal = PositiveAmount - NegativeAmount;
                    TransactionData.Add(data);
                }
            }
        }
Пример #2
0
        public void CompletingInformation(CreditCardRetrieveMultipleStatementDate statement)
        {
            Information.Name           = statement.Name;
            Information.Address        = statement.Address1 + " " + statement.Address2;
            Information.MinimumPayment = statement.MinimumPayment;
            Information.NewBalance     = 0.0;

            foreach (CreditCardInformation card in CreditCards)
            {
                if (!string.IsNullOrEmpty(card.CreditCardNo))
                {
                    GridCreditCardTransaction data = new GridCreditCardTransaction();
                    data.CreditCardNo   = card.CreditCardNo;
                    data.CardholderName = card.CardholderName;

                    double?NegativeAmount  = 0.0;
                    double?PositiveAmount  = 0.0;
                    double?PreviousBalance = 0.0;

                    foreach (CreditCardTransaction trx in Transactions)
                    {
                        if (trx.CreditCardNo == card.CreditCardNo)
                        {
                            if (CCTransaction.HistoricalTransactionCodesForNegativeAmount.Contains(trx.TransactionCode))
                            {
                                NegativeAmount += trx.Amount;
                            }
                            else
                            {
                                PositiveAmount += trx.Amount;
                            }
                            PreviousBalance += trx.PreviousBalance;
                            if (!"INTEREST".Equals(trx.Description))
                            {
                                data.Trx.Add(trx);
                            }
                        }
                    }
                    data.PreviousBalance = PreviousBalance;
                    data.SubTotal        = PositiveAmount - NegativeAmount + PreviousBalance;
                    TransactionData.Add(data);
                    Information.NewBalance += data.SubTotal;
                }
            }
            Information.NewBill = Information.NewBalance - (Information.OldBalance + Information.Credit);
        }
Пример #3
0
        public void Sampling()
        {
            foreach (CreditCardInformation card in CreditCards)
            {
                if (!string.IsNullOrEmpty(card.CreditCardNo))
                {
                    GridCreditCardTransaction data = new GridCreditCardTransaction();
                    data.CreditCardNo    = card.CreditCardNo;
                    data.CardholderName  = card.CardholderName;
                    data.AvailableCredit = card.AvailableCredit;

                    foreach (CreditCardTransaction trx in Transactions)
                    {
                        if (trx.CreditCardNo == card.CreditCardNo)
                        {
                            card.SubTotal += trx.Nominal;
                            data.Trx.Add(trx);
                        }
                    }
                    TransactionData.Add(data);
                }
            }
        }