コード例 #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);
        }
コード例 #2
0
 public void AddAccount(Account account)
 {
     _accounts.Add(account);
 }
コード例 #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;
        }