📄 frm管理员管理.cs
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace 餐饮管理系统
{
public partial class frm管理员管理 : Form
{
public frm管理员管理()
{
InitializeComponent();
}
private void frm会员管理_Load(object sender, EventArgs e)
{
}
private void buttonOK_Click(object sender, EventArgs e)
{
string strUserID = textBox1.Text.Trim();
string strPwd = textBox2.Text.Trim();
string strRePwd = textBox3.Text.Trim();
if (strUserID == "")
{
Utility.SetErr(textBox1, "帐号不能为空!");
return;
}
if (strPwd == "" || strRePwd == "")
{
Utility.SetErr(buttonOK, "密码为能为空!");
textBox2.Text = "";
textBox3.Text = "";
textBox2.Focus();
return;
}
if (strPwd != strRePwd)
{
Utility.SetErr(textBox3, "两次密码输入不一致!请重新输入!");
textBox2.Text = "";
textBox3.Text = "";
textBox2.Focus();
return;
}
string strSql = string.Format("insert into dt_Admin(管理员,密码)values('{0}','{1}')", strUserID, strRePwd);
if (DBserver.setCommNornQuey(strSql) > 0)
{
MessageBox.Show("注册成功!");
this.Close();
}
}
private void textBox3_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
buttonOK_Click(null, null);
}
}
//退出管理员注册界面
private void buttonCancle_Click(object sender, EventArgs e)
{
this.Close();
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -