?? changepassword.cs
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data .SqlClient ;
namespace OneToMany
{
/// <summary>
/// changePassword 的摘要說明。
/// </summary>
public class changePassword : System.Windows.Forms.Form
{
private System.Windows.Forms.Button btnExit;
private System.Windows.Forms.Button btnSubmit;
private System.Windows.Forms.TextBox newPassword2;
private System.Windows.Forms.TextBox newPassword;
private System.Windows.Forms.TextBox oldPassword;
private System.Windows.Forms.TextBox txtName;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
private System.Data.SqlClient.SqlConnection conn;
private System.Data.SqlClient.SqlDataAdapter sqltxtUser;
private System.ComponentModel.IContainer components;
private System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pictureBox1;
public static string UserName;
public changePassword()
{
//
// Windows 窗體設計器支持所必需的
//
InitializeComponent();
//
// 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()
{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(changePassword));
this.btnExit = new System.Windows.Forms.Button();
this.btnSubmit = new System.Windows.Forms.Button();
this.newPassword2 = new System.Windows.Forms.TextBox();
this.newPassword = new System.Windows.Forms.TextBox();
this.oldPassword = new System.Windows.Forms.TextBox();
this.txtName = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.sqltxtUser = new System.Data.SqlClient.SqlDataAdapter();
this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
this.conn = new System.Data.SqlClient.SqlConnection();
this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.SuspendLayout();
//
// btnExit
//
this.btnExit.Location = new System.Drawing.Point(192, 184);
this.btnExit.Name = "btnExit";
this.btnExit.TabIndex = 19;
this.btnExit.Text = "取消(&C)";
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
//
// btnSubmit
//
this.btnSubmit.Location = new System.Drawing.Point(80, 184);
this.btnSubmit.Name = "btnSubmit";
this.btnSubmit.TabIndex = 18;
this.btnSubmit.Text = "確認(&O)";
this.btnSubmit.Click += new System.EventHandler(this.btnSubmit_Click);
//
// newPassword2
//
this.newPassword2.Location = new System.Drawing.Point(168, 144);
this.newPassword2.Name = "newPassword2";
this.newPassword2.PasswordChar = '*';
this.newPassword2.TabIndex = 17;
this.newPassword2.Text = "";
//
// newPassword
//
this.newPassword.Location = new System.Drawing.Point(168, 104);
this.newPassword.Name = "newPassword";
this.newPassword.PasswordChar = '*';
this.newPassword.TabIndex = 16;
this.newPassword.Text = "";
//
// oldPassword
//
this.oldPassword.Location = new System.Drawing.Point(168, 64);
this.oldPassword.Name = "oldPassword";
this.oldPassword.PasswordChar = '*';
this.oldPassword.TabIndex = 15;
this.oldPassword.Text = "";
//
// txtName
//
this.txtName.Location = new System.Drawing.Point(168, 24);
this.txtName.Name = "txtName";
this.txtName.TabIndex = 14;
this.txtName.Text = "";
//
// label4
//
this.label4.Location = new System.Drawing.Point(88, 144);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(72, 23);
this.label4.TabIndex = 13;
this.label4.Text = "確認密碼";
//
// label3
//
this.label3.Location = new System.Drawing.Point(88, 112);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(48, 23);
this.label3.TabIndex = 12;
this.label3.Text = "新密碼";
//
// label2
//
this.label2.Location = new System.Drawing.Point(88, 72);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 23);
this.label2.TabIndex = 11;
this.label2.Text = "舊密碼";
//
// label1
//
this.label1.Location = new System.Drawing.Point(88, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(48, 23);
this.label1.TabIndex = 10;
this.label1.Text = "用戶名";
//
// sqltxtUser
//
this.sqltxtUser.DeleteCommand = this.sqlDeleteCommand1;
this.sqltxtUser.InsertCommand = this.sqlInsertCommand1;
this.sqltxtUser.SelectCommand = this.sqlSelectCommand1;
this.sqltxtUser.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "用戶清單", new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("用戶編號", "用戶編號"),
new System.Data.Common.DataColumnMapping("部門", "部門"),
new System.Data.Common.DataColumnMapping("姓名", "姓名"),
new System.Data.Common.DataColumnMapping("性別", "性別"),
new System.Data.Common.DataColumnMapping("密碼", "密碼")})});
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -