Beispiel #1
0
        private void LoadGridData()
        {
            List <Transaction> Transactions = RiverLinkLogic.GetTransactions();

            bsTransaction.DataSource = Transactions;
            List <BankTransaction> bankTransactions = RiverLinkLogic.GetBankTransactions();

            bsBankTransactions.DataSource = bankTransactions;
        }
Beispiel #2
0
        private void dgTransactions_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            List <Transaction> Transactions = RiverLinkLogic.GetTransactions();

            if (sortAscending)
            {
                dgTransactions.DataSource = Transactions.OrderBy(dgTransactions.Columns[e.ColumnIndex].DataPropertyName).ToList();
            }
            else
            {
                dgTransactions.DataSource = Transactions.OrderBy(dgTransactions.Columns[e.ColumnIndex].DataPropertyName).Reverse().ToList();
            }
            sortAscending = !sortAscending;
        }