using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace yn165.admin
{
	/// <summary>
	/// sendmsg 的摘要说明。
	/// </summary>
	public class sendmsg : System.Web.UI.Page
	{
		protected System.Web.UI.WebControls.ImageButton ImageButton1;
		protected System.Web.UI.WebControls.TextBox TextBox2;
		protected System.Web.UI.WebControls.TextBox TextBox1;
	
		private void Page_Load(object sender, System.EventArgs e)
		{
			string i=Request["id"];
			if (Application["content"+i]!=null && Application["content"+i].ToString()!="")
			{
				this.TextBox1.Text=Application["content"+i].ToString();
			}
			Application["msg"+i]="";
			// 在此处放置用户代码以初始化页面
		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN：该调用是 ASP.NET Web 窗体设计器所必需的。
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{    
			this.ImageButton1.Click += new System.Web.UI.ImageClickEventHandler(this.ImageButton1_Click);
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion

		private void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e)
		{
			string i=Request["id"];
			if (this.TextBox2.Text!="")
			{
				Application["re"+i]=this.TextBox2.Text;
				this.TextBox1.Text = "\n" + Convert.ToString(DateTime.Now) + " 服务人员答：" + this.TextBox2.Text + "\n" + this.TextBox1.Text;
				this.TextBox2.Text="";
				Application["content"+i]=this.TextBox1.Text;


			}

		this.Response.Redirect("inquireonline.aspx");

		}
	}
}
