Noor Ullah Jan

Noor Ullah Jan

  • NA
  • 10
  • 675

Multi Text Box subtraction

Aug 19 2019 11:37 PM
private void contextBox_TextChanged(object sender, EventArgs e)
{
if (TotaltextBox.Text != "" && contextBox.Text != "" && RecivedtextBox.Text!="")
{
Decimal totalPricetopay = Convert.ToDecimal(TotaltextBox.Text) - Convert.ToDecimal(contextBox.Text);
Decimal total = Convert.ToDecimal(TotaltextBox.Text) - Convert.ToDecimal(RecivedtextBox.Text);
BalancetextBox.Text = totalPricetopay.ToString();
}
else
{
BalancetextBox.Text = "0";
}
}

Answers (6)