RT,方法如下:

 

1         SPListItemCollection GetSubItemsWithoutFoldersInParrentFolder(SPFolder parrent)
2         {
3             SPList list = parrent.Item.ParentList;
4             SPQuery query = new SPQuery();
5             query.Folder = parrent;
6             query.Query = "<Where><Eq><FieldRef Name='FSObjType'/><Value Type='Lookup'>0</Value></Eq></Where>";
7             SPListItemCollection items = list.GetItems(query);
8             return items;
9         }

 

posted on 2014-05-23 17:57  [北京]烽火  阅读(302)  评论(0编辑  收藏  举报