修改管理员密码的c#代码,有原密码,新密码,再次输入三个框。 10
3个回答
展开全部
=========大概逻辑,,需要密码 站内联系我
//重置按钮事件
private void button2_Click(object sender, EventArgs e)
{
textBox1.Text = "";
textBox2.Text = "";
textBox3.Text = "";
}
// 提交按钮事件
private void button1_Click(object sender, EventArgs e)
{
String oldPwd = textBox1.Text;
String newPwd = textBox2.Text;
String newPwd1 = textBox2.Text;
if (oldPwd == "" || newPwd == "" || newPwd1 == "")
{
MessageBox.Show("请填写");
}
else if (newPwd != newPwd1)
{
MessageBox.Show("两次输入的密码不正确");
}
else {
textBox1.Text = "";
textBox2.Text = "";
textBox3.Text = "";
MessageBox.Show("修改完成");
}
}
//重置按钮事件
private void button2_Click(object sender, EventArgs e)
{
textBox1.Text = "";
textBox2.Text = "";
textBox3.Text = "";
}
// 提交按钮事件
private void button1_Click(object sender, EventArgs e)
{
String oldPwd = textBox1.Text;
String newPwd = textBox2.Text;
String newPwd1 = textBox2.Text;
if (oldPwd == "" || newPwd == "" || newPwd1 == "")
{
MessageBox.Show("请填写");
}
else if (newPwd != newPwd1)
{
MessageBox.Show("两次输入的密码不正确");
}
else {
textBox1.Text = "";
textBox2.Text = "";
textBox3.Text = "";
MessageBox.Show("修改完成");
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询