public bool AddAccount(Account account) { if (chartOfAccounts.ContainsKey(account.GetFullAccountNumber())) return false; chartOfAccounts.Add(account.GetFullAccountNumber(), account); return true; }
public bool DeactivateAccount(Account account) { if (chartOfAccounts.ContainsKey(account.GetFullAccountNumber())) { try { chartOfAccounts.Remove(account.GetFullAccountNumber()); } catch (ArgumentNullException e) { return false; } return true; } return false; }
public bool Equals(Account other) { return this.GetFullAccountNumber().Equals(other.GetFullAccountNumber()); }