Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        private void LoadLists(TreeNode node, string webUrl, EUSiteSetting siteSetting)
        {
            SPFoldersTreeView.BeginUpdate();
            List <EUList> lists = SharePointManager.GetLists(webUrl, 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
                    )
                {
                    TreeNode listNode = node.Nodes.Add(list.Title);
                    listNode.Tag = list;
                    SetTreeNodeImage(listNode);
                    AddLoadingNode(listNode);

                    //                    TreeNode rootFolderNode = listNode.Nodes.Add(list.RootFolder.Title);
                    //                    rootFolderNode.Tag = list.RootFolder;
                    //                    SetTreeNodeImage(rootFolderNode);
                    //                    AddLoadingNode(rootFolderNode);
                    if (list.ServerTemplate == 101)
                    {
                    }
                }
            }
            SPFoldersTreeView.EndUpdate();
        }
Exemplo n.º 3
0
        public void Initialize()
        {
            List <EUList> lists = SharePointManager.GetLists(webUrl, siteSetting);

            foreach (EUList list in lists)
            {
                ListsComboBox.Items.Add(list);
            }
            if (ListsComboBox.Items.Count > -1)
            {
                ListsComboBox.SelectedIndex = 0;
            }
        }