コード例 #1
0
 /// <summary>
 /// Cleanup any taxonomy related items.
 /// </summary>
 /// <param name="contentItemID"></param>
 private static void CompleteQuestionDelete(int contentItemID)
 {
     var cntTaxonomy = new Content();
     cntTaxonomy.DeleteContentItem(contentItemID);
 }
コード例 #2
0
        /// <summary>
        /// Handles any content item/taxonomy updates, then deals with cache clearing. 
        /// </summary>
        /// <param name="objAlbum"></param>
        /// <param name="tabId"></param>
        private static void CompleteQuestionUpdate(AlbumInfo objAlbum, int tabId)
        {
            var cntTaxonomy = new Content();
            cntTaxonomy.UpdateContentItem(objAlbum, tabId);

            DataCache.RemoveCache(Constants.ModuleCacheKey + Constants.HomeQuestionsCacheKey + objAlbum.ModuleID);

            if (objAlbum.ParentId >= 1) return;
            DataCache.RemoveCache(Constants.ModuleCacheKey + Constants.HomeTermsCacheKey + objAlbum.ModuleID);
            DataCache.RemoveCache(Constants.ModuleCacheKey + Constants.ModuleTermsCacheKey + objAlbum.ModuleID);
            DataCache.RemoveCache(Constants.ModuleCacheKey + Constants.ModuleQuestionsCacheKey + objAlbum.ModuleID);
            DataCache.RemoveCache(Constants.ModuleCacheKey + Constants.ContentTermsCacheKey + objAlbum.ContentID);
        }
コード例 #3
0
        /// <summary>
        /// This completes the things necessary for creating a content item in the data store. 
        /// </summary>
        /// <param name="objPost">The PostInfo entity we just created in the data store.</param>
        /// <param name="tabId">The page we will associate with our content item.</param>
        /// <returns>The ContentItemId primary key created in the Core ContentItems table.</returns>
        private static int CompleteQuestionCreation(PostInfo objPost, int tabId)
        {
            var cntTaxonomy = new Content();
            var objContentItem = cntTaxonomy.CreateContentItem(objPost, tabId);

            return objContentItem.ContentItemId;
        }