zoukankan
html css js c++ java
无限级目录
//
绑定所有目录
public
static
void
Bind_list(DropDownList DropDownList1)
{
DropDownList1.Items.Clear();
string
sql
=
"
SELECT list_id,list_name,list_parent FROM list
"
;
DataTable dt
=
DataBase.getDataTable(sql);
//
根据SQL语句获取DataTable值
Bind_list(DropDownList1,dt,
"
0
"
,
0
);
}
private
static
void
Bind_list(DropDownList DropDownList1, DataTable dt,
string
parent,
int
grade)
{
DataRow[] dr
=
dt.Select(
"
list_parent=
"
+
parent,
"
list_id asc
"
);
if
(dr.Length
>
0
)
{
int
grade1
=
grade
+
1
;
foreach
(DataRow row
in
dr)
{
ListItem li
=
new
ListItem();
li.Text
=
""
;
for
(
int
i
=
0
; i
<
grade; i
++
)
{
li.Text
+=
"
"
;
}
li.Text
+=
"
├
"
+
row[
1
].ToString();
li.Value
=
row[
0
].ToString();
DropDownList1.Items.Add(li);
Bind_list(DropDownList1,dt, row[
0
].ToString(), grade1);
}
}
}
查看全文
相关阅读:
mac上eclipse上运行word count
利用hadoop自带程序运行wordcount
mac上eclipse上配置hadoop
在mac上安装hadoop伪分布式
0到N数其中三个数的全排列
【设计模式】【应用】使用模板方法设计模式、策略模式 处理DAO中的增删改查
【设计模式】【行为型模式】策略模式
【设计模式】【行为型模式】模板模式
properties文件操作
File相关操作
原文地址:https://www.cnblogs.com/chjf2008/p/1277969.html
最新文章
C++易混淆概念
只能在堆上生成的对象 VS. 只能在栈上生成的对象
深入理解C++中的初始化
运算符重载总结
byr面经两则
CVE-2014-6332
CVE-2016-0199
CVE-2012-4969
CVE-2009-3459
CVE-2013-0025
热门文章
IE漏洞的调试心得
垃圾回收释放堆
CVE-2012-4792Microsoft Internet Explorer 释放后使用漏洞
CVE-2013-2729 Adobe Reader和Acrobat 数字错误漏洞
Windows平台的rop exp编写
MapReduce简介
ubantu安装jdk来配置hadoop
hadoop聚群的安装
mahout安装配置
hadoop倒排索引
Copyright © 2011-2022 走看看