📄 operator_manager.cs
字号:
//
// label3
//
this.label3.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label3.ForeColor = System.Drawing.Color.Olive;
this.label3.Location = new System.Drawing.Point(16, 16);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(72, 32);
this.label3.TabIndex = 0;
this.label3.Text = "用户名:";
//
// panel2
//
this.panel2.Controls.Add(this.label15);
this.panel2.Controls.Add(this.btnok2);
this.panel2.Controls.Add(this.txtlevel2);
this.panel2.Controls.Add(this.txtuserid2);
this.panel2.Controls.Add(this.label7);
this.panel2.Controls.Add(this.label6);
this.panel2.Location = new System.Drawing.Point(248, 112);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(448, 128);
this.panel2.TabIndex = 12;
//
// btnok2
//
this.btnok2.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.btnok2.Location = new System.Drawing.Point(336, 80);
this.btnok2.Name = "btnok2";
this.btnok2.Size = new System.Drawing.Size(104, 32);
this.btnok2.TabIndex = 4;
this.btnok2.Text = "确定";
this.btnok2.Click += new System.EventHandler(this.btnok2_Click);
//
// txtlevel2
//
this.txtlevel2.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.txtlevel2.Location = new System.Drawing.Point(312, 16);
this.txtlevel2.Name = "txtlevel2";
this.txtlevel2.Size = new System.Drawing.Size(112, 23);
this.txtlevel2.TabIndex = 3;
this.txtlevel2.Text = "";
//
// txtuserid2
//
this.txtuserid2.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.txtuserid2.Location = new System.Drawing.Point(80, 22);
this.txtuserid2.Name = "txtuserid2";
this.txtuserid2.Size = new System.Drawing.Size(112, 23);
this.txtuserid2.TabIndex = 2;
this.txtuserid2.Text = "";
//
// label7
//
this.label7.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label7.ForeColor = System.Drawing.Color.Green;
this.label7.Location = new System.Drawing.Point(224, 24);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(64, 15);
this.label7.TabIndex = 1;
this.label7.Text = "新权限:";
//
// label6
//
this.label6.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label6.ForeColor = System.Drawing.Color.Green;
this.label6.Location = new System.Drawing.Point(16, 24);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(64, 32);
this.label6.TabIndex = 0;
this.label6.Text = "用户名:";
//
// panel3
//
this.panel3.Controls.Add(this.txtuserid3);
this.panel3.Controls.Add(this.label13);
this.panel3.Controls.Add(this.btnok3);
this.panel3.Controls.Add(this.txtoldpwd);
this.panel3.Controls.Add(this.txtconfirmnewpwd);
this.panel3.Controls.Add(this.txtnewpwd);
this.panel3.Controls.Add(this.label10);
this.panel3.Controls.Add(this.label9);
this.panel3.Controls.Add(this.label8);
this.panel3.Location = new System.Drawing.Point(240, 112);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(456, 128);
this.panel3.TabIndex = 14;
//
// txtuserid3
//
this.txtuserid3.Location = new System.Drawing.Point(80, 16);
this.txtuserid3.Name = "txtuserid3";
this.txtuserid3.Size = new System.Drawing.Size(104, 21);
this.txtuserid3.TabIndex = 8;
this.txtuserid3.Text = "";
//
// label13
//
this.label13.Location = new System.Drawing.Point(8, 24);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(56, 24);
this.label13.TabIndex = 7;
this.label13.Text = "用户名:";
//
// btnok3
//
this.btnok3.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.btnok3.Location = new System.Drawing.Point(296, 88);
this.btnok3.Name = "btnok3";
this.btnok3.Size = new System.Drawing.Size(112, 32);
this.btnok3.TabIndex = 6;
this.btnok3.Text = "确认修改";
this.btnok3.Click += new System.EventHandler(this.btnok3_Click);
//
// txtoldpwd
//
this.txtoldpwd.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.txtoldpwd.Location = new System.Drawing.Point(304, 16);
this.txtoldpwd.Name = "txtoldpwd";
this.txtoldpwd.Size = new System.Drawing.Size(128, 23);
this.txtoldpwd.TabIndex = 5;
this.txtoldpwd.Text = "";
//
// txtconfirmnewpwd
//
this.txtconfirmnewpwd.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.txtconfirmnewpwd.Location = new System.Drawing.Point(304, 54);
this.txtconfirmnewpwd.Name = "txtconfirmnewpwd";
this.txtconfirmnewpwd.Size = new System.Drawing.Size(128, 23);
this.txtconfirmnewpwd.TabIndex = 4;
this.txtconfirmnewpwd.Text = "";
//
// txtnewpwd
//
this.txtnewpwd.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.txtnewpwd.Location = new System.Drawing.Point(80, 53);
this.txtnewpwd.Name = "txtnewpwd";
this.txtnewpwd.Size = new System.Drawing.Size(104, 23);
this.txtnewpwd.TabIndex = 3;
this.txtnewpwd.Text = "";
//
// label10
//
this.label10.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label10.Location = new System.Drawing.Point(200, 56);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(104, 24);
this.label10.TabIndex = 2;
this.label10.Text = "确认新密码:";
//
// label9
//
this.label9.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label9.Location = new System.Drawing.Point(8, 56);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(64, 24);
this.label9.TabIndex = 1;
this.label9.Text = "新密码:";
//
// label8
//
this.label8.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label8.Location = new System.Drawing.Point(224, 18);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(64, 24);
this.label8.TabIndex = 0;
this.label8.Text = "旧密码:";
//
// panel4
//
this.panel4.Controls.Add(this.btnsearch);
this.panel4.Controls.Add(this.btnok4);
this.panel4.Controls.Add(this.txtlevel4);
this.panel4.Controls.Add(this.txtuserid4);
this.panel4.Controls.Add(this.label12);
this.panel4.Controls.Add(this.label11);
this.panel4.Location = new System.Drawing.Point(232, 112);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(456, 128);
this.panel4.TabIndex = 5;
//
// btnsearch
//
this.btnsearch.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.btnsearch.Location = new System.Drawing.Point(160, 72);
this.btnsearch.Name = "btnsearch";
this.btnsearch.Size = new System.Drawing.Size(88, 32);
this.btnsearch.TabIndex = 5;
this.btnsearch.Text = "查找";
this.btnsearch.Click += new System.EventHandler(this.btnsearch_Click);
//
// btnok4
//
this.btnok4.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.btnok4.Location = new System.Drawing.Point(280, 72);
this.btnok4.Name = "btnok4";
this.btnok4.Size = new System.Drawing.Size(120, 32);
this.btnok4.TabIndex = 4;
this.btnok4.Text = "确定删除";
this.btnok4.Click += new System.EventHandler(this.btnok4_Click);
//
// txtlevel4
//
this.txtlevel4.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.txtlevel4.Location = new System.Drawing.Point(304, 17);
this.txtlevel4.Name = "txtlevel4";
this.txtlevel4.Size = new System.Drawing.Size(112, 23);
this.txtlevel4.TabIndex = 3;
this.txtlevel4.Text = "";
//
// txtuserid4
//
this.txtuserid4.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.txtuserid4.Location = new System.Drawing.Point(88, 17);
this.txtuserid4.Name = "txtuserid4";
this.txtuserid4.Size = new System.Drawing.Size(104, 23);
this.txtuserid4.TabIndex = 2;
this.txtuserid4.Text = "";
//
// label12
//
this.label12.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label12.Location = new System.Drawing.Point(209, 18);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(80, 32);
this.label12.TabIndex = 1;
this.label12.Text = "权限:";
//
// label11
//
this.label11.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label11.Location = new System.Drawing.Point(16, 18);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(64, 24);
this.label11.TabIndex = 0;
this.label11.Text = "用户名:";
//
// btnrefresh
//
this.btnrefresh.Location = new System.Drawing.Point(400, 64);
this.btnrefresh.Name = "btnrefresh";
this.btnrefresh.Size = new System.Drawing.Size(104, 32);
this.btnrefresh.TabIndex = 15;
this.btnrefresh.Text = "刷新";
this.btnrefresh.Click += new System.EventHandler(this.btnrefresh_Click);
//
// label14
//
this.label14.Font = new System.Drawing.Font("宋体", 9F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label14.ForeColor = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(192)), ((System.Byte)(0)));
this.label14.Location = new System.Drawing.Point(16, 104);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(272, 16);
this.label14.TabIndex = 7;
this.label14.Text = "1为最高权限,2次之,3次于2,其他为最低权限";
//
// label15
//
this.label15.Font = new System.Drawing.Font("宋体", 10.5F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label15.ForeColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(0)), ((System.Byte)(0)));
this.label15.Location = new System.Drawing.Point(8, 88);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(312, 16);
this.label15.TabIndex = 8;
this.label15.Text = "1为最高权限,2次之,3次于2,其他为最低权限";
//
// operator_manager
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(712, 365);
this.Controls.Add(this.btnrefresh);
this.Controls.Add(this.btnexit);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.btnchangelevel);
this.Controls.Add(this.btnchangepwd);
this.Controls.Add(this.btndel);
this.Controls.Add(this.btnadd);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel3);
this.Controls.Add(this.panel4);
this.Controls.Add(this.panel1);
this.Name = "operator_manager";
this.Text = "操作员管理";
this.Load += new System.EventHandler(this.operator_manager_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.panel4.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
#region 根据用户操作显示相应的操作面板
//显示添加操作员面板
private void btnadd_Click(object sender, System.EventArgs e)
{
panel1.Show();
panel1.Focus();
panel2.Hide();
panel3.Hide();
panel4.Hide();
}
//显示修改权限面板
private void btnchangelevel_Click(object sender, System.EventArgs e)
{
if (selectuserid!="")
{
txtuserid2.Text=selectuserid;
}
panel1.Visible=false;
panel2.Show();
panel2.Focus();
panel3.Visible=false;
panel4.Visible=false;
}
//显示更改密码面板
private void btnchangepwd_Click(object sender, System.EventArgs e)
{
if (selectuserid!="")
{
txtuserid3.Text=selectuserid;
}
panel1.Visible=false;
panel2.Visible=false;
panel3.Show();
panel3.Focus();
panel4.Hide();
}
//显示删除操作员面板
private void btndel_Click(object sender, System.EventArgs e)
{
if (selectuserid!="")
{
txtuserid4.Text=selectuserid;
}
if (selectlevels!="")
{
txtlevel4.Text=selectlevels;
}
panel1.Hide();
panel2.Hide();
panel3.Hide();
panel4.Show();
panel4.Focus();
}
#endregion
#region 初始化界面
private void operator_manager_Load(object sender, System.EventArgs e)
{
lv.Items.Clear();
int i;
string selstr="select userid,levels from account_user";
SqlConnection opermana=new Classdb().conds();
SqlDataAdapter sqlda=new SqlDataAdapter(selstr,opermana);
DataSet ds=new DataSet();
DataTable table=new DataTable();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -