Exemple #1
0
        public List <ISPCFolder> GetFolders(EUSiteSetting siteSetting, ISPCFolder parentFolder)
        {
            Login(siteSetting.User, siteSetting.Password);
            List <ISPCFolder>  folders = new List <ISPCFolder>();
            DocumentsListQuery query   = new DocumentsListQuery();

            if (parentFolder.UniqueIdentifier != String.Empty)
            {
                query = new FolderQuery(parentFolder.UniqueIdentifier);
            }
            query.ShowFolders = true;
            DocumentsFeed feed = service.Query(query);

            foreach (DocumentEntry entry in feed.Entries)
            {
                if (entry.IsFolder)
                {
                    if (parentFolder == null || parentFolder.UniqueIdentifier == String.Empty)
                    {
                        if (entry.ParentFolders.Count > 0)
                        {
                            continue;
                        }
                    }
                    ISPCFolder folder = new GFolder(siteSetting, entry.ResourceId, entry.Title.Text, entry.Id.AbsoluteUri);
                    folders.Add(folder);
                }
            }
            return(folders);
        }
        public bool CheckFileExistency(ISPCFolder folder, ISPCItem item, string newFileName)
        {
            GItem   fileItem = (GItem)item;
            GFolder _folder  = folder as GFolder;

            return(GMailManager.GetInstance().CheckFileExistency(fileItem.SiteSetting, _folder.UniqueIdentifier, fileItem.Title));
        }
        public List <ISPCItem> GetListItems(ISPCFolder folder, ISPCView view, string sortField, bool isAsc, int currentPageIndex, string currentListItemCollectionPositionNext, EUCamlFilters filters, out string listItemCollectionPositionNext, out int itemCount)
        {
            listItemCollectionPositionNext = String.Empty;
            itemCount = 0;
            GFolder _folder = folder as GFolder;

            return(GMailManager.GetInstance().GetItems(folder.SiteSetting, folder));
        }
Exemple #4
0
        public List <IItem> GetListItems(ISiteSetting siteSetting, Folder folder, IView view, string sortField, bool isAsc, int currentPageIndex, string currentListItemCollectionPositionNext, CamlFilters filters, bool isRecursive, out string listItemCollectionPositionNext, out int itemCount)
        {
            listItemCollectionPositionNext = String.Empty;
            itemCount = 0;
            GFolder _folder = folder as GFolder;

            return(this.GetListItems(siteSetting, folder.GetUrl(), string.Empty, false));
        }
        public void UploadFiles(ISPCFolder folder, List <EUEmailUploadFile> uploadFiles, List <EUField> fields, EUFieldInformations fieldInformations, SharePointListViewControl sharePointListViewControl)
        {
            GFolder _folder = folder as GFolder;

            foreach (EUEmailUploadFile emailUploadFile in uploadFiles)
            {
                GMailManager.GetInstance().UploadFile(folder.SiteSetting, emailUploadFile.FilePath, folder.UniqueIdentifier);
            }
        }
        public List <ISPCView> GetViews(ISPCFolder folder)
        {
            List <ISPCView> views   = new List <ISPCView>();
            GFolder         _folder = (GFolder)folder;
            GView           view    = new GView(folder.SiteSetting, _folder.Path, _folder.Title);

            views.Add(view);
            return(views);
        }
Exemple #7
0
        public List <IView> GetViews(ISiteSetting siteSetting, Folder folder)
        {
            List <IView> views   = new List <IView>();
            GFolder      gFolder = folder as GFolder;
            GView        view    = new GView(siteSetting.ID, gFolder.Path, gFolder.Title);

            views.Add(view);
            return(views);
        }
        public void CopyFile(ISPCFolder folder, ISPCItem item, string newFileName)
        {
            GFolder _folder = folder as GFolder;
//            GMailManager.GetInstance().UploadFile(folder.SiteSetting, emailUploadFile.FilePath, folder.UniqueIdentifier);
        }