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; public partial class BBS_TieZiView : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ZWL.Common.PublicMethod.CheckSession(); ZWL.BLL.ERPBBSTieZi MyModel = new ZWL.BLL.ERPBBSTieZi(); MyModel.GetModel(int.Parse(Request.QueryString["ID"].ToString())); this.Label4.Text = MyModel.TitleStr; this.Label3.Text = MyModel.ContentStr; this.Label2.Text = MyModel.TimeStr.ToString(); this.Label1.Text = MyModel.UserName; this.Label5.Text = MyModel.HuiFuContent; //写系统日志 ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "用户查看论坛帖子信息(" + this.Label4.Text + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); } } protected void Button1_Click(object sender, EventArgs e) { if (this.TxtContent.Text.Trim() != "") { string HuiFuStr = "

"+ZWL.Common.PublicMethod.GetSessionValue("UserName")+"
"+this.TxtContent.Text+"

"+DateTime.Now.ToString()+"
"; string SqlStr = "update ERPBBSTieZi set ZuiHouTime='"+DateTime.Now.ToString()+"',ZuiHouUser='" + ZWL.Common.PublicMethod.GetSessionValue("UserName") + "',HuiFuContent='" + this.Label5.Text + HuiFuStr + "' where ID=" + Request.QueryString["ID"].ToString(); ZWL.DBUtility.DbHelperSQL.ExecuteSQL(SqlStr); ZWL.Common.MessageBox.Show(this, "信息回复成功!"); this.Label5.Text =this.Label5.Text+HuiFuStr; this.TxtContent.Text = ""; } else { ZWL.Common.MessageBox.Show(this, "回复的内容不可以为空!"); this.TxtContent.Text = ""; } } }