You do not say which line produces the error but I am guessing it is:
TotalPrice += Convert.ToDouble(DataBinder.Eval(e.Row.DataItem,"PrePie"));
You cannot assume a value is in the gridview cell, test PrePie has a value before you use it and take appropriate action if it is nul.