2025-03-27 15:05:14 +08:00

74 lines
2.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SuperMap.RealEstate.Web.UI;
using SuperMap.RealEstate.Web.UI.WebControls;
using SuperMap.RealEstate.Web.Utility;
using SuperMap.RealEstate.CoreFrameWork.Modules;
using SuperMap.RealEstate.CoreFrameWork.Dictionary.Business;
namespace SuperMap.RealEstate.HighWay.Modules.EditServerPart.ServerPartInfo
{
public partial class ServerPartTreeView : BasePage
{
private Storage.Business.SERVERPART _SERVERPART = null;
string FieldExplain_ID
{
get
{
FieldExplain _FieldExplain = new FieldExplain(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", "ServerPart.aspx", true);
this.FixTreeViewDoubleClick(MyTreeView, true);
SetControlClientAction(ButtonSearch);
TreeViewBinding(true);
}
catch (Exception ex)
{
throw ex;
}
finally
{
}
}
private void TreeViewBinding(bool withChildNodes)
{
_SERVERPART = new Storage.Business.SERVERPART(Transaction);
MyTreeView.Nodes.Clear(); MyTreeView.ExpandAll();
_SERVERPART.BindingTreeView_ForEdit(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(Transaction);
_SERVERPART.BindingTreeView_ForEdit(FieldExplain_ID, e.Node.Value, e.Node.ChildNodes, TextBoxSearch.Text, true, "12");
}
protected void ButtonSearch_Click(object sender, EventArgs e)
{
TreeViewBinding(true);
}
}
}