Exemplo n.º 1
0
        private Account _getAccountByNumber(string pNumber, int pCurrencyId)
        {
            Account a = new Account();
            foreach (Account account in _accounts)
            {
                if (account.Number == pNumber && account.CurrencyId == pCurrencyId)
                    a = account;

            }
            return a;//_accounts.FirstOrDefault(item => item.Number.Equals(pNumber) && item.CurrencyId == pCurrencyId);
        }
Exemplo n.º 2
0
 public void AddAccount(Account account)
 {
     _accounts.Add(account);
 }
Exemplo n.º 3
0
        private List<Account> _CopyEachAccount(List<Account> pAccounts)
        {
            List < Account > newAccounts = new List<Account>();

            foreach (Account account in pAccounts)
            {
                Account newAccount = new Account();
                newAccount = account.Copy();
                //newAccount.Balance = 0;
                //newAccount.StockBalance = 0;
                newAccounts.Add(newAccount);
            }
            return newAccounts;
        }