110,539
社区成员
发帖
与我相关
我的任务
分享
if (dr.Read())
{
string[] ss = new string[] { dr.GetString(0).Trim(), dr.GetString(1).Trim() };
if (ss[0] == textBox1.Text && ss[1] == textBox2.Text)
{
Form2 f = new Form2();
f.Show();
}
else
{
MessageBox.Show("密码或用户名不正确!", "错误提示", MessageBoxButtons.OK);
}
}
else
{
MessageBox.Show("用户名不存在,请重新输入!", "错误提示", MessageBoxButtons.OK);
}
}
if (ss[0] == textBox1.Text && ss[1] == textBox2.Text)
{
Form2 f = new Form2();
f.Show();
}
else
{
Messagebox.Show("密码或用户名不正确");
}