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

📄 formchangepassword.cs

📁 蓝山人事管理系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data ;
using System.Data .SqlClient ;
using System.Security .Cryptography ;
using System.Text ;

namespace Security
{
	/// <summary>
	/// FormChangePassword 的摘要说明。
	/// </summary>
	public class FormChangePassword : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.TextBox txtOldPassword;
		private System.Windows.Forms.TextBox txtNewPassword1;
		private System.Windows.Forms.TextBox txtNewPassword2;
		private System.Windows.Forms.PictureBox pictureBox1;
		private System.Windows.Forms.Button btnOk;
		private System.Windows.Forms.Button btnCancel;
		private System.Windows.Forms.Label label4;

		private SqlConnection cn;
		private SqlCommand cmd;
	    public string userid;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public FormChangePassword()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();

			cn=new SqlConnection("integrated security=SSPI;data source=(local);initial catalog=BlueHill");
			cmd=new SqlCommand("select LoginName,Password,DeptID from tblEmployee where LoginName=@LoginName",cn);
			cmd.Parameters.Add("@LoginName",SqlDbType.NVarChar,20);

			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}

		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(FormChangePassword));
			this.label1 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.txtOldPassword = new System.Windows.Forms.TextBox();
			this.txtNewPassword1 = new System.Windows.Forms.TextBox();
			this.txtNewPassword2 = new System.Windows.Forms.TextBox();
			this.pictureBox1 = new System.Windows.Forms.PictureBox();
			this.btnOk = new System.Windows.Forms.Button();
			this.btnCancel = new System.Windows.Forms.Button();
			this.label4 = new System.Windows.Forms.Label();
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.AccessibleDescription = resources.GetString("label1.AccessibleDescription");
			this.label1.AccessibleName = resources.GetString("label1.AccessibleName");
			this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("label1.Anchor")));
			this.label1.AutoSize = ((bool)(resources.GetObject("label1.AutoSize")));
			this.label1.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("label1.Dock")));
			this.label1.Enabled = ((bool)(resources.GetObject("label1.Enabled")));
			this.label1.Font = ((System.Drawing.Font)(resources.GetObject("label1.Font")));
			this.label1.Image = ((System.Drawing.Image)(resources.GetObject("label1.Image")));
			this.label1.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label1.ImageAlign")));
			this.label1.ImageIndex = ((int)(resources.GetObject("label1.ImageIndex")));
			this.label1.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("label1.ImeMode")));
			this.label1.Location = ((System.Drawing.Point)(resources.GetObject("label1.Location")));
			this.label1.Name = "label1";
			this.label1.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("label1.RightToLeft")));
			this.label1.Size = ((System.Drawing.Size)(resources.GetObject("label1.Size")));
			this.label1.TabIndex = ((int)(resources.GetObject("label1.TabIndex")));
			this.label1.Text = resources.GetString("label1.Text");
			this.label1.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label1.TextAlign")));
			this.label1.Visible = ((bool)(resources.GetObject("label1.Visible")));
			// 
			// label2
			// 
			this.label2.AccessibleDescription = resources.GetString("label2.AccessibleDescription");
			this.label2.AccessibleName = resources.GetString("label2.AccessibleName");
			this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("label2.Anchor")));
			this.label2.AutoSize = ((bool)(resources.GetObject("label2.AutoSize")));
			this.label2.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("label2.Dock")));
			this.label2.Enabled = ((bool)(resources.GetObject("label2.Enabled")));
			this.label2.Font = ((System.Drawing.Font)(resources.GetObject("label2.Font")));
			this.label2.Image = ((System.Drawing.Image)(resources.GetObject("label2.Image")));
			this.label2.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label2.ImageAlign")));
			this.label2.ImageIndex = ((int)(resources.GetObject("label2.ImageIndex")));
			this.label2.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("label2.ImeMode")));
			this.label2.Location = ((System.Drawing.Point)(resources.GetObject("label2.Location")));
			this.label2.Name = "label2";
			this.label2.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("label2.RightToLeft")));
			this.label2.Size = ((System.Drawing.Size)(resources.GetObject("label2.Size")));
			this.label2.TabIndex = ((int)(resources.GetObject("label2.TabIndex")));
			this.label2.Text = resources.GetString("label2.Text");
			this.label2.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label2.TextAlign")));
			this.label2.Visible = ((bool)(resources.GetObject("label2.Visible")));
			// 
			// label3
			// 
			this.label3.AccessibleDescription = resources.GetString("label3.AccessibleDescription");
			this.label3.AccessibleName = resources.GetString("label3.AccessibleName");
			this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("label3.Anchor")));
			this.label3.AutoSize = ((bool)(resources.GetObject("label3.AutoSize")));
			this.label3.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("label3.Dock")));
			this.label3.Enabled = ((bool)(resources.GetObject("label3.Enabled")));
			this.label3.Font = ((System.Drawing.Font)(resources.GetObject("label3.Font")));
			this.label3.Image = ((System.Drawing.Image)(resources.GetObject("label3.Image")));
			this.label3.ImageAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label3.ImageAlign")));
			this.label3.ImageIndex = ((int)(resources.GetObject("label3.ImageIndex")));
			this.label3.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("label3.ImeMode")));
			this.label3.Location = ((System.Drawing.Point)(resources.GetObject("label3.Location")));
			this.label3.Name = "label3";
			this.label3.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("label3.RightToLeft")));
			this.label3.Size = ((System.Drawing.Size)(resources.GetObject("label3.Size")));
			this.label3.TabIndex = ((int)(resources.GetObject("label3.TabIndex")));
			this.label3.Text = resources.GetString("label3.Text");
			this.label3.TextAlign = ((System.Drawing.ContentAlignment)(resources.GetObject("label3.TextAlign")));
			this.label3.Visible = ((bool)(resources.GetObject("label3.Visible")));
			// 
			// txtOldPassword
			// 
			this.txtOldPassword.AccessibleDescription = resources.GetString("txtOldPassword.AccessibleDescription");
			this.txtOldPassword.AccessibleName = resources.GetString("txtOldPassword.AccessibleName");
			this.txtOldPassword.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtOldPassword.Anchor")));
			this.txtOldPassword.AutoSize = ((bool)(resources.GetObject("txtOldPassword.AutoSize")));
			this.txtOldPassword.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtOldPassword.BackgroundImage")));
			this.txtOldPassword.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtOldPassword.Dock")));
			this.txtOldPassword.Enabled = ((bool)(resources.GetObject("txtOldPassword.Enabled")));
			this.txtOldPassword.Font = ((System.Drawing.Font)(resources.GetObject("txtOldPassword.Font")));
			this.txtOldPassword.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtOldPassword.ImeMode")));
			this.txtOldPassword.Location = ((System.Drawing.Point)(resources.GetObject("txtOldPassword.Location")));
			this.txtOldPassword.MaxLength = ((int)(resources.GetObject("txtOldPassword.MaxLength")));
			this.txtOldPassword.Multiline = ((bool)(resources.GetObject("txtOldPassword.Multiline")));
			this.txtOldPassword.Name = "txtOldPassword";
			this.txtOldPassword.PasswordChar = ((char)(resources.GetObject("txtOldPassword.PasswordChar")));
			this.txtOldPassword.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtOldPassword.RightToLeft")));
			this.txtOldPassword.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtOldPassword.ScrollBars")));
			this.txtOldPassword.Size = ((System.Drawing.Size)(resources.GetObject("txtOldPassword.Size")));
			this.txtOldPassword.TabIndex = ((int)(resources.GetObject("txtOldPassword.TabIndex")));
			this.txtOldPassword.Text = resources.GetString("txtOldPassword.Text");
			this.txtOldPassword.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtOldPassword.TextAlign")));
			this.txtOldPassword.Visible = ((bool)(resources.GetObject("txtOldPassword.Visible")));
			this.txtOldPassword.WordWrap = ((bool)(resources.GetObject("txtOldPassword.WordWrap")));
			// 
			// txtNewPassword1
			// 
			this.txtNewPassword1.AccessibleDescription = resources.GetString("txtNewPassword1.AccessibleDescription");
			this.txtNewPassword1.AccessibleName = resources.GetString("txtNewPassword1.AccessibleName");
			this.txtNewPassword1.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtNewPassword1.Anchor")));
			this.txtNewPassword1.AutoSize = ((bool)(resources.GetObject("txtNewPassword1.AutoSize")));
			this.txtNewPassword1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtNewPassword1.BackgroundImage")));
			this.txtNewPassword1.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtNewPassword1.Dock")));
			this.txtNewPassword1.Enabled = ((bool)(resources.GetObject("txtNewPassword1.Enabled")));
			this.txtNewPassword1.Font = ((System.Drawing.Font)(resources.GetObject("txtNewPassword1.Font")));
			this.txtNewPassword1.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtNewPassword1.ImeMode")));
			this.txtNewPassword1.Location = ((System.Drawing.Point)(resources.GetObject("txtNewPassword1.Location")));
			this.txtNewPassword1.MaxLength = ((int)(resources.GetObject("txtNewPassword1.MaxLength")));
			this.txtNewPassword1.Multiline = ((bool)(resources.GetObject("txtNewPassword1.Multiline")));
			this.txtNewPassword1.Name = "txtNewPassword1";
			this.txtNewPassword1.PasswordChar = ((char)(resources.GetObject("txtNewPassword1.PasswordChar")));
			this.txtNewPassword1.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtNewPassword1.RightToLeft")));
			this.txtNewPassword1.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtNewPassword1.ScrollBars")));
			this.txtNewPassword1.Size = ((System.Drawing.Size)(resources.GetObject("txtNewPassword1.Size")));
			this.txtNewPassword1.TabIndex = ((int)(resources.GetObject("txtNewPassword1.TabIndex")));
			this.txtNewPassword1.Text = resources.GetString("txtNewPassword1.Text");
			this.txtNewPassword1.TextAlign = ((System.Windows.Forms.HorizontalAlignment)(resources.GetObject("txtNewPassword1.TextAlign")));
			this.txtNewPassword1.Visible = ((bool)(resources.GetObject("txtNewPassword1.Visible")));
			this.txtNewPassword1.WordWrap = ((bool)(resources.GetObject("txtNewPassword1.WordWrap")));
			// 
			// txtNewPassword2
			// 
			this.txtNewPassword2.AccessibleDescription = resources.GetString("txtNewPassword2.AccessibleDescription");
			this.txtNewPassword2.AccessibleName = resources.GetString("txtNewPassword2.AccessibleName");
			this.txtNewPassword2.Anchor = ((System.Windows.Forms.AnchorStyles)(resources.GetObject("txtNewPassword2.Anchor")));
			this.txtNewPassword2.AutoSize = ((bool)(resources.GetObject("txtNewPassword2.AutoSize")));
			this.txtNewPassword2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("txtNewPassword2.BackgroundImage")));
			this.txtNewPassword2.Dock = ((System.Windows.Forms.DockStyle)(resources.GetObject("txtNewPassword2.Dock")));
			this.txtNewPassword2.Enabled = ((bool)(resources.GetObject("txtNewPassword2.Enabled")));
			this.txtNewPassword2.Font = ((System.Drawing.Font)(resources.GetObject("txtNewPassword2.Font")));
			this.txtNewPassword2.ImeMode = ((System.Windows.Forms.ImeMode)(resources.GetObject("txtNewPassword2.ImeMode")));
			this.txtNewPassword2.Location = ((System.Drawing.Point)(resources.GetObject("txtNewPassword2.Location")));
			this.txtNewPassword2.MaxLength = ((int)(resources.GetObject("txtNewPassword2.MaxLength")));
			this.txtNewPassword2.Multiline = ((bool)(resources.GetObject("txtNewPassword2.Multiline")));
			this.txtNewPassword2.Name = "txtNewPassword2";
			this.txtNewPassword2.PasswordChar = ((char)(resources.GetObject("txtNewPassword2.PasswordChar")));
			this.txtNewPassword2.RightToLeft = ((System.Windows.Forms.RightToLeft)(resources.GetObject("txtNewPassword2.RightToLeft")));
			this.txtNewPassword2.ScrollBars = ((System.Windows.Forms.ScrollBars)(resources.GetObject("txtNewPassword2.ScrollBars")));
			this.txtNewPassword2.Size = ((System.Drawing.Size)(resources.GetObject("txtNewPassword2.Size")));

⌨️ 快捷键说明

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