1 / 7

Создание документов по шаблону с помощью типов контента

Создание документов по шаблону с помощью типов контента. Докладчик: Сергей Бельский Team Leader of developers, DEV-pro. http://blogs.it-club.in.ua/sbelskiy. О чём пойдёт речь?. Создание собственного типа контента ( Windows 7+SQL Express 2008 R2+Sharepoint Foundation 2010 )

deva
Download Presentation

Создание документов по шаблону с помощью типов контента

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Создание документов по шаблону с помощью типов контента Докладчик: Сергей БельскийTeam Leader of developers, DEV-pro http://blogs.it-club.in.ua/sbelskiy

  2. О чём пойдёт речь? Создание собственного типа контента (Windows 7+SQL Express 2008 R2+Sharepoint Foundation 2010) 2. Создание шаблона Word 2010 3. Создание списка входящих данных. 4. Создание рабочего процесса по созданию документа по шаблону

  3. Создание собственного типа контента DEMO

  4. Создание шаблона Word 2010 DEMO

  5. Создание списка входящих данных DEMO

  6. Создание рабочего процесса по созданию документа по шаблону SPSite site = new SPSite(properties.WebUrl); SPWeboWebsite = site.RootWeb; SPWorkflowwf = new SPWorkflow(oWebsite, properties.InstanceId); SPListCollection lists = wf.ParentList.Lists; SPDocumentLibrarydocLib = (SPDocumentLibrary)lists["Docs"]; SPContentTypeCType = docLib.ContentTypes[2]; SPFileCollectionfileCollection = oWebsite.GetFolder(docLib.RootFolder.Url).Files; SPFiletemplate = oWebsite.GetFile(CType.DocumentTemplateUrl); SPFilefile = fileCollection.Add(“test.docx”, template.OpenBinary(), true file.Item["ContentTypeId"] = CType.Id; file.Item["Title"] = file.Name; file.Item.Update(); DEMO

  7. Спасибо за внимание! http://blogs.it-club.in.ua/sbelskiy/default.aspx

More Related