91 lines
3.4 KiB
C#
91 lines
3.4 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;
|
|
using Business = SuperMap.RealEstate.HighWay.Storage.Business;
|
|
|
|
namespace SuperMap.RealEstate.SendRec.Modules.Commodity
|
|
{
|
|
public partial class ServerPartTreeView : BasePage
|
|
{
|
|
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);
|
|
BindServerPartData();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
}
|
|
|
|
#region BindServerPartData -> 绑定服务区、门店列表
|
|
private void BindServerPartData()
|
|
{
|
|
MyTreeView.Nodes.Clear();
|
|
string PartString = string.Empty;
|
|
string ProwerString = string.Empty;
|
|
//获得服务区信息
|
|
foreach (string _str in PassportInfo.CityAuthority.Split(','))
|
|
{
|
|
PartString += PartString == string.Empty ? "'" + _str + "'" : ",'" + _str + "'";
|
|
}
|
|
foreach (FieldEnum _FieldEnum in (new FieldEnum(this.Transaction)).FillCollection("where FieldEnum_Value in(" + PartString + ")"))
|
|
{
|
|
ProwerString += ProwerString == "" ? _FieldEnum.FieldEnum_ID.ToString() : "," + _FieldEnum.FieldEnum_ID;
|
|
}
|
|
if (!string.IsNullOrEmpty(Request["SENDREC_TYPE"]))
|
|
{
|
|
MyTreeView.Target = "CommodityInsertObjectDetail" + Request["SENDREC_TYPE"];
|
|
}
|
|
foreach (Business.SERVERPART _SERVERPART in (new Business.SERVERPART(this.Transaction)).FillCollection(
|
|
"where FieldEnum_ID in(" + ProwerString + ") AND STATISTICS_TYPE IN (1000,1001) order by SERVERPART_INDEX,SERVERPART_CODE"))
|
|
{
|
|
ListItemEx _ListItem = new ListItemEx();
|
|
_ListItem.Text = _SERVERPART.SERVERPART_NAME;
|
|
TreeNode _TreeNode = new TreeNode();
|
|
_TreeNode.NavigateUrl = UriHelper.AddRequestToUrl("SearchList.aspx?SERVERPART_ID=" +
|
|
_SERVERPART.SERVERPART_ID_Encrypt + "&SENDREC_TYPE=" + Request["SENDREC_TYPE"] +
|
|
"&PROVINCE_CODE=" + _SERVERPART.PROVINCE_CODE.ToEncrypt(), null);
|
|
_TreeNode.Text = _SERVERPART.SERVERPART_NAME;
|
|
_TreeNode.Value = _SERVERPART.SERVERPART_ID_Encrypt;
|
|
MyTreeView.Nodes.Add(_TreeNode);
|
|
}
|
|
MyTreeView.ExpandAll();
|
|
}
|
|
#endregion
|
|
}
|
|
} |