亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? formlogin.cs

?? 藍山人事管理系統
?? CS
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Text ;
using System.Data .SqlClient ;
using BlueHill.BlueWindows.Security;
using System.Security .Cryptography ;

namespace Security
{
	/// <summary>
	/// Form1 的摘要說明。
	/// </summary>

	public class FormLogin : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.TextBox txtUserName;
		private System.Windows.Forms.TextBox txtPassword;
		private System.Windows.Forms.PictureBox pictureBox1;
		private System.Windows.Forms.PictureBox pictureBox2;
		private System.Windows.Forms.Button btnChange;
		private System.Windows.Forms.Button btnOk;
		private System.Windows.Forms.Button btnCancel;

		private SqlConnection cn;
		private SqlCommand cmd;
		public string userid;

		/// <summary>
		/// 必需的設計器變量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public FormLogin()
		{
			//
			// 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(FormLogin));
			this.label1 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.txtUserName = new System.Windows.Forms.TextBox();
			this.txtPassword = new System.Windows.Forms.TextBox();
			this.pictureBox1 = new System.Windows.Forms.PictureBox();
			this.pictureBox2 = new System.Windows.Forms.PictureBox();
			this.btnChange = new System.Windows.Forms.Button();
			this.btnOk = new System.Windows.Forms.Button();
			this.btnCancel = new System.Windows.Forms.Button();
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(80, 24);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(48, 23);
			this.label1.TabIndex = 0;
			this.label1.Text = "用戶名";
			this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(80, 64);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(40, 23);
			this.label2.TabIndex = 1;
			this.label2.Text = "密碼";
			this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// txtUserName
			// 
			this.txtUserName.Location = new System.Drawing.Point(152, 24);
			this.txtUserName.Name = "txtUserName";
			this.txtUserName.Size = new System.Drawing.Size(136, 21);
			this.txtUserName.TabIndex = 2;
			this.txtUserName.Text = "";
			// 
			// txtPassword
			// 
			this.txtPassword.Location = new System.Drawing.Point(152, 64);
			this.txtPassword.Name = "txtPassword";
			this.txtPassword.PasswordChar = '*';
			this.txtPassword.Size = new System.Drawing.Size(136, 21);
			this.txtPassword.TabIndex = 3;
			this.txtPassword.Text = "";
			// 
			// pictureBox1
			// 
			this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
			this.pictureBox1.Location = new System.Drawing.Point(24, 16);
			this.pictureBox1.Name = "pictureBox1";
			this.pictureBox1.Size = new System.Drawing.Size(32, 32);
			this.pictureBox1.TabIndex = 4;
			this.pictureBox1.TabStop = false;
			// 
			// pictureBox2
			// 
			this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
			this.pictureBox2.Location = new System.Drawing.Point(24, 64);
			this.pictureBox2.Name = "pictureBox2";
			this.pictureBox2.Size = new System.Drawing.Size(32, 24);
			this.pictureBox2.TabIndex = 5;
			this.pictureBox2.TabStop = false;
			// 
			// btnChange
			// 
			this.btnChange.Location = new System.Drawing.Point(16, 104);
			this.btnChange.Name = "btnChange";
			this.btnChange.TabIndex = 6;
			this.btnChange.Text = "修改密碼";
			this.btnChange.Click += new System.EventHandler(this.btnChange_Click);
			// 
			// btnOk
			// 
			this.btnOk.Location = new System.Drawing.Point(112, 104);
			this.btnOk.Name = "btnOk";
			this.btnOk.TabIndex = 7;
			this.btnOk.Text = "登陸";
			this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
			// 
			// btnCancel
			// 
			this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.btnCancel.Location = new System.Drawing.Point(208, 104);
			this.btnCancel.Name = "btnCancel";
			this.btnCancel.TabIndex = 8;
			this.btnCancel.Text = "取消";
			this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
			// 
			// FormLogin
			// 
			this.AcceptButton = this.btnOk;
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(304, 147);
			this.Controls.Add(this.btnCancel);
			this.Controls.Add(this.btnOk);
			this.Controls.Add(this.btnChange);
			this.Controls.Add(this.label2);
			this.Controls.Add(this.txtUserName);
			this.Controls.Add(this.txtPassword);
			this.Controls.Add(this.pictureBox1);
			this.Controls.Add(this.pictureBox2);
			this.Controls.Add(this.label1);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "FormLogin";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "登陸";
			this.Load += new System.EventHandler(this.FormLogin_Load);
			this.ResumeLayout(false);

		}
		#endregion

		/// <summary>
		/// 應用程序的主入口點。
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new FormLogin());
		}

		int i = 0;
		private void btnOk_Click(object sender, System.EventArgs e)
		{
			string userid = txtUserName.Text;
			if (txtPassword.Text.Length>=6)
			{
				//對輸入的密碼做HashMD5加密。
				UnicodeEncoding UE=new UnicodeEncoding();
				byte [] pwd = UE.GetBytes(this.txtPassword.Text); 
				SHA1Managed sha =new SHA1Managed();
				byte[] HashedPwd = sha.ComputeHash(pwd);

				cmd.Parameters["@LoginName"].Value = userid;
				cn.Open ();
				SqlDataReader dr=cmd.ExecuteReader();

				if (dr.Read())
				{
					byte[] datapwd=(byte[])dr.GetValue(1);
					if (UE.GetString(HashedPwd) == UE.GetString(datapwd))
					{						
						FormMain mn=new FormMain();
						mn.userid = userid;
						mn.ShowDialog();
						this.Close();					
					}
					else
					{
						MessageBox.Show("密碼輸入錯誤!");
						txtPassword.Clear ();						
						i++;
						if(i>=3)
						{
							MessageBox.Show("密碼輸入三次錯誤");
							this.Close();
						}
					}
				}
				else
				{
					MessageBox.Show("此用戶不存在!");
				}
				dr.Close();
				cn.Close();
			}
			else
			{
				if(txtUserName.Text =="")
					MessageBox.Show ("用戶名不能用空!");
				else
                    MessageBox.Show("密碼長度應大于6位!");
			}
		}

		private void btnCancel_Click(object sender, System.EventArgs e)
		{
			this.Close();
		}

		private void btnChange_Click(object sender, System.EventArgs e)
		{
			string userid = txtUserName.Text;

			cmd.Parameters["@LoginName"].Value = userid;
			cn.Open ();
			SqlDataReader dr=cmd.ExecuteReader();
			
			if (dr.Read())
			{						
				FormChangePassword mn=new FormChangePassword ();
				mn.userid = userid;
				mn.ShowDialog();
				this.Close();
			}
			else
			{
				MessageBox.Show("此用戶不存在!");
			}
			dr.Close();
			cn.Close();
		}

		private void FormLogin_Load(object sender, System.EventArgs e)
		{
		
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久99久精品视频免费观看| 免费不卡在线视频| 国产午夜一区二区三区| 日韩久久久久久| 精品久久久三级丝袜| 91精品免费观看| 91精品国产欧美一区二区| 久久精品一二三| 国产专区欧美精品| av不卡一区二区三区| 国产成人av电影| 成人黄色av电影| 99久久精品久久久久久清纯| 91亚洲大成网污www| 一本一道久久a久久精品综合蜜臀| av不卡一区二区三区| 在线精品视频免费观看| 在线成人免费观看| 久久先锋资源网| 国产精品三级视频| 亚洲自拍与偷拍| 日本一区中文字幕| 国产精品综合av一区二区国产馆| 风间由美性色一区二区三区| 91理论电影在线观看| 精品视频在线看| 久久亚洲精华国产精华液| 最近中文字幕一区二区三区| 洋洋av久久久久久久一区| 美国精品在线观看| 国产成人h网站| 欧美无砖砖区免费| 国产亚洲欧美在线| 亚洲精选在线视频| 国产精品一二三区| 欧美日韩成人在线一区| 国产日韩高清在线| 视频一区二区欧美| 从欧美一区二区三区| 欧美精品在线视频| 中国av一区二区三区| 青娱乐精品视频在线| thepron国产精品| 日韩小视频在线观看专区| 国产精品短视频| 久久99久久久久| 在线精品视频免费观看| 国产精品你懂的在线欣赏| 青青草原综合久久大伊人精品| 成人免费的视频| 日韩丝袜情趣美女图片| 亚洲人吸女人奶水| 国产一区二区视频在线| 欧美老女人在线| 亚洲精品国产高清久久伦理二区 | 青青草伊人久久| 色老汉av一区二区三区| 中文成人av在线| 国产馆精品极品| 欧美一级精品在线| 亚洲国产精品欧美一二99| 91蜜桃在线免费视频| 久久一日本道色综合| 日韩电影在线观看网站| 91久久香蕉国产日韩欧美9色| 久久久精品免费观看| 精油按摩中文字幕久久| 在线不卡一区二区| 亚洲精品国产无天堂网2021| 成人免费观看视频| 久久久久久久国产精品影院| 狠狠色综合播放一区二区| 欧美性感一类影片在线播放| 1024精品合集| 91麻豆免费在线观看| 国产亚洲一本大道中文在线| 麻豆91在线看| 日韩一级二级三级| 免费成人在线观看| 欧美精品久久99| 日韩电影在线一区二区三区| 欧美日韩国产影片| 亚洲最大成人网4388xx| 一本色道久久加勒比精品| 亚洲欧洲日本在线| 99re亚洲国产精品| 国产精品超碰97尤物18| 色婷婷av一区二区| 日日夜夜精品视频免费| 欧美色图片你懂的| 婷婷久久综合九色综合伊人色| 欧美精品在线一区二区| 日韩精品亚洲一区| 日韩欧美成人激情| 国产尤物一区二区| 亚洲国产精品高清| 91在线无精精品入口| 一区二区三区四区不卡视频| 在线国产亚洲欧美| 日韩精品一卡二卡三卡四卡无卡| 7777精品伊人久久久大香线蕉经典版下载| 亚洲va国产va欧美va观看| 欧美性猛交一区二区三区精品| 日韩一区欧美二区| 欧美激情自拍偷拍| 欧洲一区在线电影| 精品午夜久久福利影院| 国产精品网站一区| 91久久奴性调教| 久久91精品国产91久久小草| 综合欧美亚洲日本| 欧美电影免费观看高清完整版 | 亚洲国产乱码最新视频| 日韩美女主播在线视频一区二区三区| 国产成人在线影院| 偷拍自拍另类欧美| 日本一区二区视频在线| 91精品国产综合久久福利| 成人免费视频一区| 蜜臀a∨国产成人精品| 国产精品国产三级国产专播品爱网 | 中文字幕一区二区三区在线播放| 在线视频你懂得一区| 国产曰批免费观看久久久| 亚洲视频你懂的| 久久免费电影网| 8x福利精品第一导航| 成人免费av网站| 韩国在线一区二区| 偷拍与自拍一区| 亚洲美女视频在线观看| 中文字幕欧美日本乱码一线二线| 欧美在线观看一区二区| 成人精品一区二区三区四区| 久久精品久久精品| 亚洲午夜久久久久久久久久久| 国产精品网站导航| 国产人妖乱国产精品人妖| 欧美一区二区三区在线视频 | 蜜臀久久99精品久久久画质超高清| 国产精品热久久久久夜色精品三区| 9191成人精品久久| 91豆麻精品91久久久久久| 国产91精品一区二区麻豆网站 | 亚洲欧洲制服丝袜| 国产精品国产三级国产普通话蜜臀| 精品国产123| 欧美一区二区视频在线观看| 91麻豆精品国产91久久久久久久久 | 中文字幕在线一区免费| 国产亚洲成av人在线观看导航| 精品免费日韩av| 欧美放荡的少妇| 欧美在线视频日韩| 欧美综合欧美视频| 色天使色偷偷av一区二区| 91啪九色porn原创视频在线观看| 不卡一区二区在线| 91麻豆国产精品久久| 一本色道久久综合精品竹菊| 91尤物视频在线观看| av电影一区二区| 91麻豆精东视频| 欧美丝袜丝nylons| 欧美日韩中文另类| 日韩欧美国产三级| 国产欧美日韩久久| 成人免费在线视频| 亚洲午夜精品在线| 蜜臀精品一区二区三区在线观看| 精品一区二区三区免费播放| 国产真实乱子伦精品视频| 国产高清久久久| 91在线观看下载| 色悠悠久久综合| 在线综合+亚洲+欧美中文字幕| 精品欧美一区二区久久 | 成人一区二区三区中文字幕| 丁香六月久久综合狠狠色| 91在线观看成人| 欧美精品99久久久**| 久久亚洲捆绑美女| 亚洲视频香蕉人妖| 奇米精品一区二区三区在线观看| 在线免费不卡电影| 欧美成人video| 亚洲人成7777| 日韩国产一区二| 成人一区二区三区视频在线观看| 91久久线看在观草草青青| 欧美成人精品福利| 亚洲精品免费一二三区| 蜜桃视频一区二区三区 | 欧美另类z0zxhd电影| 久久久噜噜噜久噜久久综合| 亚洲美女电影在线| 国产一区二三区好的| 欧美在线观看一区二区| 久久看人人爽人人| 亚洲成人一区在线|