此主题相关图片如下:qq截图20190617230128.jpg
上图是运行生成的结果
下面是代码,怎么修改?
For Each rs As Row In Tables("考试数据表").rows
If rs IsNot Nothing Then
rs("日期短时间教室") = rs("短日期") & rs("起始时间") & rs("教室")
End If
Next
Dim tv As WinForm.TreeView
tv =e.Form.Controls("签到单时间")
Dim Nd = tv.Nodes.Add("全部时间")
Dim dt As DataTable = DataTables("考试数据表")
Dim nds As new List(Of WinForm.TreeNode)
For i As Integer = 0 To 3
nds.Add(nd)
Next
For Each arys As String() In dt.GetValues("短日期|起始时间|教室", "短日期 not in ('前交日')", "短日期,起始时间,教室")
Dim flag As Boolean = False
For i As Integer = 0 To arys.Length - 1
If nds(i+1).Name <> arys(i) OrElse flag Then
flag = True
nds(i+1) = nds(i).Nodes.Add(arys(i))
End If
Next
Next
e.Form.Controls("TabControl1").Select