Ejemplo n.º 1
0
        public TransactionPresenter(ITransactionUserControl ctrl)
        {
            view = ctrl;
            transactionsRepository = new TransactionRepository();
            transactionsList = new List<Transaction>();
            transactionsList = transactionsRepository.GetAll().ToList();
            usersRepository = new UserRepository(new MyContext());
            usersList = usersRepository.GetAll().ToList();
            showingCount = transactionsList.Count;

            view.DrawTransactionsTable(transactionsList);
        }
        public TransactionPresenter(ITransactionUserControl ctrl)
        {
            view = ctrl;
            transactionsRepository = new TransactionRepository();
            transactionsList       = new List <Transaction>();
            transactionsList       = transactionsRepository.GetAll().ToList();
            usersRepository        = new UserRepository(new MyContext());
            usersList    = usersRepository.GetAll().ToList();
            showingCount = transactionsList.Count;

            view.DrawTransactionsTable(transactionsList);
        }
 private void UpdateTransactionsList()
 {
     transactionsList = transactionsRepository.GetAll().ToList();
     view.DrawTransactionsTable(transactionsList);
 }