当前遍历只实现了查找的不重复值的第一行数据更新,怎么实现遍历所有不重复值的所有行数据都更新呢?
红色部分代码 怎么改成遍历呢?
想实现当uui找到后 就去找凭证号里面的uuid 只有唯一的一个 然后去更新费用类目下 的所有uuid相等的数据值 而不是只有第一条更新
当前代码如下:
Dim Customers As List(Of String)
Customers = DataTables("费用类目").GetValues("uuid")
For Each Customer As String In Customers
Output.Show(Customer)
Dim bb As DataRow = DataTables("凭证号").Find("uuid= '" & Customer & "'")
Dim b As DataRow = DataTables("费用类目").Find("uuid= '" & Customer & "'")
If bb IsNot Nothing Then
If b IsNot Nothing Then
b("凭证时间")=bb("时间")
b("年份")=bb("年份")
b("月份")=bb("月份")
b("单位")=bb("凭证单位")
b("凭证号")=bb("凭证号")
End If
b.Save
End If
Next