Exemplo n.º 1
0
    /// <summary>
    /// 执行提交评论业务,将评论信息存入数据库
    /// </summary>
    /// <param name="comment"></param>
    /// <param name="msg"></param>
    /// <returns></returns>
    public static bool CommitComment(Comment comment, UserMessage msg)
    {
        bool result = false;

        lock (mLockObj)
        {
            mdb.Connect();
            result = CommentData.InsertNewCommentForArticle(comment, mdb.GetConn);
            result = UserMessageData.InsertNewMessage(msg, mdb.GetConn);
            mdb.Disconnect();
        }
        return(result);
    }