Exemple #1
0
 private static void LoadTreeNode(List <SYS_DEPT> listMenus, List <EasyUIDEPTTree> listTreeNodes, string pid)
 {
     foreach (SYS_DEPT menu in listMenus)
     {
         if (menu.PARENT_CODE == pid)
         {
             EasyUIDEPTTree node = menu.TransformTreeNode();
             listTreeNodes.Add(node);
             LoadTreeNode(listMenus, node.children, node.DEPT_CODE);
         }
     }
 }
Exemple #2
0
        private EasyUIDEPTTree TransformTreeNode()
        {
            //string orgOpenState = ConfigurationSettings.AppSettings["OrgOpenState"];
            EasyUIDEPTTree easyUITreeNode = new EasyUIDEPTTree()
            {
                DEPT_CODE = this.DEPT_CODE,
                deptname  = this.DEPT_NAME,
                state     = this.STATUS_FLAG.Equals("1") ? "open" : "closed", //只有存在下级才可设为closed,否则会循环查询
                iconCls   = this.C_ICO,
                Checked   = true,                                             //this.STATE == 1 ? true : false,
                deptnote  = this.NOTE,
                children  = new List <EasyUIDEPTTree>()
            };

            return(easyUITreeNode);
        }