What it means is that the string in the TextBox is not a valid integer - it may contain a decimal point, or an alphabetic character.
Try using TryParse instead:
int nActualQty;
if (!int.TryParse(textBox5.Text, out nActualQty))
{
...
}
BTW: You do not have to call ToString on Text values - they are strings already so it does nothing useful at all...