71 lines
3.2 KiB
C#
71 lines
3.2 KiB
C#
using System;
|
|
using System.Data;
|
|
using System.Web.UI.WebControls;
|
|
using SuperMap.RealEstate.CoreFrameWork;
|
|
using SuperMap.RealEstate.CoreFrameWork.Dictionary.Business;
|
|
using SuperMap.RealEstate.Web.Utility;
|
|
using Business = SuperMap.RealEstate.HighWay.Storage.Business;
|
|
|
|
namespace SuperMap.RealEstate.SendRec.Modules.MerchantsManage
|
|
{
|
|
public partial class MerchantsTreeView : BasePage
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (IsPostBack) return;
|
|
|
|
try
|
|
{
|
|
SetControlClientAction(ButtonAddType, "parent.MerchantsObjectList",
|
|
"MERCHANTSList.aspx?OpenState=1&DEFINETYPE=3000&DATASOURCE_TYPE=" + Request["DATASOURCE_TYPE"], true);
|
|
FixTreeViewDoubleClick(MyTreeView, true);
|
|
TreeViewBinding(true);
|
|
SetControlClientAction(ButtonSearch);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 绑定商户类别树
|
|
/// </summary>
|
|
/// <param name="withChildNodes">是否添加子节点</param>
|
|
/// <param name="obscureName">查询字符</param>
|
|
private void TreeViewBinding(bool withChildNodes, string obscureName = "")
|
|
{
|
|
MyTreeView.Nodes.Clear();
|
|
//定义传参内容
|
|
string RequestStr = "&DEFINETYPE=3000" + (string.IsNullOrWhiteSpace(Request["DATASOURCE_TYPE"]) ?
|
|
"" : "&DATASOURCE_TYPE=" + Request["DATASOURCE_TYPE"]) + (string.IsNullOrWhiteSpace(Request["SERVERPART_ID"]) ?
|
|
"" : "&SERVERPART_ID=" + Request["SERVERPART_ID"]);
|
|
//获取商户标签数据源
|
|
//DataTable DataSourceTypeTable = null;
|
|
//if (!string.IsNullOrWhiteSpace(Request["DATASOURCE_TYPE"]))
|
|
//{
|
|
// DataSourceTypeTable = new Business.AUTOTYPE(Transaction).FillDataTable(
|
|
// "WHERE AUTOTYPE_TYPEID = 3010 AND AUTOTYPE_ID IN (" + Request["DATASOURCE_TYPE"].ToDecrypt() + ")");
|
|
//}
|
|
Business.SERVERPART _SERVERPART = new Business.SERVERPART(Transaction);
|
|
//获取用户服务区权限:查询正式和测试的服务区数据
|
|
string _SERVERPART_IDS = !string.IsNullOrWhiteSpace(Request["SERVERPART_ID"])? Request["SERVERPART_ID"].ToDecrypt() :
|
|
_SERVERPART.GetPassportServerPartID(PassportInfo.CityAuthority, "1000", "1000,2000");
|
|
//获取服务区枚举对象
|
|
FieldExplain _FieldExplain = DictionaryHelper.GetFieldExplain("DIVISION_CODE", Transaction);
|
|
//绑定商户类型树
|
|
_SERVERPART.BindingTreeView_Enum(_FieldExplain.FieldExplain_ID.ToString(), "-1", MyTreeView.Nodes, obscureName,
|
|
withChildNodes, false, "", "", null, null, true, "MERCHANTSList.aspx", true,
|
|
" AND SERVERPART_ID IN (" + _SERVERPART_IDS + ")", RequestStr);
|
|
if (_SERVERPART_IDS.Split(',').Length < 5)
|
|
{
|
|
MyTreeView.ExpandAll();
|
|
}
|
|
}
|
|
|
|
protected void ButtonSearch_Click(object sender, EventArgs e)
|
|
{
|
|
TreeViewBinding(true, this.TextBoxSearch.Text);
|
|
}
|
|
}
|
|
} |