84 lines
2.9 KiB
C#
84 lines
2.9 KiB
C#
using SuperMap.RealEstate.MainTenance.Modules.Problem;
|
|
using SuperMap.RealEstate.Web.UI.WebControls;
|
|
using SuperMap.RealEstate.Web.Utility;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using static SuperMap.RealEstate.MainTenance.Storage.Business.USERDEFINEDTYPE;
|
|
using HWSB = SuperMap.RealEstate.MainTenance.Storage.Business;
|
|
|
|
namespace SuperMap.RealEstate.MainTenance.Storage.Modules.Equipmentmanage
|
|
{
|
|
public partial class ObjectTree : BasePage
|
|
{
|
|
|
|
private Business.EQUIPMENTREPERTORY _EQUIPMENTREPERTORY = null;
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (IsPostBack) return;
|
|
try
|
|
{
|
|
this.FixTreeViewDoubleClick(MyTreeView, true);
|
|
SetControlClientAction(ButtonSearch);
|
|
TreeViewBinding(true);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
}
|
|
|
|
|
|
//绑定数据
|
|
public void TreeViewBinding(bool withChildNodes)
|
|
{
|
|
_EQUIPMENTREPERTORY = new Business.EQUIPMENTREPERTORY(this.Transaction);
|
|
|
|
MyTreeView.Nodes.Clear();
|
|
TreeNode treeNode = new TreeNode();
|
|
treeNode.Text = "全部类别";
|
|
treeNode.NavigateUrl = UriHelper.AddRequestToUrl("EQUIPMENTREPERTORYList.aspx?DEPARTMENT_ID=" +
|
|
"0".ToEncrypt() + "&DATATYPE=" + Request["DATATYPE"], "Module_ID", "1234");
|
|
treeNode.Value = "1=1";
|
|
treeNode.ImageToolTip = "COMMODITYTYPE";
|
|
treeNode.ImageUrl = "";
|
|
this.MyTreeView.Nodes.AddAt(0, treeNode);
|
|
|
|
_EQUIPMENTREPERTORY.BindingTreeView("-1", this.MyTreeView.Nodes[0].ChildNodes,
|
|
this.TextBoxSearch.Text, false, "1234", "EQUIPMENTREPERTORYList.aspx", false, true, "&DATATYPE=" + Request["DATATYPE"]);
|
|
MyTreeView.ExpandAll();
|
|
}
|
|
|
|
/// <summary>
|
|
/// 查询树,并获取仓库信息
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void ButtonSearch_Click(object sender, EventArgs e)
|
|
{
|
|
if (string.IsNullOrEmpty(TextBoxSearch.Text))
|
|
{
|
|
string text = TextBoxSearch.Text.Trim();
|
|
}
|
|
TreeViewBinding(false);
|
|
}
|
|
|
|
protected void MyTreeView_TreeNodePopulate(object sender, TreeNodeEventArgs e)
|
|
{
|
|
if (_EQUIPMENTREPERTORY == null)
|
|
{
|
|
_EQUIPMENTREPERTORY = new Business.EQUIPMENTREPERTORY(this.Transaction);
|
|
}
|
|
_EQUIPMENTREPERTORY.BindingTreeView(e.Node.Value, e.Node.ChildNodes,
|
|
this.TextBoxSearch.Text, false, "1234", "EQUIPMENTREPERTORYList.aspx", false, false);
|
|
MyTreeView.ExpandAll();
|
|
}
|
|
}
|
|
} |