Dim mTalbe As New DataTable
mTalbe = mBl.GetList(pstrSql).Tables(0)
Dim dr As DataRow = mTalbe.NewRow
dr.Item(0) = mTalbe.Rows.Count
dr.Item(9) = mTalbe.Compute("sum(毛重)", True)
dr.Item(10) = mTalbe.Compute("sum(皮重)", True)
dr.Item(11) = mTalbe.Compute("sum(淨重)", True)
mTalbe.Rows.Add(dr)
DataGridView1.DataSource = mTalbe
摘自 wl58796351的專欄