zoukankan      html  css  js  c++  java
  • 使用linq获得当前文件夹下的下一级满足条件的文件夹

    使用linq获得当前文件夹下的下一级满足条件的文件夹。
                SPFolderCollection subAlbums = Folder.SubFolders;
                var lstSubAlbums = from SPFolder f in subAlbums
                                   where f.Name != "_t" && f.Name != "_w" && f.Name != "Forms"   //注意先后顺序,"_t"没有Item["_ModerationStatus"]属性                        
                                   && f.Item["_ModerationStatus"].ToString() == "0"
                                   && f.Files.Count > 0
                                   orderby f.Item["Created"] descending
                                   select f;

                var pageAlbums = (from SPFolder pf in lstSubAlbums select pf)
                                    .Skip((aspnetpagerFile.CurrentPageIndex - 1) * aspnetpagerFile.PageSize)
                                    .Take(aspnetpagerFile.PageSize).ToList();

  • 相关阅读:
    108.异常的传递
    107.捕获异常
    106.异常、模块(异常介绍)
    105.面向对象案例-烤红薯
    104.多态案例
    103.继承案例二
    102.继承案例一
    101.自定义玩家类
    100.自定义枪类
    python基础入门之十四 —— 文件操作
  • 原文地址:https://www.cnblogs.com/dearbear/p/3474509.html
Copyright © 2011-2022 走看看