Esempio n. 1
0
        public void AddCheckingAccount()
        {
            CheckingAccount account = new CheckingAccount();

            account.IdCustomer    = Program.currentCustomer.IdCustomer;
            account.Amount        = 0;
            account.AccountNumber = "";
            account.Overdraft     = -200;
            DBQuery.SaveNewAccountInDb(account);
            Accounts.Add(account);
            Console.WriteLine("Your Checking Account has been created with default value (Overdraft set to  " + account.Overdraft + ")");
        }
Esempio n. 2
0
        public void AddSavingAccount()
        {
            SavingsAccount account = new SavingsAccount();

            account.IdCustomer    = Program.currentCustomer.IdCustomer;
            account.Amount        = 0;
            account.AccountNumber = "";
            account.Ceiling       = 61200;
            account.SavingsRate   = 0.01m;
            DBQuery.SaveNewAccountInDb(account);
            Accounts.Add(account);
            Console.WriteLine("Your Saving Account has been created with default " +
                              "values (Ceiling set to " + account.Ceiling + " and SavingsRate set to  " + account.SavingsRate + ")");
        }