Two possibilities:
1) The spaces in your source code are preventing it compiling properly:
bool isAValid = int.TryParse(XX_ field1.Text, out a);
bool isBValid = int.TryParse(XX_ field2.Text, out b);
Should probably be:
bool isAValid = int.TryParse(XX_field1.Text, out a);
bool isBValid = int.TryParse(XX_field2.Text, out b);
Or
2) The textboxes don't contain integer numbers.
Your example suggests that you are entering "1.00" as "field1" which will not parse as an integer.
Try:
double a, b;
bool isAValid = double.TryParse(XX_ field1.Text, out a);
bool isBValid = double.TryParse(XX_ field2.Text, out b);
And you might get something better.
But to get 30% of something, you don't want "a * b": you need "a * (b / 100.0)" for 30% of the purchase price, or "a * (1.0 + b / 100.0)" for the purchase price plus 30%