Web/Admin/Feedback/Edit.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using cosmos.Web.UI;
namespace cosmos.Web.Admin.Feedback
{
public partial class Edit : ManagePage
{
public int Id;
public cosmos.Model.Feedback model = new cosmos.Model.Feedback();
protected void Page_Load(object sender, EventArgs e)
{
if (!int.TryParse(Request.Params["id"] as string, out this.Id))
{
JscriptMsg(350, 230, "错误提示", "<b>出现错误!</b>您要回复的信息不存在或参数不正确。", "back", "Error");
return;
}
if (!Page.IsPostBack)
{
//赋值
ShowInfo(this.Id);
}
}
#region 赋值操作
private void ShowInfo(int _id)
{
cosmos.BLL.Feedback bll = new cosmos.BLL.Feedback();
model = bll.GetModel(_id);
txtReContent.Text = cosmos.Common.Utils.ToTxt(model.ReContent);
}
#endregion
#region 回复留言
protected void btnSave_Click(object sender, EventArgs e)
{
cosmos.BLL.Feedback bll = new cosmos.BLL.Feedback();
cosmos.Model.Feedback model = bll.GetModel(this.Id);
model.ReContent = cosmos.Common.Utils.ToHtml(txtReContent.Text);
model.ReTime = DateTime.Now;
bll.Update(model);
//保存日志
SaveLogs("[留言管理]回复留言:" + model.Title);
Coolite.Ext.Web.Ext.MessageBox.Alert("提示", "留言回复成功").Show();
}
#endregion
protected void btnretset_Click(object sender, EventArgs e)
{
this.txtReContent.Text = "";
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。