Greetings
A tax code is written in a box and then pressing a button, the translation will appear in the other boxes taxes?
Thanks
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
VulpesRank #55 · 29.2K reputationPosted Jun 24, 2013, 5:05 AM EDT
private void btnCalculate(object sender, EventArgs e)
{
decimal grossIncome;
bool isValid = decimal.TryParse(txtGrossIncome.Text, out grossIncome);
if (!isValid || grossIncome < 0)
{
MessageBox.Show("Income is not a valid number. Please amend.");
txtGrossIncome.Focus();
return;
}
decimal taxRate;
isValid = decimal.TryParse(txtTaxRate.Text, out taxRate);
if (!isValid || taxrate < 0 || taxrate >= 100)
{
MessageBox.Show("TaxRate is not a valid number. Please amend.");
txtTaxRate.Focus();
return;
}
decimal taxPayable = Math.Round(grossIncome * taxRate / 100m);
txtTaxPayable.Text = taxPayable.ToString();
txtNetIncome.Text = (grossIncome - taxPayable).ToString();
}
Jignesh TrivediRank #16 · 50.3K reputationPosted Jun 24, 2013, 7:15 PM EDT
Can you please provide more information on same?
do you want to copy data of one text box to other text box with processing data of first text box?
hoda Abedi5 reputationPosted Jun 24, 2013, 10:35 PM EDT
Thanks
No, please download the executable and then type a few lines of code in the C language to understand its meaning.
Thank you for your attention
Iftikar HussainRank #423 · 5.9K reputationPosted Jun 24, 2013, 11:25 PM EDT
I have downloaded your executable file and when I parse any text its just showing me the same output with one rectangle box at last. What exactly you want in your code?
Regards,
Iftikar