求助:关于重置列代码报错,求精简代码,让其运行更高效! Post By:2015/5/5 10:12:00 [显示全部帖子]
在窗体关闭前事件中写入如下代码:
Dim nms As New List(Of String) Dim drs As New List(of DataRow) With DataTables("库存表") nms = .GetValues("产品") For Each nm As String In nms '找出每个产品的第一行数据, 添加到集合drs中 drs.Add(.Find("产品 = '" & nm & "'", "[_SortKey]")) Next For Each dr As DataRow In drs .DataCols("入库").RaiseDataColChanged(dr) Next End With