/// <summary>
        /// 会员点评商品
        /// </summary>
        /// <param name="mc">商品实体</param>
        /// <returns>返回点评ID</returns>
        public int Comment(McComm mc)
        {
            strSql = @"INSERT INTO [shuaka].[dbo].[mc_comm]
           ([pd_id]
           ,[mc_content]
           ,[mc_ip]
           ,[mc_name]
           ,[mc_time]
           ,[mc_state])
      VALUES
           (@PdID
           ,@McCon
           ,@McIP
           ,@McName
           ,@McTime
           ,@McState) SELECT @@IDENTITY AS 'pd_id'";
            SqlParameter[] paras = { new SqlParameter("PdID",    mc.PdID),
                                     new SqlParameter("McCon",   mc.McContent),
                                     new SqlParameter("McIP",    mc.McIP),
                                     new SqlParameter("McName",  mc.McName),
                                     new SqlParameter("McTime",  mc.McTime),
                                     new SqlParameter("McState", mc.CmState = true) };
            dbc = new DBConnection();
            ds  = dbc.GetDataSet(strSql, paras);
            string temp = ds.Tables[0].Rows[0]["pd_id"].ToString();

            return(Convert.ToInt32(temp));
        }
    protected void Button1_Command(object sender, CommandEventArgs e)
    {
        CommentBLL cb = new CommentBLL();
        McComm     mc = new McComm();

        mc.ReplyContent = MerComRe_Reply.Text;
        mc.ReplyTime    = DateTime.Now;
        mc.McID         = mcID;
        mc.McReplyer    = Session["username"].ToString();
        int i = cb.CommentReply(mc, Convert.ToInt32(e.CommandArgument));

        if (i > 0)
        {
            Response.Redirect("MerchantCommentList.aspx");
        }
    }
   /// <summary>
   /// 商家回复商品点评
   /// </summary>
   /// <param name="cmID">点评ID</param>
   /// <returns>返回受影响行数</returns>
   public int CommentReply(McComm mc, int cmID)
   {
       strSql = @"UPDATE [shuaka].[dbo].[mc_comm]
    SET [mc_reply_state] = @ReplyState
 ,[mc_replyer] = @CmReplyer
 ,[reply_content] = @ReplyContent
 ,[reply_time] = @ReplyTime
    WHERE [mc_id]=@McID";
       SqlParameter[] paras = { new SqlParameter("CmReplyer",    mc.McReplyer),
                                new SqlParameter("ReplyContent", mc.ReplyContent),
                                new SqlParameter("ReplyTime",    mc.ReplyTime),
                                new SqlParameter("ReplyState",   mc.CmReplyState = true),
                                new SqlParameter("McID",         cmID) };
       dbc = new DBConnection();
       return(dbc.Execute(strSql, paras));
   }
        public int CommentReply(McComm mc, int cmID)
        {
            CommentDAL cd = new CommentDAL();

            return(cd.CommentReply(mc, cmID));
        }
        public int Comment(McComm mc)
        {
            CommentDAL cd = new CommentDAL();

            return(cd.Comment(mc));
        }