2025-03-27 15:05:14 +08:00

47 lines
1.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.FrameWork.Business;
namespace Personnel.WebSite.Modules.Process
{
public partial class UserTree : BasePage
{
UserType _UserType = new UserType();
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack) return;
SetControlClientAction(ButtonSearch);
this.FixTreeViewDoubleClick(MyTreeView,true);
_UserType.Open();
TreeViewBinding(false);
_UserType.Close();
}
//绑定数据源
private void TreeViewBinding(bool withChildNodes)
{
MyTreeView.Nodes.Clear();
_UserType.BindingTreeView("-1", MyTreeView.Nodes,
TextBoxSearch.Text, withChildNodes,"", "UserEmpty.aspx");
}
protected void MyTreeView_TreeNodePopulate(object sender, TreeNodeEventArgs e)
{
_UserType.Open();
_UserType.BindingTreeView(e.Node.Value, e.Node.ChildNodes,
TextBoxSearch.Text, false, "", "UserEmpty.aspx");
_UserType.Close();
}
protected void ButtonSearch_Click(object sender, EventArgs e)
{
_UserType.Open();
TreeViewBinding(false);
_UserType.Close();
}
}
}