private void txtPRate_TextChanged(object sender, EventArgs e)
{
Multiply();
}
private void Multiply()
{
int a, b;
bool isAValid = int.TryParse(txtPRate.Text, out a);
bool isBValid = int.TryParse(txtProductQuantity.Text, out b);
if (isAValid && isBValid)
txtPAmount.Text = (a * b).ToString();
else
txtPAmount.Text = "Invalid input";
}
private void txtProductQuantity_TextChanged(object sender, EventArgs e)
{
Multiply();
}
No comments:
Post a Comment