public List <ISPCFolder> GetSubFolders(ISPCFolder folder) { List <ISPCFolder> subFolders = new List <ISPCFolder>(); if (folder as EUWeb != null) { EUWeb web = (EUWeb)folder; List <EUWeb> webs = SharePointManager.GetWebs(web.Url, web.SiteSetting); foreach (EUWeb _web in webs) { subFolders.Add(_web); } List <EUList> lists = SharePointManager.GetLists(web.Url, web.SiteSetting); foreach (EUList list in lists) { if ( (list.ServerTemplate == 101 || list.ServerTemplate == 100 || list.BaseType == 1) && //or BaseType == 1 - JOEL JEFFERY 20110708 list.Hidden == false ) { subFolders.Add(list); } } } else if (folder as EUFolder != null) { EUFolder _folder = (EUFolder)folder; IEnumerable <EUFolder> folders = SharePointManager.GetFolders(_folder); foreach (EUFolder __folder in folders) { subFolders.Add(__folder); } } return(subFolders); }