using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using DAL;
using Model;
using System.Data.OleDb;
using System.Drawing;
using System.Drawing.Imaging;
using System.Data.SqlClient;
using System.Collections.Generic;
public partial class zzyCountImage : System.Web.UI.Page
{
LxCountDAL lxCountDAl = new LxCountDAL();
LxCountDAL Dal = new LxCountDAL();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
IList<t_xzqhModel> model = Dal.getsi();
for (int i = 0; i < model.Count; i++)
{
string dicName = model[i].Mc.ToString();
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class SetManage_druclass : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
InitTreeView(null, 0);
}
}
public void InitTreeView(TreeNode pNode, int parentID)
{
DataSet ds = new DataSet();//这里调用数据库获取数据源
TreeNode node;
if (ds != null && ds.Tables[0].Rows.Count > 0)
{
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
node = new TreeNode();
//节点名称
node.Text = ds.Tables[0].Rows[i]["CATEGORY_NAME"].ToString();
//节点ID
int currID = 0;
int.TryParse(ds.Tables[0].Rows[i]["CATEGORY_ID"].ToString(), out currID);
//判断是不是根节点
if (pNode == null)
this.TreeView1.Nodes.Add(node);
else
pNode.ChildNodes.Add(node);
//递归调用
InitTreeView(node, currID);
}
}
}
}