Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
麻烦的解决方法。
Dim cmd As New SQLCommand
cmd.CommandText = "Select {表A}.[第一列] As [分组],{表B}.[第一列] As [样式] from {表A} inner join {表B} on {表A}.[样式]={表B}.[_Identify]"
Dim dt As datatable
dt = cmd.ExecuteReader()
Dim tr As WinForm.TreeView = e.Form.Controls("TreeView1")
Dim tn As WinForm.TreeNode
tr.ExpandAll
Dim ys() As String = dt.GetComboListString("样式").Split("|") '获取图标样式的总类数
For Each y As String In ys
For Each ysr As DataRow In dt.Select("样式 = '" & y & "'") '遍历列表样式=当前样式
Dim xxx() As String = ysr("分组").Split("\")
output.show(xxx.Length)
Select Case xxx.Length
Case 1
tr.nodes(xxx(0)).IconFile = y & ".ico"
Case 2
tr.nodes(xxx(0)).nodes(xxx(1)).IconFile = y & ".ico"
Case 3
tr.nodes(xxx(0)).nodes(xxx(1)).nodes(xxx(2)).IconFile = y & ".ico"
Case 4
Case 5
Case 6
Case 7
Case 8
Case Else
End Select
Next
Next
已经不错了