zoukankan
html css js c++ java
杂杞
protected
internal
void
loadtree(ComponentArt.Web.UI.TreeView tv )
{
tv.Nodes.Clear();
DataSet ds
=
Sqlhelp.fillDataSet(
"
select * from dept where Father_dept_ID=''
"
);
foreach
(DataRow row
in
ds.Tables[
0
].Rows)
{
TreeViewNode root
=
new
TreeViewNode();
root.CssClass
=
"
tree
"
;
root.ImageUrl
=
@"
..\..\image\treeimages\res.gif
"
;
root.Text
=
row[
"
Dept_name
"
].ToString();
root.ID
=
row[
"
Sub_dept_ID
"
].ToString();
loadtree(root,row[
"
Sub_dept_ID
"
].ToString());
tv.Nodes.Add(root);
}
tv.ExpandAll();
}
private
void
loadtree(TreeViewNode node,
string
deptid)
{
DataSet ds
=
Sqlhelp.fillDataSet(
"
select * from dept where Father_dept_ID='
"
+
deptid
+
"
'
"
);
foreach
(DataRow row
in
ds.Tables[
0
].Rows)
{
TreeViewNode subnode
=
new
TreeViewNode();
subnode.Text
=
row[
"
Dept_name
"
].ToString();
subnode.ID
=
row[
"
Sub_dept_ID
"
].ToString();
node.Nodes.Add(subnode);
subnode.ImageUrl
=
@"
..\..\image\treeimages\res.gif
"
;
subnode.CssClass
=
"
tree
"
;
loadtree(subnode,row[
"
Sub_dept_ID
"
].ToString());
}
}
查看全文
相关阅读:
Git命令大全
window系统查看端口被哪个进程占用了
字体大小自适应纯css解决方案
CSS3的rem设置字体大小
javascript同名变量
西部数码云服务器手记
十年,站酷已成设计论坛霸主,博客园却成无兵之将
PHP的性能大坑--strtotime函数
csv表格处理(上)-- JS 与 PHP 协作导入导出
致互联网--那些我浅尝则止的昙花
原文地址:https://www.cnblogs.com/aipeli/p/295860.html
最新文章
无监督学习
回归
第六章---机器学习与数据建模
第五章--预处理理论
课程介绍
第二章--数据获取
(Python基础教程之十六)Python multidict示例–将单个键映射到字典中的多个值
(Python基础教程之十五)Python开箱Tuple–太多值无法解压
Redis数据类型简介(十分钟快速学习Redis)
(Python基础教程之十四)Python将tuple开箱为变量或参数
热门文章
(Python基础教程之十一)Python找到最大的N个(前N个)或最小的N个项目
(Python基础教程之八)Python中的list操作
(Python基础教程之七)Python字符串操作
(Python基础教程之六)Python中的关键字
(Python基础教程之四)Python中的变量的使用
(Redis基础教程之八) 如何在Redis中管理Sets
Linux安装node.js
HTML5离线Web应用实战:五步创建成功
css3 tween
Linux查看系统配置常用命令
Copyright © 2011-2022 走看看