Beispiel #1
0
        /// <summary>
        /// Get a specific view.
        /// </summary>
        /// <param name="listname">Name of the list.</param>
        /// <param name="listid">Id of the view.</param>
        /// <returns></returns>
        public List <string> GetView(string listname, string listid)
        {
            WebServices ws = new WebServices(Credentials, Url);

            return(ws.GetView(listname, listid));
        }
Beispiel #2
0
        /// <summary>
        /// Get a list with views for the selected list.
        /// </summary>
        /// <param name="listname">Name of the list.</param>
        /// <returns>List with SPView.</returns>
        public SPView[] GetViews(string listname)
        {
            WebServices ws = new WebServices(Credentials, Url);

            return(ws.GetViews(listname));
        }
Beispiel #3
0
        /// <summary>
        /// Get a collection with webs on the SharePoint site.
        /// </summary>
        /// <returns>Collection with webs.</returns>
        public SPWeb[] GetWebs()
        {
            WebServices ws = new WebServices(Credentials, Url);

            return(ws.GetWebs());
        }
Beispiel #4
0
        /// <summary>
        /// Upload a file to a SharePoint library.
        /// </summary>
        /// <param name="listUrl">URL to the list.</param>
        /// <param name="sourceFileStream">A Stream with the file.</param>
        /// <param name="fileName">Filename.</param>
        /// <param name="fields">Fields with meta data.</param>
        /// <returns></returns>
        public int UploadItem(string listUrl, Stream sourceFileStream, string fileName, WSCopy.FieldInformation[] fields)
        {
            WebServices ws = new WebServices(Credentials, Url);

            return(ws.UploadItem(listUrl, sourceFileStream, fileName, fields));
        }
        /// <summary>
        /// Returns information about the specified list.
        /// </summary>
        /// <param name="listid"></param>
        /// <returns></returns>
        public SPSingleList GetList(string listid)
        {
            WebServices ws = new WebServices(Credentials, Url);

            return(ws.GetList(listid));
        }