private void TxtVehiclesSalesPrice_TextChanged(object sender, EventArgs e)
        {
            // New input clears error
            VehicleSalePriceError.Clear();

            // If vehicle sales price is modified, summary section outputs will be cleared.
            txtSummaryVehiclesSalePrice.Text = String.Empty;
            txtSummaryTradeIn.Text           = String.Empty;
            txtSummaryTax.Text        = String.Empty;
            txtSummarySubtotal.Text   = String.Empty;
            txtSummaryOptions.Text    = String.Empty;
            txtSummaryTotal.Text      = String.Empty;
            txtSummaryAmountDue.Text  = String.Empty;
            txtFinanceMonthlyPay.Text = String.Empty;
        }
 /// <summary>
 /// Validates vehicle sale price input and throws appropriate error.
 /// </summary>
 private void VehicleSalesPriceInput_Validated(object sender, EventArgs e)
 {
     if (txtVehiclesSalesPrice.Text == null || txtVehiclesSalesPrice.Text.Equals(String.Empty))
     {
         VehicleSalePriceError.SetError(txtVehiclesSalesPrice, "Vehicle price is a required field.");
     }
     else if (!Regex.IsMatch(txtVehiclesSalesPrice.Text, @"^\d+$"))
     {
         VehicleSalePriceError.SetError(txtVehiclesSalesPrice, "Vehicle price cannot contain letters or special characters.");
     } /*else if (decimal.Parse(txtVehiclesSalesPrice.Text) <= 0)
        * {
        * VehicleSalePriceError.SetError(txtVehiclesSalesPrice, "Vehicle price cannot be less than or equal to 0.");
        * }*/
     else if (!IsValidVehiclesSalePrice())
     {
         VehicleSalePriceError.Clear();
     }
 }
        private void BtnReset_Click(object sender, EventArgs e)
        {
            string            messageConfirmation = "Do you want to reset the form?";
            string            caption             = "Reset Form";
            MessageBoxButtons button     = MessageBoxButtons.YesNo;
            MessageBoxIcon    boxIcon    = MessageBoxIcon.Warning;
            DialogResult      messageBox = MessageBox.Show(messageConfirmation, caption, button, boxIcon, MessageBoxDefaultButton.Button2);

            if (messageBox == DialogResult.Yes)
            {
                // Changes the form's initial state.
                txtVehiclesSalesPrice.Text = String.Empty;
                txtTradeInValue.Text       = "0";
                VehicleSalePriceError.Clear();
                TradeInValueError.Clear();

                chkComputerNavigation.Checked = false;
                chkLeatherInterior.Checked    = false;
                chkStereoSystem.Checked       = false;

                radStandard.Checked   = true;
                radPearlized.Checked  = false;
                radCustomized.Checked = false;

                nudFinanceInterestRate.Value = 5;
                nudFinanceYears.Value        = 1;

                txtSummaryVehiclesSalePrice.Text = String.Empty;
                txtSummaryTradeIn.Text           = String.Empty;
                txtSummaryTax.Text        = String.Empty;
                txtSummarySubtotal.Text   = String.Empty;
                txtSummaryOptions.Text    = String.Empty;
                txtSummaryTotal.Text      = String.Empty;
                txtSummaryAmountDue.Text  = String.Empty;
                txtFinanceMonthlyPay.Text = String.Empty;
            }
        }