Example #1
0
 /// <summary>
 /// 分享帖子
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static bool ForumTopicType_Edit(ForumTopicType model)
 {
     try
     {
         using (var conn = DbHelper.CCService())
         {
             var p = new DynamicParameters();
             p.Add("@TopicID", model.TopicID);
             p.Add("@ForumTypeIDS", model.ForumTypeIDS);
             conn.Execute("ForumTopicType_Edit", p, commandType: CommandType.StoredProcedure);
             return true;
         }
     }
     catch (Exception e)
     {
         return false;
     }
 }
Example #2
0
 /// <summary>
 /// 向缓存中写入主题总数
 /// </summary>
 /// <param name="type">主题类型</param>
 /// <param name="relativeID">相关ID</param>
 /// <param name="count">主题总数</param>
 public static void SetForumTopicCountCache(ForumTopicType type, Int32 relativeID, Int32 count)
 {
     CacheManager.Set(GetForumTopicCountCacheKey(type, relativeID), count, FORUM_TOPIC_COUNT_CACHE_TIME);
 }
Example #3
0
 /// <summary>
 /// 从缓存中删除主题总数
 /// </summary>
 /// <param name="type">主题类型</param>
 /// <param name="relativeID">相关ID</param>
 public static void RemoveForumTopicCountCache(ForumTopicType type, Int32 relativeID)
 {
     CacheManager.Remove(GetForumTopicCountCacheKey(type, relativeID));
 }
Example #4
0
 /// <summary>
 /// 增加缓存中主题总数
 /// </summary>
 /// <param name="type">主题类型</param>
 /// <param name="relativeID">相关ID</param>
 public static void IncreaseForumTopicCountCache(ForumTopicType type, Int32 relativeID)
 {
     Int32 count = GetForumTopicCountCache(type, relativeID);
     if (count > 0) SetForumTopicCountCache(type, relativeID, count + 1);
 }
Example #5
0
 /// <summary>
 /// 从缓存中读取主题总数
 /// </summary>
 /// <param name="type">主题类型</param>
 /// <param name="relativeID">相关ID</param>
 /// <returns>主题总数</returns>
 public static Int32 GetForumTopicCountCache(ForumTopicType type, Int32 relativeID)
 {
     return CacheManager.GetInt32(GetForumTopicCountCacheKey(type, relativeID));
 }
Example #6
0
 /// <summary>
 /// 获取主题总数缓存KEY
 /// </summary>
 /// <param name="type">主题类型</param>
 /// <param name="relativeID">相关ID</param>
 /// <returns>缓存KEY</returns>
 private static String GetForumTopicCountCacheKey(ForumTopicType type, Int32 relativeID)
 {
     return String.Format("{0}.{1}:id={2}", FORUM_TOPIC_COUNT_CACHE_KEY, type.ToString(), relativeID.ToString());
 }
Example #7
0
 public static bool ForumTopicType_Edit(ForumTopicType model)
 {
     return new ForumTopicTypeBLL().ForumTopicType_Edit(model);
 }
Example #8
0
 public bool ForumTopicType_Upd(ForumTopicType model)
 {
     throw new NotImplementedException();
 }
Example #9
0
 public ForumTopicType ForumTopicType_ADD(ForumTopicType model)
 {
     throw new NotImplementedException();
 }