Esempio n. 1
0
        private void LinkAccountButton_Click(object sender, RoutedEventArgs e)
        {
            int i = 0;

            while (true)
            {
                if (user.banking_accounts[i, 0] == null)
                {
                    int  transfer_amount;
                    bool isNumeric = int.TryParse(bankaccount_number.Text, out transfer_amount);
                    if (isNumeric == false)
                    {
                        MessageBox.Show("Only enter numbers for bank account number");
                        return;
                    }


                    user.banking_accounts[i, 0] = accounttextbox.Text;
                    user.banking_accounts[i, 1] = bankaccount_number.Text;
                    user.Add_Bank_Account_to_DB(accounttextbox.Text, bankaccount_number.Text);
                    user.Update_Database();
                    UpdateBankingAccounts();
                    break;
                }
                i++;
            }
        }
Esempio n. 2
0
        public void Add_Bank_Account_to_DBTest()
        {
            User test = new MoneyTransfer657.User("Erik Lomas");

            test.Add_Bank_Account_to_DB("Bank of America", "4568521");
            Assert.IsNotNull(test);
        }