Example #1
0
 private IEnumerable <SqlLedgerEntry> GetLineRecords(SqlDataReader reader, TransactionFieldReader dataReader)
 {
     while (reader.Read())
     {
         if (!reader.RowIsEmpty())
         {
             yield return(ledgerEntryParser.CreateLedgerEntry(reader.CurrentRecord(), dataReader, reader.RowNumber));
         }
     }
 }
Example #2
0
 internal SqlLedgerEntry CreateLedgerEntry(IDataRecord record, TransactionFieldReader dataReader, int recordIndex)
 {
     return(CreateLedgerEntry(
                dataReader.GetId(record, recordIndex),
                dataReader.GetUsername(record, recordIndex),
                dataReader.GetTransactionDate(record, recordIndex),
                dataReader.GetNominalCode(record, recordIndex),
                dataReader.GetAmount(record, recordIndex),
                dataReader.GetDescription(record, recordIndex),
                dataReader.GetNominalCodeName(record, recordIndex),
                dataReader.GetType(record, recordIndex)));
 }
Example #3
0
 public IEnumerable <Transaction> GetJournals(SqlDataReader reader, TransactionFieldReader dataReader)
 {
     return(transactionCreator.ReadTransactions(GetLineRecords(reader, dataReader)));
 }