public Microsoft.SharePoint.SPListItem CreateDiscussion(Microsoft.SharePoint.SPList m_list, SEMessage m_message)
        {
            var item = SPUtility.CreateNewDiscussion(m_list, m_message[SEMessage.SUBJECT]);

            item[SPBuiltInFieldId.Body] = m_message.PlainBody;
            return(item);
        }
 public AddFolderCommand(string listName, string folderName, SP.SPWeb web)
     : base(web)
 {
     _folderName = folderName;
     _list = _web.Lists.TryGetList(listName);
     if (_list == default(SP.SPList)) { throw new Exception(string.Format("Could not find any list with the name {0}", listName)); }
 }
 public AddFolderCommand(SP.SPList list, string folderName, SP.SPWeb web)
     : base(web)
 {
     _listName = list.Title;
     _list = list;
     _folderName = folderName;
 }
        public override int IsMatch(Microsoft.SharePoint.SPList list, SPContentTypeId ctId, int ItemId)
        {
            if (string.IsNullOrEmpty(ContentTypeID))
            {
                return(SearchMatchLevel.NONE);
            }
            SPContentTypeId ct;

            try
            {
                ct = new SPContentTypeId(ContentTypeID);
                if (ct.CompareTo(ctId) == 0)
                {
                    return(SearchMatchLevel.ITEM_BY_CT_ID_EXACTLY);
                }
                if ((IncludingChilds) && (ct.IsChildOf(ctId) || (ct.CompareTo(ctId) == 0)))
                {
                    return(SearchMatchLevel.ITEM_BY_CT_ID_INHERITED);
                }
            }
            catch (Exception ex)
            {
                Logger.WriteTrace(ex, Logging.SeverityEnum.Error);
            }
            return(SearchMatchLevel.NONE);
        }
Esempio n. 5
0
 public AddItemCommand(SP.SPList list, string subfolder,SP.SPWeb web)
     : base(web)
 {
     _listName = list.Title;
     _list = list;
     _subfolder = subfolder;
 }
Esempio n. 6
0
 public AddItemCommand(SP.SPList list, SP.SPWeb web)
     : base(web)
 {
     _listName = list.Title;
     _list = list;
 }