📄 comment.aspx.cs
字号:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Shop.Web.UI;
using System.Collections.Generic;
namespace YXShop.Web.Admin.Product
{
public partial class comment : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
YXShop.BLL.YXShop_Comment BLL = new YXShop.BLL.YXShop_Comment();
YXShop.Model.YXShop_Comment model = new YXShop.Model.YXShop_Comment();
this.lblTitle.Text = Server.UrlDecode(Request.QueryString["title"]);
int cmtID = Convert.ToInt32(Request.QueryString["ID"]);
List<YXShop.Model.YXShop_Comment> Lmodel =new List<YXShop.Model.YXShop_Comment>();
Lmodel= BLL.GetListByWhere(" cmt_ID="+cmtID+"");
if ( Lmodel[0].Cmt_AuditingState==1)
{
this.CheckBox1.Checked = true;
}
this.txtContent.Text = Lmodel[0].Cmt_Revert;
}
}
protected void Button1_Click(object sender, EventArgs e)
{
YXShop.BLL.YXShop_Comment BLL = new YXShop.BLL.YXShop_Comment();
YXShop.Model.YXShop_Comment model = new YXShop.Model.YXShop_Comment();
BasePage bp = new BasePage();
string revertContent = this.txtContent.Text;
model.Cmt_RevertTime = DateTime.Now;
model.Cmt_Revert = revertContent;
model.Cmt_AuditingState=this.CheckBox1.Checked?1:0;
model.Cmt_ID = Convert.ToInt32(Request.QueryString["ID"]);
model.Cmt_RevertName = Convert.ToString(Session["AdminName"]);
if (BLL.Amend(model) == 1)
{
bp.PageRight("商品评论回复成功。<li><a href=\"comment_List.aspx\" class=\"reshow\">商品评论管理</a></li>", "comment_List.aspx", true);
}
else
{
bp.PageRight("商品评对不起,商品评论回复失败,请重试。<li><a href=\"comment_List.aspx\" class=\"reshow\">商品评论管理</a></li>", "comment_List.aspx", true);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -