69 lines
2.3 KiB
C#
69 lines
2.3 KiB
C#
using System;
|
|
using System.Web.UI.WebControls;
|
|
using SuperMap.RealEstate.CoreFrameWork.Dictionary.Business;
|
|
|
|
namespace SuperMap.RealEstate.HighWay.Modules.ServerPart
|
|
{
|
|
public partial class ServerPartTreeView : BasePage
|
|
{
|
|
private Storage.Business.SERVERPART _SERVERPART = null;
|
|
|
|
string FieldExplain_ID
|
|
{
|
|
get
|
|
{
|
|
FieldExplain _FieldExplain = new FieldExplain(this.Transaction);
|
|
_FieldExplain.AddSearchParameter("FieldExplain_Field", "DIVISION_CODE");
|
|
if (_FieldExplain.Search())
|
|
{
|
|
return _FieldExplain.FieldExplain_ID.ToString();
|
|
}
|
|
else
|
|
{
|
|
throw new Exception("未配置对应的服务区数据!");
|
|
}
|
|
}
|
|
}
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (IsPostBack) return;
|
|
|
|
try
|
|
{
|
|
SetControlClientAction(this.ButtonAddServerPart, "parent.ServerPartObjectDetail", "SERVERPARTPage.aspx", true);
|
|
this.FixTreeViewDoubleClick(MyTreeView, true);
|
|
TreeViewBinding(true);
|
|
//设置回车焦点按钮
|
|
SetControlClientAction(ButtonSearch);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
}
|
|
|
|
private void TreeViewBinding(bool withChildNodes)
|
|
{
|
|
_SERVERPART = new Storage.Business.SERVERPART(this.Transaction);
|
|
MyTreeView.Nodes.Clear();
|
|
_SERVERPART.BindingTreeView_Enum(FieldExplain_ID, "-1", MyTreeView.Nodes, TextBoxSearch.Text, withChildNodes, "12", "", null, null, true);
|
|
MyTreeView.CollapseAll();
|
|
}
|
|
protected void MyTreeView_TreeNodePopulate(object sender, TreeNodeEventArgs e)
|
|
{
|
|
if (_SERVERPART == null)
|
|
{
|
|
_SERVERPART = new Storage.Business.SERVERPART(this.Transaction);
|
|
}
|
|
_SERVERPART.BindingTreeView_Enum(FieldExplain_ID, e.Node.Value, e.Node.ChildNodes, TextBoxSearch.Text, true, "12", "", null, null, true);
|
|
}
|
|
protected void ButtonSearch_Click(object sender, EventArgs e)
|
|
{
|
|
TreeViewBinding(true);
|
|
}
|
|
}
|
|
} |