Пример #1
0
        private static void clearRootTargetRepliesByData(int dataId, string dataType)
        {
            OpenCommentCount objCount = OpenCommentCount.find("DataType=:dtype and DataId=" + dataId)
                                        .set("dtype", dataType)
                                        .first();

            if (objCount == null)
            {
                return;
            }

            objCount.Replies = 0;
            objCount.update();
        }
Пример #2
0
        private static void clearRootTargetRepliesByUrl(String url)
        {
            OpenCommentCount objCount = OpenCommentCount.find("TargetUrl=:url")
                                        .set("url", url)
                                        .first();

            if (objCount == null)
            {
                return;
            }

            objCount.Replies = 0;
            objCount.update();
        }
Пример #3
0
 private static void updateCommentCount(OpenCommentCount objCount, int replies)
 {
     objCount.Replies = replies;
     objCount.update();
 }