示例#1
0
        public static bool HasCai(int intCommentID)
        {
            CommentActiveLogInfo model = BizBase.dbo.GetModel <CommentActiveLogInfo>(string.Concat(new object[]
            {
                " SELECT TOP 1 * FROM cms_CommentActiveLog WHERE IsCai=1 AND CommentID=",
                intCommentID,
                " AND IPAddress='",
                IPUtils.GetIP(),
                "' ORDER BY AutoID DESC "
            }));

            return(model != null);
        }
示例#2
0
        public static bool HasDing(int intUserID, int intCommentID)
        {
            CommentActiveLogInfo model = BizBase.dbo.GetModel <CommentActiveLogInfo>(string.Concat(new object[]
            {
                " SELECT TOP 1 * FROM cms_CommentActiveLog WHERE IsDing=1 AND UserID=",
                intUserID,
                " AND CommentID=",
                intCommentID,
                " ORDER BY AutoID DESC "
            }));

            return(model != null);
        }
示例#3
0
        public static int Add(CommentActiveLogInfo entity)
        {
            int result;

            if (entity == null)
            {
                result = 0;
            }
            else
            {
                result = BizBase.dbo.InsertModel <CommentActiveLogInfo>(entity);
            }
            return(result);
        }
示例#4
0
 public static bool Update(CommentActiveLogInfo entity)
 {
     return(entity != null && BizBase.dbo.UpdateModel <CommentActiveLogInfo>(entity));
 }