/// <summary> /// 页面加载 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { #region 页面显示控制 UCSelectType = "1"; //只选人 UCIsSingle = true; //单选 UCDeptIDControl = hUCDeptID.ClientID; UCDeptUserIDControl = hUCDeptUserID.ClientID; UCShowDeptID = OADept.GetDeptIDByUser2(CurrentUserInfo.LoginName); hUCDeptUserID.Value = B_WFAgent.GetAgentUserID(CurrentUserInfo.UserName); if (string.IsNullOrEmpty(UCShowDeptID)) { UCShowDeptID = string.Empty; } if (string.IsNullOrEmpty(UCDeptShowType)) { UCDeptShowType = string.Empty; } //如果需要选人 if (UCSelectType == "1") { tvDB.SelectedNodeChanged += new EventHandler(tvDB_SelectedNodeChanged); } else if (UCSelectType == "2") { tvDB.SelectedNodeChanged += new EventHandler(tvDB_SelectedNodeChanged); } if (UCIsSingle || UCAllSelect) { this.lboxLeft.SelectionMode = System.Web.UI.WebControls.ListSelectionMode.Single; tvDB.TreeNodeCheckChanged += new TreeNodeEventHandler(tvDB_TreeNodeCheckChanged); } #endregion if (!IsPostBack) { //ClientScriptM.ResponseScript(Page, "GetParent();"); Refresh(); } }