⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 updatemypassword.aspx.cs

📁 本系统是二手房交易系统 采用asp.net技术 开发环境是vs2003+sqlServer2000
💻 CS
字号:
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;
using System.Configuration;
using HouseSystem.Components;
namespace HouseSystem.UserCenter
{
	/// <summary>
	/// UpdateMyPassword 的摘要说明。
	/// </summary>
	public class UpdateMyPassword : System.Web.UI.Page
	{
		protected System.Web.UI.WebControls.Panel panelEditPwd;
		protected System.Web.UI.WebControls.Label lblMsg;
		protected System.Web.UI.HtmlControls.HtmlInputText txtOldPwd;
		protected System.Web.UI.HtmlControls.HtmlInputText txtNewPwd;
		protected System.Web.UI.HtmlControls.HtmlInputText txtRNewPwd;
		protected System.Web.UI.HtmlControls.HtmlInputButton btnEdit;
		protected string WebName;
	
		private void Page_Load(object sender, System.EventArgs e)
		{
			// 在此处放置用户代码以初始化页面
			this.WebName = ConfigurationSettings.AppSettings["My_WebName"];

		}

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

		}
		#endregion

		private void btnEdit_ServerClick(object sender, System.EventArgs e)
		{
			string text1 = Tools.GetUserCookie("UserName");
			if (text1 == "")
			{
				this.lblMsg.Text = "\u9519\u8bef\uff0c\u767b\u5f55信息\u4e22\u5931\uff0c\u8bf7\u91cd\u65b0\u767b\u5f55\u3002";
			}
			else if (this.txtNewPwd.Value.ToString() != this.txtRNewPwd.Value.ToString())
			{
				this.lblMsg.Text = "\u9519\u8bef\uff0c\u65b0\u5bc6\u7801\u548c\u786e\u8ba4\u5bc6\u7801\u4e0d\u540c";
			}
			else
			{
				int num1 = Users.UpdateMyPassword(text1, Tools.CheckStrInput(this.txtOldPwd.Value), Tools.CheckStrInput(this.txtNewPwd.Value));
				if (num1 == 1)
				{
					this.panelEditPwd.Visible = false;
					this.btnEdit.Visible = false;
					this.lblMsg.Text = "\u5bc6\u7801\u4fee\u6539\u6210\u529f!";
				}
				else if (num1 == -1)
				{
					this.lblMsg.Text = "\u539f\u5bc6\u7801\u8f93\u5165\u9519\u8bef!";
				}
				else if (num1 == 0)
				{
					this.lblMsg.Text = "\u5bc6\u7801\u4fee\u6539\u5931\u8d25,\u8bf7\u91cd\u8bd5!";
				}
			}

		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -