예제 #1
0
        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);
            }
        }
예제 #2
0
        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();
            }
        }
예제 #3
0
        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());
                }
            }
        }