reply.aspx.cs
资源名称:moban.rar [点击查看]
上传用户:szraylite
上传日期:2018-06-06
资源大小:11546k
文件大小:2k
源码类别:
软件测试
开发平台:
Java
- using System;
- using System.Data;
- using System.Configuration;
- using System.Collections;
- 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 ENTERPRISE.BusinessLogicLayer;
- using ENTERPRISE.DataAccessHelper;
- public partial class admin_reply : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- InitData();
- }
- private void InitData()
- {
- int id = Convert.ToInt32(Request.QueryString["id"]);
- Messages message = new Messages();
- message.LoadData(id);
- LabelContent.Text = System.Web.HttpUtility.HtmlEncode(message.content);
- LabelCreateTime.Text = message.booktime.ToString();
- LabelUserLoginName.Text = message.guest_name;
- replytext.Text = message.reply;
- }
- protected void ButtonReply_Click(object sender, EventArgs e)
- {
- Messages message = new Messages();
- int id = Convert.ToInt32(Request.QueryString["id"]);
- Hashtable ht = new Hashtable();
- ht.Add("reply", System.Web.HttpUtility.HtmlEncode(SqlStringFormat.GetQuotedString(reply.Text)));
- ht.Add("retime", SqlStringFormat.GetQuotedString(System.DateTime.Now.ToString()));
- message.Update(ht,id);
- Response.Write("<Script Language=JavaScript>alert('回复成功!');</Script>");
- Page.Response.Redirect("messagelist.aspx");
- }
- protected void ButtonBack_Click(object sender, EventArgs e)
- {
- Response.Redirect("messagelist.aspx");
- }
- }