Esempio n. 1
0
 public bool Equals(BankLedgerItem bankLedgerItem)
 {
     return(bankLedgerItem != null &&
            bankLedgerItem.TransactionID == TransactionID &&
            bankLedgerItem.PostingDate == PostingDate &&
            bankLedgerItem.EffectiveDate == EffectiveDate &&
            bankLedgerItem.TransactionType == TransactionType &&
            bankLedgerItem.Amount == Amount &&
            bankLedgerItem.CheckNumber == CheckNumber &&
            bankLedgerItem.ReferenceNumber == ReferenceNumber &&
            bankLedgerItem.Description == Description &&
            bankLedgerItem.TransactionCategory == TransactionCategory &&
            bankLedgerItem.Type == Type &&
            bankLedgerItem.Balance == Balance &&
            bankLedgerItem.Memo == Memo &&
            bankLedgerItem.ExtendedDescription == ExtendedDescription);
 }
Esempio n. 2
0
        private Dictionary <long, BankLedgerItem> BankCsvToDictionary(string filePath)
        {
            var bankDictionary = new Dictionary <long, BankLedgerItem>();

            using (TextFieldParser parser = new TextFieldParser(filePath))
            {
                parser.TextFieldType = FieldType.Delimited;
                parser.SetDelimiters(",");

                while (!parser.EndOfData)
                {
                    var fields         = parser.ReadFields();
                    var bankLedgerItem = new BankLedgerItem(fields);
                    bankDictionary.Add(bankLedgerItem.ReferenceNumber, bankLedgerItem);
                }
            }

            return(bankDictionary);
        }