84 lines
3.3 KiB
C#
84 lines
3.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using System.Data;
|
|
using SuperMap.RealEstate.CoreFrameWork;
|
|
using SuperMap.RealEstate.Web.Utility;
|
|
using SuperMap.RealEstate.CoreFrameWork.Dictionary.Business;
|
|
using HWSB = SuperMap.RealEstate.HighWay.Storage.Business;
|
|
|
|
namespace SuperMap.RealEstate.ExchangeData.Modules.UploadStatistics
|
|
{
|
|
public partial class UploadStatisticsTree : BasePage
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (IsPostBack) return;
|
|
BindingTreeView(true);
|
|
}
|
|
|
|
#region 方法 -> 绑定服务区
|
|
protected void BindingTreeView(bool withChildNodes)
|
|
{
|
|
MyTreeView.Nodes.Clear();
|
|
|
|
TreeNode _TreeNodeAll = new TreeNode();
|
|
_TreeNodeAll.NavigateUrl = UriHelper.AddRequestToUrl("UploadStatisticsList.aspx", null);
|
|
_TreeNodeAll.Text = "所有省份";
|
|
_TreeNodeAll.Value = "1=1";
|
|
_TreeNodeAll.Expanded = true;
|
|
|
|
foreach (HWSB.SERVERPART _SERVERPART in new HWSB.SERVERPART(Transaction).GetPassportServerPart(PassportInfo.CityAuthority))
|
|
{
|
|
TreeNode _TreeNode = new TreeNode();
|
|
_TreeNode.NavigateUrl = UriHelper.AddRequestToUrl("UploadStatisticsList.aspx?SERVERPART_CODE=" + _SERVERPART.SERVERPART_CODE.ToEncrypt(), null);
|
|
_TreeNode.Text = _SERVERPART.SERVERPART_NAME;
|
|
_TreeNode.Value = _SERVERPART.SERVERPART_ID_Encrypt;
|
|
_TreeNodeAll.ChildNodes.Add(_TreeNode);
|
|
foreach (HWSB.SERVERPARTSHOP _SERVERPARTSHOP in (new HWSB.SERVERPARTSHOP(this.Transaction)).FillCollection(
|
|
"WHERE SERVERPART_ID = " + _SERVERPART.SERVERPART_ID + " AND ISVALID = 1 ORDER BY SHOPREGION,SHOPCODE"))
|
|
{
|
|
TreeNode _ChildTreeNode = new TreeNode();
|
|
_ChildTreeNode.NavigateUrl = UriHelper.AddRequestToUrl("UploadStatisticsList.aspx?SERVERPART_CODE=" +
|
|
_SERVERPART.SERVERPART_CODE.ToEncrypt() + "&SHOPCODE=" + _SERVERPARTSHOP.SHOPCODE.ToEncrypt(), null);
|
|
_ChildTreeNode.Text = _SERVERPARTSHOP.SHOPNAME;
|
|
_ChildTreeNode.Value = _SERVERPARTSHOP.SHOPCODE.ToEncrypt();
|
|
_TreeNode.ChildNodes.Add(_ChildTreeNode);
|
|
}
|
|
_TreeNode.Expanded = false;
|
|
}
|
|
MyTreeView.Nodes.Add(_TreeNodeAll);
|
|
//MyTreeView.ExpandAll();
|
|
}
|
|
#endregion
|
|
|
|
#region 方法 -> 查询TreeView数据事件
|
|
protected void ButtonSearch_Click(object sender, EventArgs e)
|
|
{
|
|
BindingTreeView(false);
|
|
}
|
|
#endregion
|
|
|
|
#region 方法 -> 展开收起按钮
|
|
protected void Expand_Click(object sender, EventArgs e)
|
|
{
|
|
if (Expand.Text == "收起↑")
|
|
{
|
|
foreach (TreeNode _TreeNode in MyTreeView.Nodes)
|
|
{
|
|
_TreeNode.Expanded = false;
|
|
}
|
|
Expand.Text = "展开↓";
|
|
}
|
|
else if (Expand.Text == "展开↓")
|
|
{
|
|
MyTreeView.ExpandAll();
|
|
Expand.Text = "收起↑";
|
|
}
|
|
}
|
|
#endregion
|
|
}
|
|
} |