|
本帖最后由 zhangdaxu 于 2017-5-22 10:26 编辑
Equipment.Master:
Equipment.Master.cs:
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using FineUI;
- using System.Data;
- using SinoPriceMonitor.DAL;
- namespace SinoPriceMonitor.SubPage.Equipment
- {
- public partial class Equipment : System.Web.UI.MasterPage
- {
- public delegate void ProcessLeftTreeNodeClickDelegate(string treeNodeId, string treeNodeText);
- public ProcessLeftTreeNodeClickDelegate ProcessLeftTreeNodeClick
- {
- get;
- set;
- }
- protected void Page_Load(object sender, EventArgs e)
- {
- LoadData();
- }
- private void LoadData()
- {
- //// 模拟从数据库返回数据表
- DataTable table = Sys_Equipment.SP_Province_GetList();
- foreach (DataRow row in table.Rows)
- {
- FineUI.TreeNode node = new FineUI.TreeNode();
- node.Text = row["Province_Name"].ToString();
- node.NodeID = row["Province_Code"].ToString();
- Tree1.Nodes.Add(node);
- DataTable table2 = Sys_Equipment.A_MainMarket_Company_GetList(Convert.ToInt32(row["Province_Code"].ToString()));
- foreach (DataRow row2 in table2.Rows)
- {
- FineUI.TreeNode node2 = new FineUI.TreeNode();
- node2.Text = row2["Company"].ToString();
- node2.EnableClickEvent = true;
- node.Nodes.Add(node2);
- }
- }
- }
- protected void Tree1_NodeCommand(object sender, TreeCommandEventArgs e)
- {
- if (ProcessLeftTreeNodeClick != null)
- {
- ProcessLeftTreeNodeClick(e.NodeID, e.Node.Text);
- }
- }
- }
- }
复制代码
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|