DTcms.Web/admin/fz/reply.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DTcms.Common;
namespace DTcms.Web.admin.fz
{
public partial class reply : DTcms.Web.UI.ManagePage
{
private int id = 0;
protected Model.zsjm model = new Model.zsjm();
protected void Page_Load(object sender, EventArgs e)
{
if (!int.TryParse(Request.QueryString["id"] as string, out this.id))
{
JscriptMsg("传输参数不正确!", "back", "Error");
return;
}
if (!new BLL.zsjm().Exists(this.id))
{
JscriptMsg("信息不存在或已被删除!", "back", "Error");
return;
}
if (!Page.IsPostBack)
{
ShowInfo(this.id);
}
}
#region 赋值操作=================================
private void ShowInfo(int _id)
{
BLL.zsjm bll = new BLL.zsjm();
model = bll.GetModel(_id);
txtReContent.Text = Utils.ToTxt(model.reply_content);
}
#endregion
//保存
protected void btnSubmit_Click(object sender, EventArgs e)
{
BLL.zsjm bll = new BLL.zsjm();
model = bll.GetModel(this.id);
model.reply_content = Utils.ToHtml(txtReContent.Text);
model.reply_time = DateTime.Now;
bll.Update(model);
JscriptMsg("留言回复成功啦!", "index.aspx", "Success");
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
