63 lines
2.2 KiB
C#
63 lines
2.2 KiB
C#
using System;
|
|
using System.Data;
|
|
using System.Web.UI.WebControls;
|
|
using SuperMap.RealEstate.Web.Utility;
|
|
using HZQR.Common;
|
|
|
|
namespace SuperMap.RealEstate.HighWay.CloudModule.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(true);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
}
|
|
|
|
private void TreeViewBinding(bool withChildNodes)
|
|
{
|
|
_COMMODITYTYPE = new Storage.Business.COMMODITYTYPE(this.Transaction);
|
|
MyTreeView.Nodes.Clear();
|
|
|
|
//添加全部类别
|
|
TreeNode treeNode = new TreeNode();
|
|
treeNode.Text = "全部类别";
|
|
treeNode.NavigateUrl = UriHelper.AddRequestToUrl("COMMODITYList.aspx?ID=" + "0".ToEncrypt(), "Module_ID", "1234");
|
|
treeNode.Value = "1=1";
|
|
treeNode.ImageToolTip = "COMMODITYTYPE";
|
|
treeNode.ImageUrl = "";
|
|
//treeNode.Expanded = new bool?(false);
|
|
this.MyTreeView.Nodes.AddAt(0, treeNode);
|
|
//treeNode.PopulateOnDemand = true;
|
|
_COMMODITYTYPE.BindingTreeView_JudgeValid("-1", this.MyTreeView.Nodes[0].ChildNodes,
|
|
this.TextBoxSearch.Text, withChildNodes, "1234", true, "", PassportInfo.ProvinceCode.TryParseToInt());
|
|
|
|
}
|
|
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);
|
|
}
|
|
}
|
|
} |