87 lines
4.0 KiB
C#
87 lines
4.0 KiB
C#
using System;
|
|
using System.Configuration;
|
|
using System.Web.UI.WebControls;
|
|
using SuperMap.RealEstate.Web.Utility;
|
|
|
|
namespace SuperMap.RealEstate.HighWay.Compents.CommodityChange
|
|
{
|
|
public partial class CommodityTreeView : SuperMap.RealEstate.Web.UI.Page
|
|
{
|
|
protected string _SERVERPART_ID = ConfigurationManager.AppSettings["UmiformCommodity"].ToString().Split('|')[0];
|
|
|
|
private Storage.Business.COMMODITYTYPE _COMMODITYTYPE = null;
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (IsPostBack) return;
|
|
|
|
try
|
|
{
|
|
this.FixTreeViewDoubleClick(MyTreeView, true);
|
|
TreeViewBinding(true);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
}
|
|
|
|
private void TreeViewBinding(bool withChildNodes)
|
|
{
|
|
MyTreeView.Nodes.Clear();
|
|
//添加全部类别
|
|
TreeNode treeNode = new TreeNode();
|
|
treeNode.Text = "全部类别";
|
|
treeNode.NavigateUrl = UriHelper.AddRequestToUrl("COMMODITYList.aspx?ID=" + "0".ToEncrypt() + "&HIGHWAYPROINST_ID=" +
|
|
Request["HIGHWAYPROINST_ID"] + "&BUSINESSTYPE=" + Request["BUSINESSTYPE"] + "&PopDialogPageName=" +
|
|
Request["PopDialogPageName"] + "&PopDialogName=" + Request["PopDialogName"], "Module_ID", Request["Module_ID"]);
|
|
treeNode.Value = "1=1";
|
|
treeNode.ImageToolTip = "COMMODITYTYPE";
|
|
treeNode.ImageUrl = "";
|
|
//treeNode.Expanded = new bool?(false);
|
|
this.MyTreeView.Nodes.Add(treeNode);
|
|
//treeNode.PopulateOnDemand = true;
|
|
_COMMODITYTYPE = new Storage.Business.COMMODITYTYPE(this.Transaction);
|
|
|
|
if (!string.IsNullOrWhiteSpace(Request["SERVERPART_ID"]))
|
|
{
|
|
if (Request["SERVERPART_ID"] == _SERVERPART_ID.ToEncrypt())
|
|
{
|
|
//统一定价服务区
|
|
_COMMODITYTYPE.BindingTreeView_JudgeValid("-1", treeNode.ChildNodes, "", withChildNodes, Request["Module_ID"], true,
|
|
"COMMODITYList.aspx", 0, false, false, null, "&HIGHWAYPROINST_ID=" + Request["HIGHWAYPROINST_ID"] +
|
|
"&BUSINESSTYPE=" + Request["BUSINESSTYPE"] + "&SERVERPART_ID=" + Request["SERVERPART_ID"] +
|
|
"&PopDialogPageName=" + Request["PopDialogPageName"] + "&PopDialogName=" + Request["PopDialogName"]);
|
|
}
|
|
else
|
|
{
|
|
_COMMODITYTYPE.BindingTreeView_JudgeValid("-1", treeNode.ChildNodes, "", withChildNodes, Request["Module_ID"], true,
|
|
"COMMODITYList.aspx", 0, false, false, null, "&HIGHWAYPROINST_ID=" + Request["HIGHWAYPROINST_ID"] +
|
|
"&BUSINESSTYPE=" + Request["BUSINESSTYPE"] + "&SERVERPART_ID=" + Request["SERVERPART_ID"] +
|
|
"&PopDialogPageName=" + Request["PopDialogPageName"] + "&PopDialogName=" + Request["PopDialogName"], null, true);
|
|
}
|
|
}
|
|
else
|
|
{
|
|
_COMMODITYTYPE.BindingTreeView_JudgeValid("-1", treeNode.ChildNodes, "", withChildNodes, Request["Module_ID"], true,
|
|
"COMMODITYList.aspx", 0, false, false, null, "&HIGHWAYPROINST_ID=" + Request["HIGHWAYPROINST_ID"] + "&BUSINESSTYPE=" +
|
|
Request["BUSINESSTYPE"] + "&PopDialogPageName=" + Request["PopDialogPageName"] + "&PopDialogName=" + Request["PopDialogName"]);
|
|
}
|
|
|
|
}
|
|
protected void MyTreeView_TreeNodePopulate(object sender, TreeNodeEventArgs e)
|
|
{
|
|
if (_COMMODITYTYPE == null)
|
|
{
|
|
_COMMODITYTYPE = new Storage.Business.COMMODITYTYPE(this.Transaction);
|
|
}
|
|
_COMMODITYTYPE.BindingTreeView_JudgeValid(e.Node.Value, e.Node.ChildNodes, "", true, "1234", true);
|
|
}
|
|
protected void ButtonSearch_Click(object sender, EventArgs e)
|
|
{
|
|
TreeViewBinding(true);
|
|
}
|
|
}
|
|
} |