Dim names1 As List(Of String) = DataTables("一一与一二对比").GetUniqueValues("", "在岗人员对比_一一年")
Dim names2 As List(Of String) = DataTables("一一与一二对比").GetUniqueValues("", "在岗人员对比_一二年")
Dim names3 As New List(Of String)
For Each name As String In names1
If Not names2.Contains(name) Then
names3.add(name)
End If
Next
For i As Integer = 0 To names3.Count - 1
Tables("一一与一二对比").Rows(i)("增加") = names3(i)
Next
分隔…………………………………………………………………………分隔,下面是令一段代码
Dim names1 As List(Of String) = DataTables("一一与一二对比").GetUniqueValues("", "在岗人员对比_一二年")
Dim names2 As List(Of String) = DataTables("一一与一二对比").GetUniqueValues("", "在岗人员对比_一一年")
Dim names3 As New List(Of String)
For Each name As String In names1
If Not names2.Contains(name) Then
names3.add(name)
End If
Next
For i As Integer = 0 To names3.Count - 1
Tables("一一与一二对比").Rows(i)("减少") = names3(i)
Next
就是上面的代码!要分两个按钮才能执行,想给他合并到一个按钮事件里,如何实现?