📄 opermana.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data ;
using System.Data .SqlClient ;
namespace RoomManage
{
/// <summary>
/// opermana 的摘要说明。
/// </summary>
public class opermana : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
char pur='0';
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox tbbh;
private System.Windows.Forms.TextBox tbxm;
private System.Windows.Forms.TextBox tbmm;
private System.Windows.Forms.ComboBox cbjb;
private System.Windows.Forms.TextBox tbbz;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Button buttappend;
private System.Windows.Forms.Button buttdelete;
private System.Windows.Forms.Button buttedit;
private System.Windows.Forms.Button buttsave;
private System.Windows.Forms.Button buttcancer;
private System.Windows.Forms.ComboBox cbbh;
string nam="";
DataConn dc=new DataConn ();
int opernum=0;//标志执行哪种操作
public opermana(char cc,string ss)
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
pur=cc;
nam=ss;
//
// 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.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.buttappend = new System.Windows.Forms.Button();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.cbbh = new System.Windows.Forms.ComboBox();
this.tbbh = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.tbxm = new System.Windows.Forms.TextBox();
this.tbmm = new System.Windows.Forms.TextBox();
this.cbjb = new System.Windows.Forms.ComboBox();
this.tbbz = new System.Windows.Forms.TextBox();
this.buttdelete = new System.Windows.Forms.Button();
this.buttedit = new System.Windows.Forms.Button();
this.buttsave = new System.Windows.Forms.Button();
this.buttcancer = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(232, 288);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(64, 23);
this.button1.TabIndex = 0;
this.button1.Text = "退出";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label1
//
this.label1.Location = new System.Drawing.Point(48, 48);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(72, 23);
this.label1.TabIndex = 1;
this.label1.Text = "新 密 码:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label2
//
this.label2.Location = new System.Drawing.Point(48, 88);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(72, 23);
this.label2.TabIndex = 1;
this.label2.Text = "确认密码:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(128, 48);
this.textBox1.Name = "textBox1";
this.textBox1.PasswordChar = '*';
this.textBox1.TabIndex = 2;
this.textBox1.Text = "";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(128, 88);
this.textBox2.Name = "textBox2";
this.textBox2.PasswordChar = '*';
this.textBox2.TabIndex = 2;
this.textBox2.Text = "";
//
// label3
//
this.label3.Location = new System.Drawing.Point(16, 8);
this.label3.Name = "label3";
this.label3.TabIndex = 3;
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Location = new System.Drawing.Point(3, 17);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(290, 228);
this.tabControl1.TabIndex = 4;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.button2);
this.tabPage1.Controls.Add(this.label1);
this.tabPage1.Controls.Add(this.textBox1);
this.tabPage1.Controls.Add(this.label2);
this.tabPage1.Controls.Add(this.textBox2);
this.tabPage1.Controls.Add(this.button3);
this.tabPage1.Location = new System.Drawing.Point(4, 21);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(282, 203);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "密码修改";
//
// button2
//
this.button2.Location = new System.Drawing.Point(48, 136);
this.button2.Name = "button2";
this.button2.TabIndex = 3;
this.button2.Text = "确定";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
this.button3.Location = new System.Drawing.Point(153, 136);
this.button3.Name = "button3";
this.button3.TabIndex = 3;
this.button3.Text = "取消";
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// tabPage2
//
this.tabPage2.Controls.Add(this.buttappend);
this.tabPage2.Controls.Add(this.groupBox2);
this.tabPage2.Controls.Add(this.cbbh);
this.tabPage2.Controls.Add(this.tbbh);
this.tabPage2.Controls.Add(this.label4);
this.tabPage2.Controls.Add(this.label5);
this.tabPage2.Controls.Add(this.label6);
this.tabPage2.Controls.Add(this.label7);
this.tabPage2.Controls.Add(this.label8);
this.tabPage2.Controls.Add(this.tbxm);
this.tabPage2.Controls.Add(this.tbmm);
this.tabPage2.Controls.Add(this.cbjb);
this.tabPage2.Controls.Add(this.tbbz);
this.tabPage2.Controls.Add(this.buttdelete);
this.tabPage2.Controls.Add(this.buttedit);
this.tabPage2.Controls.Add(this.buttsave);
this.tabPage2.Controls.Add(this.buttcancer);
this.tabPage2.Location = new System.Drawing.Point(4, 21);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Size = new System.Drawing.Size(282, 203);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "账号管理";
//
// buttappend
//
this.buttappend.Location = new System.Drawing.Point(8, 170);
this.buttappend.Name = "buttappend";
this.buttappend.Size = new System.Drawing.Size(48, 23);
this.buttappend.TabIndex = 4;
this.buttappend.Text = "添加";
this.buttappend.Click += new System.EventHandler(this.buttappend_Click);
//
// groupBox2
//
this.groupBox2.Location = new System.Drawing.Point(0, 160);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(280, 3);
this.groupBox2.TabIndex = 3;
this.groupBox2.TabStop = false;
//
// cbbh
//
this.cbbh.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbbh.Location = new System.Drawing.Point(112, 8);
this.cbbh.Name = "cbbh";
this.cbbh.Size = new System.Drawing.Size(100, 20);
this.cbbh.TabIndex = 2;
this.cbbh.SelectedIndexChanged += new System.EventHandler(this.cbbh_SelectedIndexChanged);
//
// tbbh
//
this.tbbh.Location = new System.Drawing.Point(112, 8);
this.tbbh.Name = "tbbh";
this.tbbh.ReadOnly = true;
this.tbbh.TabIndex = 1;
this.tbbh.Text = "";
//
// label4
//
this.label4.Location = new System.Drawing.Point(64, 8);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(48, 23);
this.label4.TabIndex = 0;
this.label4.Text = "编号:";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label5
//
this.label5.Location = new System.Drawing.Point(64, 38);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(48, 23);
this.label5.TabIndex = 0;
this.label5.Text = "姓名:";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label6
//
this.label6.Location = new System.Drawing.Point(64, 68);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(48, 23);
this.label6.TabIndex = 0;
this.label6.Text = "密码:";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label7
//
this.label7.Location = new System.Drawing.Point(64, 98);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(48, 23);
this.label7.TabIndex = 0;
this.label7.Text = "级别:";
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label8
//
this.label8.Location = new System.Drawing.Point(64, 128);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(48, 23);
this.label8.TabIndex = 0;
this.label8.Text = "备注:";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// tbxm
//
this.tbxm.Location = new System.Drawing.Point(112, 38);
this.tbxm.Name = "tbxm";
this.tbxm.TabIndex = 1;
this.tbxm.Text = "";
//
// tbmm
//
this.tbmm.Location = new System.Drawing.Point(112, 68);
this.tbmm.Name = "tbmm";
this.tbmm.PasswordChar = '*';
this.tbmm.TabIndex = 1;
this.tbmm.Text = "";
//
// cbjb
//
this.cbjb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbjb.Items.AddRange(new object[] {
"1",
"2",
"3"});
this.cbjb.Location = new System.Drawing.Point(112, 98);
this.cbjb.Name = "cbjb";
this.cbjb.Size = new System.Drawing.Size(100, 20);
this.cbjb.TabIndex = 2;
//
// tbbz
//
this.tbbz.Location = new System.Drawing.Point(112, 128);
this.tbbz.Name = "tbbz";
this.tbbz.TabIndex = 1;
this.tbbz.Text = "";
//
// buttdelete
//
this.buttdelete.Location = new System.Drawing.Point(56, 170);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -