public static DataSet GetBankStatements( int journalId, DateTime transactionDateFrom, DateTime transactionDateTo, string journalEntryNumber, JournalEntryStati statuses) { //@"Key, JournalEntryNumber, Status, DisplayStatus, Journal.JournalNumber, TransactionDate, Debit, Credit, OpenAmount, // DisplayOpenAmount, ClosingBalance, HasClosingBalance" using (IDalSession session = NHSessionFactory.CreateSession()) { IJournal journal = JournalMapper.GetJournal(session, journalId); return JournalEntryMapper.GetJournalEntries<IBankStatement>(session, JournalTypes.BankStatement, journal, transactionDateFrom, transactionDateTo, journalEntryNumber, statuses, true) .Select(c => new { c.Key, c.JournalEntryNumber, c.Status, c.DisplayStatus, Journal_JournalNumber = c.Journal.JournalNumber, c.TransactionDate, c.Debit, c.Credit, c.OpenAmount, c.DisplayOpenAmount, c.ClosingBalance, c.HasClosingBalance }) .ToDataSet(); } }
public static DataSet GetTradingBookings( int journalId, DateTime transactionDateFrom, DateTime transactionDateTo, string journalEntryNumber, JournalEntryStati statuses) { //@"Key, JournalEntryNumber, Status, DisplayStatus, Journal.JournalNumber, TransactionDate" using (IDalSession session = NHSessionFactory.CreateSession()) { IJournal journal = JournalMapper.GetJournal(session, journalId); return JournalEntryMapper.GetJournalEntries<ITradingJournalEntry>(session, JournalTypes.ClientTransaction, journal, transactionDateFrom, transactionDateTo, journalEntryNumber, statuses, true) .Select(c => new { c.Key, c.JournalEntryNumber, c.Status, c.DisplayStatus, Journal_JournalNumber = c.Journal.JournalNumber, c.TransactionDate }) .ToDataSet(); } }