//===================================================================== // Custom Form Business Logic //===================================================================== private void buttonSubmitTransaction_Click(object sender, EventArgs e) { if (verifyTextboxes()) { int account_number = Convert.ToInt32(textBoxAccountNumber.Text); double amount_value = Convert.ToDouble(textBoxAmount.Text); double amount_changed = (comboBoxDebitCredit.Text == "Credit") ? amount_value : 0 - amount_value; databaseService.AddAccountTransaction(account_number, amount_changed); WindowManager.navigateToForm(this, this.GetType(), typeof(Homescreen)); } else { MessageBox.Show("Invalid Transaction Info Provided: Account Number must be an integer. Combobox must have length < 8. Amount changed should be a decimal."); } }