66 lines
2.4 KiB
C#
66 lines
2.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using SuperMap.RealEstate.CoreFrameWork.Modules;
|
|
using System.Data;
|
|
using SuperMap.RealEstate.Web.UI;
|
|
using SuperMap.RealEstate.Web.UI.WebControls;
|
|
using SuperMap.RealEstate.Web.Utility;
|
|
using SuperMap.RealEstate.HighWay.Storage;
|
|
|
|
namespace SuperMap.RealEstate.HighWay.Modules.Commodity
|
|
{
|
|
public partial class CommodityTreeView : BasePage
|
|
{
|
|
private Storage.Business.COMMODITYTYPE _COMMODITYTYPE = null;
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (IsPostBack) return;
|
|
|
|
try
|
|
{
|
|
this.FixTreeViewDoubleClick(MyTreeView, true);
|
|
SetControlClientAction(ButtonSearch);
|
|
TreeViewBinding(false);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
}
|
|
|
|
private void TreeViewBinding(bool withChildNodes)
|
|
{
|
|
_COMMODITYTYPE = new Storage.Business.COMMODITYTYPE(this.Transaction);
|
|
MyTreeView.Nodes.Clear();
|
|
_COMMODITYTYPE.BindingTreeView_JudgeValid("-1", this.MyTreeView.Nodes, this.TextBoxSearch.Text, withChildNodes, "1234", true);
|
|
////绑定对应的数据
|
|
//Storage.Business.District _District = new Storage.Business.District(this.Transaction);
|
|
//_District.BindingTreeView(MyTreeView.Nodes, TextBoxSearch.Text, withChildNodes,null);
|
|
//TreeNode _Node = new TreeNode();
|
|
//_Node.Text = "全部";
|
|
//_Node.NavigateUrl = UriHelper.AddRequestToUrl("BuildList.aspx", "", "");
|
|
//_Node.Value = "";
|
|
//_Node.ImageToolTip = "District_All";
|
|
//_Node.Expanded = false;
|
|
//MyTreeView.Nodes.AddAt(0, _Node);
|
|
|
|
}
|
|
protected void MyTreeView_TreeNodePopulate(object sender, TreeNodeEventArgs e)
|
|
{
|
|
if (_COMMODITYTYPE == null)
|
|
_COMMODITYTYPE = new Storage.Business.COMMODITYTYPE(this.Transaction);
|
|
_COMMODITYTYPE.BindingTreeView_JudgeValid(e.Node.Value, e.Node.ChildNodes, this.TextBoxSearch.Text, true, "1234", true);
|
|
}
|
|
protected void ButtonSearch_Click(object sender, EventArgs e)
|
|
{
|
|
TreeViewBinding(true);
|
|
}
|
|
}
|
|
} |