我正在登录系统中工作,因此用户可以通过按登录按钮插入凭据并登录(如果正确)。由于未知原因,即使我有正确的代码,该按钮也不会响应。
private void buttonLogIn_Click(object sender, EventArgs e)
{
if (TB1.Text == "Admin" && TB2.Text == "Admin")
{
Chef chef = new Chef();
MessageBox.Show("You've been logged in successfully as a Chef");
this.Hide();
chef.Show();
}
else
{
MessageBox.Show("Wrong Credentials");
}
}