private void depositButton_Click(object sender, EventArgs e) { Deposit_WithdrawForm form = new Deposit_WithdrawForm(); form.Owner = this; form.transcation = "Deposit"; form.ShowDialog(); double amount = form.amount; bankcust.Account.deposit(amount); this.reload(); }
private void withdrawButton_Click(object sender, EventArgs e) { Deposit_WithdrawForm form = new Deposit_WithdrawForm(); form.Owner = this; form.transcation = "Withdraw"; form.ShowDialog(); double amount = form.amount; if (bankcust.Account.Account_Balance - amount < 0) { MessageBox.Show("Exceeded Funds."); } else { bankcust.Account.withdrawal(amount); this.reload(); } }