是你的Weight字段为空了(DBNull),你可以加一个判断:
float Weight=dsDetail.Tables[0].Rows[i].IsNull("Weight")? 0 : (float)dsDetail.Tables[0].Rows[i]["Weight"];
float Weight=dsDetail.Tables[0].Rows[i].IsNull("Weight")? 0 : (float)dsDetail.Tables[0].Rows[i]["Weight"];
float Weight=(float)dsDetail.Tables[0].Rows[i]["Weight"];
======
float要改成double.