private void SearchSubNode(TreeNode node, long ModuleID, long GroupID, HIS.Base_BLL.GroupMenuManager gmm) { foreach (TreeNode nd in node.Nodes) { if (nd.Checked) { MenuInfo mInfo = (MenuInfo)nd.Tag; if (mInfo.IsModule == false) { if (nd.Checked) { gmm.AddGroupMenu(Convert.ToInt32(GroupID), Convert.ToInt32(ModuleID), Convert.ToInt32(mInfo.MenuID)); } } } SearchSubNode(nd, ModuleID, GroupID, gmm); } }
private void SearchTreeNode(ref ArrayList Sql) { long groupId = Convert.ToInt64(this.lstGroup.SelectedItems[0].Tag); HIS.Base_BLL.GroupMenuManager gmm = new HIS.Base_BLL.GroupMenuManager( ); gmm.BeginEdit( ); try { foreach (TreeNode node in this.tvwMenu.Nodes) { MenuInfo mInfo = (MenuInfo)node.Tag; if (mInfo.IsModule) { gmm.DeleteGroupMenu(Convert.ToInt32(groupId), Convert.ToInt32(mInfo.ModuleID)); } SearchSubNode(node, mInfo.ModuleID, groupId, gmm); } gmm.EndEdit( ); } catch { gmm.AbortEdit( ); } }