63 lines
2.3 KiB
C#
63 lines
2.3 KiB
C#
using System;
|
|
using System.Data;
|
|
using System.Web.UI.WebControls;
|
|
using SuperMap.RealEstate.Web.Utility;
|
|
using HighWayStorage = SuperMap.RealEstate.HighWay.Storage.Business;
|
|
|
|
namespace SuperMap.RealEstate.SendRec.Modules.SearchCommodity
|
|
{
|
|
public partial class ObjectTree : BasePage
|
|
{
|
|
private HighWayStorage.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 new Exception(ex.Message);
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
}
|
|
|
|
private void TreeViewBinding(bool withChildNodes)
|
|
{
|
|
_COMMODITYTYPE = new HighWayStorage.COMMODITYTYPE(this.Transaction);
|
|
MyTreeView.Nodes.Clear();
|
|
//添加全部类别
|
|
TreeNode treeNode = new TreeNode();
|
|
treeNode.Text = "全部类别";
|
|
treeNode.NavigateUrl = UriHelper.AddRequestToUrl("ObjectPage.aspx?SENDREC_TYPE=" + Request["SENDREC_TYPE"] + "&ID=-1", "Module_ID", "1234");
|
|
treeNode.Value = "1=1";
|
|
treeNode.ImageToolTip = "COMMODITYTYPE";
|
|
treeNode.ImageUrl = "";
|
|
|
|
_COMMODITYTYPE.BindingTreeView_Ex("-1", treeNode.ChildNodes, this.TextBoxSearch.Text, withChildNodes,
|
|
"1234", "ObjectPage.aspx", "&SENDREC_TYPE=" + Request["SENDREC_TYPE"], false, true);
|
|
this.MyTreeView.Nodes.AddAt(0, treeNode);
|
|
}
|
|
protected void MyTreeView_TreeNodePopulate(object sender, TreeNodeEventArgs e)
|
|
{
|
|
if (_COMMODITYTYPE == null)
|
|
{
|
|
_COMMODITYTYPE = new HighWayStorage.COMMODITYTYPE(this.Transaction);
|
|
}
|
|
|
|
_COMMODITYTYPE.BindingTreeView_Ex(e.Node.Value, e.Node.ChildNodes, this.TextBoxSearch.Text, false,
|
|
"1234", "ObjectPage.aspx", "&SENDREC_TYPE=" + Request["SENDREC_TYPE"], false, true);
|
|
}
|
|
protected void ButtonSearch_Click(object sender, EventArgs e)
|
|
{
|
|
TreeViewBinding(false);
|
|
}
|
|
}
|
|
}
|