Пример #1
0
        private void populate()
        {
            lstTransactions.Items.Clear();
            for (int i = 0; i < _transactionManager.TransactionList.Count; i++)
            {
                this.lstTransactions.Items.Add(_transactionManager.TransactionList[i].Name);
                this.lstTransactions.Items[this.lstTransactions.Items.Count - 1].SubItems.Add(_transactionManager.TransactionList[i].Date);
                this.lstTransactions.Items[this.lstTransactions.Items.Count - 1].SubItems.Add(_transactionManager.TransactionList[i].Type);
                this.lstTransactions.Items[this.lstTransactions.Items.Count - 1].SubItems.Add(_transactionManager.TransactionList[i].Amount);
            }

            lblIncome.Text   = _transactionManager.CalulateIncome().ToString("c");
            lblExpenses.Text = _transactionManager.CalulateExpenses().ToString("c");
            lblTotal.Text    = _transactionManager.CalulateTotal().ToString("c");
        }