82 lines
3.1 KiB
C#
82 lines
3.1 KiB
C#
using System;
|
|
using System.Configuration;
|
|
using System.Data;
|
|
using SuperMap.RealEstate.CoreFrameWork.Dictionary.Business;
|
|
using SuperMap.RealEstate.CoreFrameWork;
|
|
|
|
namespace SuperMap.RealEstate.HighWay.Modules.HotKeySet
|
|
{
|
|
public partial class ServerPartTreeView : BasePage
|
|
{
|
|
protected string _PROVINCE_CODE = ConfigurationManager.AppSettings["UmiformCommodity"].ToString().Split('|')[2];
|
|
private Storage.Business.SERVERPART _SERVERPART = null;
|
|
|
|
string FieldExplain_ID
|
|
{
|
|
get
|
|
{
|
|
FieldExplain _FieldExplain = new FieldExplain(this.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
|
|
{
|
|
this.FixTreeViewDoubleClick(MyTreeView, true);
|
|
//SetControlClientAction(ButtonSearch);
|
|
BindServerPartData();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
}
|
|
|
|
private void BindServerPartData()
|
|
{
|
|
MyTreeView.Nodes.Clear();
|
|
_SERVERPART = new Storage.Business.SERVERPART(this.Transaction);
|
|
string serverPartWhere = " AND SERVERPART_ID IN (" + _SERVERPART.GetPassportServerPartID(PassportInfo.CityAuthority, "1000") + ")";
|
|
if (string.IsNullOrWhiteSpace(PassportInfo.ProvinceCode))
|
|
{
|
|
if (PassportInfo.ID != null)
|
|
{
|
|
DataTable UserTable = new FrameWork.Business.User(Transaction).ExecuteDataTable(
|
|
"SELECT USER_MOBILEPHONE,USER_PROVINCE,PROVINCE_UNIT FROM T_USER WHERE User_ID = " + PassportInfo.ID);
|
|
if (UserTable.Rows.Count > 0)
|
|
{
|
|
PassportInfo.UserMobilephone = UserTable.Rows[0]["USER_MOBILEPHONE"].ToString();
|
|
PassportInfo.ProvinceCode = UserTable.Rows[0]["USER_PROVINCE"].ToString();
|
|
}
|
|
}
|
|
}
|
|
if (!string.IsNullOrWhiteSpace(PassportInfo.ProvinceCode))
|
|
{
|
|
FieldEnum _FieldEnum = DictionaryHelper.GetFieldEnum("DIVISION_CODE", PassportInfo.ProvinceCode, Transaction);
|
|
_SERVERPART.BindingTreeView_Enum(FieldExplain_ID, _FieldEnum.FieldEnum_ID.ToString(), MyTreeView.Nodes, "",
|
|
true, "12", "", null, null, true, "ObjectList.aspx", true, serverPartWhere);
|
|
}
|
|
else
|
|
{
|
|
_SERVERPART.BindingTreeView_Enum(FieldExplain_ID, _PROVINCE_CODE, MyTreeView.Nodes, "",
|
|
true, "12", "", null, null, true, "ObjectList.aspx", true, serverPartWhere);
|
|
}
|
|
}
|
|
|
|
}
|
|
} |