1
Как найти все типы контента в наборе документов и escpecially том, как выбранные допустимые типыSharePoint 2010 находят в докумен набор разрешенных типов контента
Как найти все типы контента в наборе документов и escpecially том, как выбранные допустимые типыSharePoint 2010 находят в докумен набор разрешенных типов контента
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)
{
// ...
содержание