07 2012 档案
SharePoint 2010 自定义Ribbon实现文档批量下载为Zip文件
摘要:在SharePoint 2010文档库中,结合单选框,在Ribbon中提供了批量处理文档的功能,比如,批量删除、批量签出、批量签入等,但是,很遗憾,没有提供批量下载,默认的只能一个个下载,当选择多个文档时,下载副本就变成了灰色不可用。在此我们将开发一个Ribbon按钮,实现文档(包括含有文件夹)的批量下载为Zip压缩包的功能。先上传一张项目的资源管理结构现在开始:打开VS2010,创建一个“空白SharePoint项目”命名DeviantPoint.DownloadZip指定用于部署的网站然后添加一个到ICSharpCode.SharpZipLib.dll(一个.NET类库,用于处理Zip文件 阅读全文
posted @ 2012-07-31 15:11 Black Bean 阅读(466) 评论(1) 推荐(0)
增加一条记录到列表中并指定用哪个Content Type
摘要:http://blog.the-dargans.co.uk/2007/04/programmatically-adding-items-to.htmlhttp://asadewa.wordpress.com/2007/11/19/adding-a-custom-content-type-specific-item-on-a-sharepoint-list/Short walk through:Get a instance of the list you want to add the item to.Add a new item to the list:SPListItem newItem = 阅读全文
posted @ 2012-07-24 20:57 Black Bean 阅读(143) 评论(0) 推荐(0)
得到站点中所有的Content Type
摘要:SPContentTypeId id =newSPContentTypeId(BaseContentTypeId);IList<SPContentType>ContentTypes= web.ContentTypes.Cast<SPContentType>().Where(c => c.Id.IsChildOf(id)).ToList();using(SPSite site =newSPSite(SPContext.Current.Site.Url)){ using(SPWeb web = site.OpenWeb()) { SPContentTypeCollec 阅读全文
posted @ 2012-07-24 20:55 Black Bean 阅读(158) 评论(3) 推荐(0)