sharepoint 2010 найти в Документе установить допустимые типы контента - PullRequest
1 голос
/ 16 марта 2012

Как найти все типы контента в наборе документов и, в частности, как выбрать допустимые типы контента

1 Ответ

1 голос
/ 19 марта 2012
SPDocumentLibrary oDocumentLibrary = (SPDocumentLibrary)list;
SPContentTypeCollection typecollection = oDocumentLibrary.ContentTypes;
string a = null;
foreach (SPContentType types in typecollection)
{
    a = types.Parent.Id.ToString();
    ArrayList masyvas = new ArrayList();
    ArrayList masyvas22 = new ArrayList();
    if (a.Contains("0x0120D520"))  //DocumentSeto id
    {
        masyvas22.Add(types); //dadeta
        masyvas.Add(types.Id);
        //tikrint type id bus reikalinga kuriant document seta  
        DocumentSetTemplate temp = DocumentSetTemplate.GetDocumentSetTemplate(types);
        AllowedContentTypeCollection allowedcontenttype = temp.AllowedContentTypes;
        String g = null;
        foreach (SPContentTypeId ss in allowedcontenttype)
        {
// ...
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...