60 lines
2.2 KiB
C#
60 lines
2.2 KiB
C#
using System;
|
|
using System.Data;
|
|
using System.Web.UI.WebControls;
|
|
using HWSB = SuperMap.RealEstate.HighWay.Storage.Business;
|
|
|
|
namespace SuperMap.RealEstate.ExchangeData.Modules.CustomerAnalysis
|
|
{
|
|
public partial class ObjectTreeView : BasePage
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (IsPostBack) return;
|
|
|
|
try
|
|
{
|
|
//设置树节点点击遮罩层效果
|
|
FixTreeViewClickForTargetMask(MyTreeView);
|
|
//绑定业主单位服务区树
|
|
TreeViewBinding();
|
|
//查询按钮点击遮罩层效果
|
|
SetControlClientAction(ButtonSearch);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
private void TreeViewBinding(string obscureName = "")
|
|
{
|
|
MyTreeView.Nodes.Clear();
|
|
TreeNode _TreeNodeFirst = new TreeNode();
|
|
_TreeNodeFirst.Text = "全部服务区";
|
|
_TreeNodeFirst.Value = "0";
|
|
_TreeNodeFirst.NavigateUrl = "CUSTOMER_ANALYSISList.aspx";
|
|
|
|
//获取服务区【STATISTICS_TYPE=1000】列表
|
|
DataTable dtServerpart = new HWSB.SERVERPART(Transaction).FillDataTable(
|
|
"WHERE STATISTICS_TYPE = 1000 AND PROVINCE_CODE = " + ProvinceID);
|
|
|
|
foreach (DataRow _DataRow in dtServerpart.Select("", "SERVERPART_INDEX,SERVERPART_CODE"))
|
|
{
|
|
TreeNode _TreeNodeServerPart = new TreeNode();
|
|
_TreeNodeServerPart.Text = $"【{ _DataRow["SERVERPART_CODE"] }】{ _DataRow["SERVERPART_NAME"] }";
|
|
_TreeNodeServerPart.Value = _DataRow["SERVERPART_CODE"].ToString();
|
|
_TreeNodeServerPart.NavigateUrl = "CUSTOMER_ANALYSISList.aspx?SERVERPART_ID=" + _DataRow["SERVERPART_ID"].ToEncrypt();
|
|
_TreeNodeFirst.ChildNodes.Add(_TreeNodeServerPart);
|
|
}
|
|
if (_TreeNodeFirst.ChildNodes.Count > 0)
|
|
{
|
|
MyTreeView.Nodes.Add(_TreeNodeFirst);
|
|
}
|
|
}
|
|
|
|
protected void ButtonSearch_Click(object sender, EventArgs e)
|
|
{
|
|
TreeViewBinding(TextBoxSearch.Text);
|
|
}
|
|
}
|
|
} |