Dim dic1 As new SortedDictionary(Of Date, Double)
Dim dic2 As new SortedDictionary(Of Date, Double)
For Each r As Row In e.Form.controls("Table1").Table.Rows
If r.IsNull("date") = False Then
If dic1.ContainsKey(r("date")) = False Then
dic1.add(r("date"), r("value"))
End If
dic2.add(r("date"), 0)
End If
Next
For Each r As Row In e.Form.controls("Table2").Table.Rows
If r.IsNull("date") = False Then
If dic1.ContainsKey(r("date")) = False Then
dic1.add(r("date"), 0)
End If
If dic2.ContainsKey(r("date")) = False Then
dic2.add(r("date"), r("value"))
Else
dic2(r("date")) = r("value")
End If
End If
Next
报错:有存在重复条目
[此贴子已经被作者于2017/6/16 9:29:22编辑过]