コード例 #1
0
ファイル: Utils.cs プロジェクト: LOBOSMARSA122/SLLaboral
        public static FineUI.Tree loadTreeMenu(FineUI.Tree tvMenu, List <applicationhierarchyDto> applicationHierarchys)
        {
            if (applicationHierarchys.Count > 0)
            {
                var parents = applicationHierarchys.FindAll(p => p.i_ParentId == -1);

                foreach (var parent in parents)
                {
                    FineUI.TreeNode parentNode = new FineUI.TreeNode();
                    parentNode.Text           = parent.v_Description;
                    parentNode.AutoPostBack   = true;
                    parentNode.EnableCheckBox = true;
                    parentNode.NodeID         = parent.i_ApplicationHierarchyId.ToString();
                    tvMenu.Nodes.Add(parentNode);

                    loadTreeSubMenu(ref parentNode, parent.i_ApplicationHierarchyId, applicationHierarchys);
                }
            }

            tvMenu.ExpandAllNodes();

            return(tvMenu);
        }
コード例 #2
0
ファイル: Utils.cs プロジェクト: LOBOSMARSA122/SLLaboral
        public static FineUI.Tree loadTreeMenuAuthorized(FineUI.Tree tvMenu, List <AutorizationList> applicationHierarchys)
        {
            if (applicationHierarchys.Count > 0)
            {
                var parents = applicationHierarchys.FindAll(p => p.I_ParentId == -1);

                foreach (var parent in parents)
                {
                    FineUI.TreeNode parentNode = new FineUI.TreeNode();
                    parentNode.Text   = parent.V_Description;
                    parentNode.NodeID = parent.I_ApplicationHierarchyId.ToString();
                    //parentNode.NavigateUrl = string.IsNullOrEmpty(parent.V_Form) ? "" : parent.V_Form;
                    parentNode.ToolTip = parent.V_Description;

                    tvMenu.Nodes.Add(parentNode);

                    loadTreeSubMenuAuthorized(ref parentNode, parent.I_ApplicationHierarchyId, applicationHierarchys);
                }
            }

            tvMenu.ExpandAllNodes();

            return(tvMenu);
        }