Esempio n. 1
0
        /// <summary>
        ///递归 获得此文件夹的所有子目录的ID(包括子子目录)
        /// </summary>
        /// <param name="lists">将ID放入此集合中</param>
        /// <param name="fileId"></param>
        public static void GetAllChildByFileId(IList <int> lists, int fileId)
        {
            IList <FileInfo> fileLists = FileInfoService.GetFileByParentId(fileId);

            foreach (FileInfo file in fileLists)
            {
                lists.Add(file.FileId);
                GetAllChildByFileId(lists, file.FileId);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// 根据父ID查找对象
 /// </summary>
 /// <param name="parentId"></param>
 /// <returns></returns>
 public static IList <FileInfo> GetFileByParentId(int parentId)
 {
     return(FileInfoService.GetFileByParentId(parentId));
 }