If e.Col.name = "加入" Then Dim dr As DataRow = DataTables("商品资料").Find("条码 = '" & e.DataRow("条码") & "'" If dr Is Nothing Then DataTables("商品资料").AddNew For Each dc As DataCol In DataTables("商品资料").DataCols dr(dc.Name) = e.Row(dc.Name) Next Else dr("数量") = dr("数量") + e.DataRow("数量") End If End If