Example #1
0
        private void PayButton_Click(object sender, EventArgs e)
        {
            double amount = double.Parse(AmountTextBox.Text);

            if (amount < 0)
            {
                Form error = new Error("You cannot pay a negative amount");
                error.Show();
                Form newTry = new PayBalance();
                newTry.Show();
                this.Close();
            }

            double newBalance        = Program.PayBalance(amount);
            Form   payBalanceSuccess = new PayBalanceSuccess(newBalance);

            payBalanceSuccess.Show();
            this.Close();
        }
Example #2
0
        private void PayBalanceButton_Click(object sender, EventArgs e)
        {
            Form payBalance = new PayBalance();

            payBalance.Show();
        }