Public Function info_tree(Optional ByVal parentNode As Long = 0, Optional ByVal depart As String)
Dim rst As ADODB.Recordset
Dim strSql As String
strSql = "select id,title from yg_net_info where ref_id=" & parentNode & " and INFO_TYPE='class' and depart='" & depart & "' "
Set rst = yg_gain_sql_recordset(strSql)
If (rst.RecordCount) Then
rst.MoveFirst
Do While Not rst.EOF
If (parentNode = 0) Then
TreeView1.Nodes.Add , , yg_getK(rst!id), rst!title
Else
TreeView1.Nodes.Add yg_getK(parentNode), tvwChild, yg_getK(rst!id), rst!title
End If
info_tree rst!id, depart '第归
rst.MoveNext
Loop
End If
yg_free_recordset rst