private void txtTaxPer_TextChanged(object sender, EventArgs e)
{
try
{
if (string.IsNullOrEmpty(txtTaxPer.Text))
{
txtTaxAmt.Text = "";
txtTotal.Text = "";
return;
}
txtTaxAmt.Text = Convert.ToInt32((Convert.ToInt32(txtSubTotal.Text) * Convert.ToDouble(txtTaxPer.Text) / 100)).ToString() ;
txtTotal.Text = (Convert.ToInt32(txtSubTotal.Text) + Convert.ToInt32(txtTaxAmt.Text)).ToString();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}

Priyaranjan K SRank #45 · 32.5K reputationPosted Oct 12, 2015, 6:49 PM EDT
Priyaranjan K SRank #45 · 32.5K reputationPosted Oct 12, 2015, 7:02 PM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Oct 12, 2015, 8:03 PM EDT
David Laranga5 reputationPosted Oct 12, 2015, 8:28 PM EDT
Priyaranjan K SRank #45 · 32.5K reputationPosted Oct 12, 2015, 8:34 PM EDT
David Laranga5 reputationPosted Oct 12, 2015, 8:37 PM EDT
Priyaranjan K SRank #45 · 32.5K reputationPosted Oct 12, 2015, 8:38 PM EDT
Francis SusaimichaelRank #466 · 5.4K reputationPosted Oct 13, 2015, 1:48 AM EDT