zoukankan      html  css  js  c++  java
  • treeView

            /// <summary>
            /// 绑定父节点数据
            /// </summary>
            private void BindData()
            {
                //获取到父节点信息
                var parentNodes = ComRole.ComBill.GetDepartMentDendrogram(1, this.ComUserId);
                if (parentNodes.Any())
                {

                    foreach (var pNodes in parentNodes)
                    {
                        pNodes.ComUserInfo = new ComUserInfo();
                        TreeNode node = new TreeNode();
                        node.Text = pNodes.departmentName;
                        node.Value = pNodes.identify.ToString();
                        treeDepart.Nodes.Add(node);
                        BindChildData(node, Convert.ToInt64(pNodes.identify));
                    }
                }
                iframes.Attributes.Add("src", "ComDeptContentPage.aspx?id=170");
            }



            /// <summary>
            /// 绑定子节点
            /// </summary>
            /// <param name="parentId"></param>
            private void BindChildData(TreeNode nd, long parentId)
            {
                //获取子节点信息
                var childNodes = ComRole.ComBill.GetDepartMentDendrogram(parentId, this.ComUserId);
                if (childNodes.Any())
                {
                    foreach (var childNode in childNodes)
                    {
                        TreeNode tn = new TreeNode();
                        tn.Text = childNode.departmentName;
                        tn.Value = childNode.identify.ToString();
                        nd.ChildNodes.Add(tn);
                        BindChildData(tn, Convert.ToInt64(childNode.identify));
                    }
                }
            }

  • 相关阅读:
    SpringCloud------熔断与降级
    Linux中的defunct进程(僵尸进程)
    网站论坛收藏
    同步与阻塞,异步与非阻塞的区别
    Linux下批量杀掉筛选进程
    MapReduce运行原理和过程
    TF-IDF原理
    如何解决VMware 虚拟机不能铺满屏幕
    桥接和nat连接
    http: server gave HTTP response to HTTPS client & Get https://192.168.2.119/v2/: dial tcp 192.168.2.119:443: getsockopt: connection refused
  • 原文地址:https://www.cnblogs.com/Mancy/p/2504391.html
Copyright © 2011-2022 走看看