private void btnChangePercent_Click(object sender, EventArgs e) { Form salesTaxForm = new frmSalesTax(); DialogResult selectedButton = salesTaxForm.ShowDialog(); if (selectedButton == DialogResult.OK) { SalesTaxPct = Convert.ToDecimal(salesTaxForm.Tag); } }
private void btnChange_Click(object sender, EventArgs e) { frmSalesTax f = new frmSalesTax(); //f.Show(); if (f.ShowDialog() == DialogResult.OK) { SalesTaxPct = Convert.ToDecimal(f.Tag); f.Close(); } }
private void btnChangePct_Click(object sender, EventArgs e) { Form salesTaxForm = new frmSalesTax(); DialogResult selecteButton = salesTaxForm.ShowDialog(); if (selecteButton == DialogResult.OK) { try { SalesTaxPct = Convert.ToDecimal(salesTaxForm.Tag.ToString()); lbltax.Text = "Tax (" + salesTaxForm.Tag.ToString() + "%):"; } catch (Exception ex) { MessageBox.Show(ex.ToString()); } } }