public void DepositMoney(object sender, DepositArgs args) { for (int i = 0; i < _clients.Count; i++) { DepositAccount da = (DepositAccount)_clients[i]; if (da.GetAccountID() == args.AccountID) { da.MakeADeposit(args.Amount); } } }
public void CheckAccount(object sender, DepositArgs args) { for (int i = 0; i < _clients.Count; i++) { DepositAccount da = (DepositAccount)_clients[i]; if (da.GetAccountID() == args.AccountID && da.WithdrawRequest) { _clients.RemoveAt(i); i--; } } }