90 lines
3.0 KiB
C#
90 lines
3.0 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.HotKeySet
|
|
{
|
|
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
|
|
{
|
|
this.FixTreeViewDoubleClick(MyTreeView, true);
|
|
//SetControlClientAction(ButtonSearch);
|
|
BindServerPartData();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
}
|
|
|
|
protected void ButtonSearch_Click(object sender, EventArgs e)
|
|
{
|
|
//BindServerPartData(false);
|
|
}
|
|
|
|
private void BindServerPartData()
|
|
{
|
|
MyTreeView.Nodes.Clear();
|
|
|
|
string PartString = string.Empty;
|
|
//获得服务区信息
|
|
foreach (string _str in PassportInfo.CityAuthority.Split(','))
|
|
{
|
|
PartString += PartString == string.Empty ? "'" + _str + "'" : ",'" + _str + "'";
|
|
}
|
|
foreach (FieldEnum _FieldEnum in (new FieldEnum()).FillCollection("where FieldEnum_Value in(" + PartString + ")"))
|
|
{
|
|
ListItemEx _ListItem = new ListItemEx();
|
|
_ListItem.Text = _FieldEnum.FieldEnum_Name;
|
|
Storage.Business.SERVERPART _SERVERPART = new Storage.Business.SERVERPART();
|
|
_SERVERPART.AddSearchParameter("FIELDENUM_ID", _FieldEnum.FieldEnum_ID);
|
|
if (_SERVERPART.Search())
|
|
{
|
|
TreeNode _TreeNode = new TreeNode();
|
|
_TreeNode.NavigateUrl = UriHelper.AddRequestToUrl("ObjectList.aspx?SERVERPART_ID=" + _SERVERPART.SERVERPART_ID_Encrypt,null);
|
|
_TreeNode.Text = _SERVERPART.SERVERPART_NAME;
|
|
_TreeNode.Value = _SERVERPART.SERVERPART_ID_Encrypt;
|
|
MyTreeView.Nodes.Add(_TreeNode);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
} |