?? 用戶管理.cs
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
namespace 機房計費系統(tǒng)
{
/// <summary>
/// 用戶管理 的摘要說明。
/// </summary>
public class 用戶管理 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button10;
private System.Windows.Forms.GroupBox 添加新用戶;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.GroupBox groupBox2;
private DataSet sds=new DataSet();
private System.Windows.Forms.DataGrid dataGrid1;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
private System.Data.SqlClient.SqlConnection sqlConnection1;
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 sqlConnection2;
/// <summary>
/// 必需的設計器變量。
/// </summary>
private System.ComponentModel.Container components = null;
public 用戶管理()
{
//
// Windows 窗體設計器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 調(diào)用后添加任何構造函數(shù)代碼
//
}
/// <summary>
/// 清理所有正在使用的資源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗體設計器生成的代碼
/// <summary>
/// 設計器支持所需的方法 - 不要使用代碼編輯器修改
/// 此方法的內(nèi)容。
/// </summary>
private void InitializeComponent()
{
this.button10 = new System.Windows.Forms.Button();
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.添加新用戶 = new System.Windows.Forms.GroupBox();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.button2 = new System.Windows.Forms.Button();
this.textBox4 = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.textBox3 = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.sqlDataAdapter1 = new System.Data.SqlClient.SqlDataAdapter();
this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlConnection2 = 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.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
this.添加新用戶.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// button10
//
this.button10.Font = new System.Drawing.Font("宋體", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.button10.Location = new System.Drawing.Point(256, 320);
this.button10.Name = "button10";
this.button10.TabIndex = 1;
this.button10.Text = "提交修改";
this.button10.Click += new System.EventHandler(this.button10_Click);
//
// dataGrid1
//
this.dataGrid1.CaptionFont = new System.Drawing.Font("宋體", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.dataGrid1.DataMember = "";
this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point(16, 32);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.Size = new System.Drawing.Size(344, 280);
this.dataGrid1.TabIndex = 0;
//
// 添加新用戶
//
this.添加新用戶.Controls.Add(this.comboBox1);
this.添加新用戶.Controls.Add(this.label3);
this.添加新用戶.Controls.Add(this.textBox2);
this.添加新用戶.Controls.Add(this.label2);
this.添加新用戶.Controls.Add(this.textBox1);
this.添加新用戶.Controls.Add(this.label1);
this.添加新用戶.Controls.Add(this.button1);
this.添加新用戶.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.添加新用戶.Location = new System.Drawing.Point(400, 32);
this.添加新用戶.Name = "添加新用戶";
this.添加新用戶.Size = new System.Drawing.Size(272, 208);
this.添加新用戶.TabIndex = 2;
this.添加新用戶.TabStop = false;
this.添加新用戶.Text = "添加新用戶";
//
// comboBox1
//
this.comboBox1.Items.AddRange(new object[] {
"操作員",
"超級用戶"});
this.comboBox1.Location = new System.Drawing.Point(112, 120);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(136, 24);
this.comboBox1.TabIndex = 5;
//
// label3
//
this.label3.Location = new System.Drawing.Point(16, 128);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(56, 23);
this.label3.TabIndex = 4;
this.label3.Text = "權限";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(112, 80);
this.textBox2.Name = "textBox2";
this.textBox2.PasswordChar = '*';
this.textBox2.Size = new System.Drawing.Size(136, 26);
this.textBox2.TabIndex = 3;
this.textBox2.Text = "";
//
// label2
//
this.label2.Location = new System.Drawing.Point(16, 80);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 23);
this.label2.TabIndex = 2;
this.label2.Text = "密碼";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(112, 40);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(136, 26);
this.textBox1.TabIndex = 1;
this.textBox1.Text = "";
//
// label1
//
this.label1.Location = new System.Drawing.Point(16, 40);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 23);
this.label1.TabIndex = 0;
this.label1.Text = "姓名";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// button1
//
this.button1.Font = new System.Drawing.Font("宋體", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.button1.Location = new System.Drawing.Point(168, 168);
this.button1.Name = "button1";
this.button1.TabIndex = 3;
this.button1.Text = "確定";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.button2);
this.groupBox1.Controls.Add(this.textBox4);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.textBox3);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(400, 256);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(272, 136);
this.groupBox1.TabIndex = 3;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "修改個人密碼";
//
// button2
//
this.button2.Font = new System.Drawing.Font("宋體", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.button2.Location = new System.Drawing.Point(176, 104);
this.button2.Name = "button2";
this.button2.TabIndex = 4;
this.button2.Text = "確定";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(120, 72);
this.textBox4.Name = "textBox4";
this.textBox4.PasswordChar = '*';
this.textBox4.Size = new System.Drawing.Size(136, 26);
this.textBox4.TabIndex = 3;
this.textBox4.Text = "";
//
// label5
//
this.label5.Location = new System.Drawing.Point(24, 80);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(56, 23);
this.label5.TabIndex = 2;
this.label5.Text = "新密碼";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -