Example #1
0
 protected void btnRply_Click(object sender, EventArgs e)
 {
     if (Session["UserName"] != null)
     {
         if (Page.IsValid)
         {
             Button            btn = (Button)sender;
             string            a   = ((TextBox)btn.Parent.FindControl("txtReplyContent")).Text.Trim();
             ReplyMallComments replymallcomments = new ReplyMallComments();
             replymallcomments.MallCommentsID = Int32.Parse((btn.Parent.FindControl("HiddenFieldComID") as HiddenField).Value);
             replymallcomments.UserID         = int.Parse(Session["UserID"].ToString());
             replymallcomments.ReplyContents  = ((TextBox)btn.Parent.FindControl("txtReplyContent")).Text.Trim();
             replymallcomments.ReplyTime      = DateTime.Now;
             int result = GoodsManager.InsertReplyMallComments(replymallcomments);
             if (result >= 1)
             {
                 ScriptManager.RegisterClientScriptBlock(UpP003, this.GetType(), "click", "alert('回复成功')", true);
                 BindMallComments();
             }
             else
             {
                 ScriptManager.RegisterClientScriptBlock(UpP003, this.GetType(), "click", "alert('未知原因 回复失败')", true);
             }
         }
     }
     else
     {
         ScriptManager.RegisterClientScriptBlock(UpP003, this.GetType(), "click", "alert('请先登录');", true);
     }
 }
Example #2
0
        public int InsertReplyMallComments(ReplyMallComments ReplyMallComments) //向商品回复表插入回复
        {
            string sql = "insert into ReplyMallComments values(@MallCommentID,@UserID,@ReplyTime,@ReplyContents)";

            SqlParameter[] para =
            {
                new SqlParameter("@MallCommentID", ReplyMallComments.MallCommentsID),
                new SqlParameter("@UserID",        ReplyMallComments.UserID),
                new SqlParameter("@ReplyTime",     ReplyMallComments.ReplyTime),
                new SqlParameter("@ReplyContents", ReplyMallComments.ReplyContents)
            };
            return(DBHelper.GetExcuteNonQuery(sql, para));
        }
        public int InsertReplyMallComments(ReplyMallComments replymallcomments)
        {
            string sql = "insert into ReplyComments values(@ReplyMallCommentsID,@UserID,@ReplyContents,@ReplyTime)";

            SqlParameter[] para =
            {
                new SqlParameter("@ReplyMallCommentsID", replymallcomments.ReplyMallCommentsID),
                new SqlParameter("@UserID",              replymallcomments.UserID),
                new SqlParameter("@ReplyContents",       replymallcomments.ReplyContents),
                new SqlParameter("@ReplyTime",           replymallcomments.ReplyTime)
            };
            return(DBHelper.GetExcuteNonQuery(sql, para));
        }
Example #4
0
 public static int InsertReplyMallComments(ReplyMallComments ReplyMallComments)//向商品回复表插入回复
 {
     return(igoods.InsertReplyMallComments(ReplyMallComments));
 }
Example #5
0
 public static int InsertReplyMallComments(ReplyMallComments replymallcomments)
 {
     return(ireplymallcomments.InsertReplyMallComments(replymallcomments));
 }