当前位置: 首页 > 工具软件 > ASTreeView > 使用案例 >

使用ASTreeView1.5.8读取数据库并产生树状超链接的方法

孔梓
2023-12-01
 1    Dim  dr  As  OracleDataReader  =  ExecuteReader( " select k_id,k_name from tb_kemu " )
 2 
 3               If  dr.Read  Then
 4                  ASTreeView1.RootNode.AppendChild( New  ASTreeViewLinkNode(dr( " k_name " ), dr( " k_name " ),  " http://www.www.com/aa.aspx?id= "   +   CStr (dr( " k_id " )),  " frm " " goto " " ~/images/picasa.gif " ))
 5                   Dim  dr3  As  OracleDataReader  =  ExecuteReader( " select q_id,q_kemu,q_zhuti from tb_tiku where q_kemu=' "   +  dr( " k_name " +   " ' " )
 6                   If  dr3.Read  Then
 7                       While  dr3.Read
 8                          ASTreeView1.FindByText(dr( " k_name " )).AppendChild( New  ASTreeViewLinkNode(dr3( " q_zhuti " ), dr3( " q_zhuti " ),  " # " " frm " " goto " " /images/application_edit.png " ))
 9                       End   While
10                   End   If
11 
12                   While  dr.Read()
13                       Dim  dr2  As  OracleDataReader  =  ExecuteReader( " select q_id,q_kemu,q_zhuti from tb_tiku where q_kemu=' "   +  dr( " k_name " +   " ' " )
14                      ASTreeView1.RootNode.AppendChild( New  ASTreeViewLinkNode(dr( " k_name " ), dr( " k_name " ),  " http://www.www.com/aa.aspx?id= "   +   CStr (dr( " k_id " )),  " frm " " goto " " ~/images/picasa.gif " ))
15                       If  dr2.Read()  Then
16                           While  dr2.Read()
17                              ASTreeView1.FindByText(dr( " k_name " )).AppendChild( New  ASTreeViewLinkNode(dr2( " q_zhuti " ), dr2( " q_zhuti " ),  " # " " frm " " goto " " /images/application_edit.png " ))
18                           End   While
19                       End   If
20                   End   While
21               End   If

 

转载于:https://www.cnblogs.com/wsxcy/archive/2010/06/13/1758030.html

 类似资料: