예제 #1
0
파일: Account.cs 프로젝트: medleykupps/Code
        protected static Account GetAccountFromAccountDetails(AccountDetails details)
        {
            if (details == null)
                throw new Exception("ArticleDetails record is null!");

            Account account = new Account(details.AccountID, details.Name, details.BSB, details.Number, details.StartAmount, new Bank(details.BankID));
            return account;
        }
예제 #2
0
 public bool InsertAccount(string name, string bsb, string number, double startAmount)
 {
     Account a = new Account(-1, name, bsb, number, startAmount, DefaultBank);
     _accounts.Add(a);
     int id = a.Insert();
     return id >= 0;
 }