private void depositButton_Click(object sender, EventArgs e) { anAccountInfo = new Account(Convert.ToDouble(amountTextBox.Text)); amount = Convert.ToDouble(amountTextBox.Text); message = anAccountInfo.Deposit(amount); //anAccount.Balance = anAccount.Balance + amount; MessageBox.Show(message); //anAccountInfo.currentBalance = anAccountInfo.CurrentBalance + Convert.ToDouble(amountTextBox.Text); //MessageBox.Show("Current Balance: " + anAccountInfo.CurrentBalance + " Tk"); //amountTextBox.Text = ""; }
private void createButton_Click(object sender, EventArgs e) { anAccountInfo = new Account(accountNumberTextBox.Text, customerNameTextBox.Text); anAccountInfo.AccountNumber = accountNumberTextBox.Text; anAccountInfo.CustomerName = customerNameTextBox.Text; //anAccountInfo.SetNumber(accountNumberTextBox.Text); //anAccountInfo.CustomerName = customerNameTextBox.Text; //anAccountInfo.currentBalance = 0.00; MessageBox.Show("Customer account has been succesfully created." + "\n\nCustomer Name: " + anAccountInfo.CustomerName + "\nAccount Number: " + anAccountInfo.AccountNumber + "\nCurrent Balance: " + anAccountInfo.CurrentBalance + " Tk"); }