Esempio n. 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>();
 }
Esempio n. 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;
        }
Esempio n. 3
0
 public Account(string name, string bsb, string accountNumber, double startAmount, Bank bank)
     : this(-1, name, bsb, accountNumber, startAmount, bank)
 {
 }
Esempio n. 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;
        }