private bool CheckParentDocDir(string parentDirCode) { if (parentDirCode == "") { return(true); } ITreeObjectNode node = LoadDocumentTreeToApplication().GetTreeObjectNodeByID(this.txtDirSerialEdit.Text); if (node == null) { ExceptionManager.Raise(this.GetType(), "$Error_Node_Lost"); } TreeObjectNodeSet set = node.GetAllNodes(); foreach (ITreeObjectNode childNode in set) { if (childNode.ID.ToUpper() == parentDirCode.ToUpper()) { ExceptionManager.Raise(this.GetType(), "$Error_Parent_To_Children"); } } return(true); }
/* * private void treeMenu_NodeClicked(object sender, Infragistics.WebUI.UltraWebNavigator.WebTreeNodeEventArgs e) * { * if ( e.Node.Tag != null ) * { * this.txtMenuCodeQuery.Text = ((MenuTreeNode)e.Node.Tag).MenuWithUrl.MenuCode; * } * else * { * this.txtMenuCodeQuery.Text = ""; * } * * this.gridHelper.RequestData(); * this.buttonHelper.PageActionStatusHandle( PageActionType.Query ); * * try * { * this.drpParentMenuCodeEdit.SelectedValue = this.txtMenuCodeQuery.Text; * } * catch * { * this.drpParentMenuCodeEdit.SelectedIndex = 0; * } * } */ private bool CheckParentMenu(string parentMenuCode) { if (parentMenuCode == "") { return(true); } ITreeObjectNode node = this.LoadMenuTree().GetTreeObjectNodeByID(this.txtMenuCodeEdit.Text); if (node == null) { ExceptionManager.Raise(this.GetType(), "$Error_Node_Lost"); } TreeObjectNodeSet set = node.GetAllNodes(); foreach (ITreeObjectNode childNode in set) { if (childNode.ID.ToUpper() == parentMenuCode.ToUpper()) { ExceptionManager.Raise(this.GetType(), "$Error_Parent_To_Children"); } } return(true); }