Exemple #1
0
 public Account(int id, string name, string bsb, string accountNumber, double startAmount, Bank bank)
 {
     ID = id;
     Name = name;
     BSB = bsb;
     Number = accountNumber;
     StartAmount = startAmount;
     Bank = bank;
     Tags = new List<TransactionTag>();
 }
Exemple #2
0
        public static bool UpdateAccount(int id, Bank bank, string name, 
										 string bsb, string accountNumber, double startAmount)
        {
            name = ConvertNullToEmptyString(name);
            bsb = ConvertNullToEmptyString(bsb);
            accountNumber = ConvertNullToEmptyString(accountNumber);

            AccountDetails details = new AccountDetails(id, bank.ID, name, bsb, accountNumber, startAmount);
            bool result = SiteProvider.Accounts.UpdateAccount(details);
            return result;
        }
Exemple #3
0
 public Account(string name, string bsb, string accountNumber, double startAmount, Bank bank)
     : this(-1, name, bsb, accountNumber, startAmount, bank)
 {
 }
Exemple #4
0
        public static int InsertAccount(Bank bank, string name, string bsb, string accountNumber, double startAmount)
        {
            name = ConvertNullToEmptyString(name);
            bsb = ConvertNullToEmptyString(bsb);
            accountNumber = ConvertNullToEmptyString(accountNumber);

            AccountDetails details = new AccountDetails(0, bank.ID, name, bsb, accountNumber, startAmount);
            int id = SiteProvider.Accounts.InsertAccount(details);
            return id;
        }