75 lines
2.5 KiB
C#
75 lines
2.5 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;
|
|
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();
|
|
_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);
|
|
SetControlClientAction(ButtonSearch);
|
|
TreeViewBinding(false);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
}
|
|
|
|
private void TreeViewBinding(bool withChildNodes)
|
|
{
|
|
_SERVERPART = new Storage.Business.SERVERPART();
|
|
MyTreeView.Nodes.Clear(); MyTreeView.ExpandAll();
|
|
_SERVERPART.BindingTreeView_Enum(FieldExplain_ID, "-1", MyTreeView.Nodes, TextBoxSearch.Text, withChildNodes, "12");
|
|
}
|
|
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, false, "12");
|
|
}
|
|
protected void ButtonSearch_Click(object sender, EventArgs e)
|
|
{
|
|
TreeViewBinding(false);
|
|
}
|
|
}
|
|
} |