namespace SK.MemberWeb.Templates.Default
{
	using System;
	using System.Data;
	using System.Drawing;
	using System.Web;
	using System.Web.UI.WebControls;
	using System.Web.UI.HtmlControls;
	using SK.MemberBLL;

	/// <summary>
	///		cu_ActiveMail 的摘要说明。
	/// </summary>
	public class cu_ActiveMail : BaseControl
	{
		MemberSystem member = new MemberSystem();
		private void Page_Load(object sender, System.EventArgs e)
		{
			// 在此处放置用户代码以初始化页面
			if(!IsPostBack)
			{
				ViewState["MemberID"] = Request.QueryString["id"];
				ViewState["Code"] = Request.QueryString["code"];
				if(!member.EmailValidCode_Right(ViewState["MemberID"],ViewState["Code"]))
				{
					Response.Redirect("Msg.aspx?msg="+Server.UrlEncode("激活码无效"));
				}
				else
				{
					DataRow dr = member.Info(ViewState["MemberID"]);
					_MemberName = dr["MemberName"].ToString();
					dr = null;
					member.ActiveEmail(ViewState["MemberID"]);
				}
			}
		}

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

		}
		#endregion

		protected SK.MemberWeb.Controls.ControlHolder ControlHolder3;
		protected SK.MemberWeb.Controls.ControlHolder ControlHolder5;
		protected SK.MemberWeb.Controls.ControlHolder ControlHolder6;
		protected SK.MemberWeb.Controls.ControlHolder ControlHolder1;

		string _MemberName;
		public string MemberName
		{
			get{return _MemberName;}
			set{_MemberName=value;}
		}
	}
}
