This means that you are getting null value in the ff lines:
quantity = Convert.ToInt32((row.FindControl("quantity")).ToString());
price = float.Parse((row.FindControl("price")).ToString());
Use
Int32.TryParse
or
Float.TryParse
method instead. This is safer than directly converting a value into a desired output.
Regards,
Eduard