예제 #1
0
        //构建文件种类树
        public List <CatalogTreeNode> BuildCatTree()
        {
            List <CatalogTreeNode> nodes = new List <CatalogTreeNode>();

            guidelinescatalogs fcs = new guidelinescatalogs();

            DbSet <guidelines_catalog> ta = fcs.GetCatalogsSet();

            var roots = ta.Where(s => s.parent_Catalog == null).ToList();

            foreach (var root in roots)
            {
                nodes.Add(BuildCatNodes(root));
            }

            return(nodes);
        }
예제 #2
0
        /// <summary>
        /// 增加一个文件分类
        /// </summary>
        /// <param name="parentID"></param>
        /// <param name="newCatalog"></param>
        /// <returns></returns>
        public bool AddNewCatalog(int parentID, string newCatalog)
        {
            guidelinescatalogs fcs = new guidelinescatalogs();

            return(fcs.AddNewCatalog(parentID, newCatalog));
        }