private void pictureBox3_Click(object sender, EventArgs e) { this.Hide(); AdminMainPage f1 = new AdminMainPage(); f1.Show(); }
private void bunifuFlatButton1_Click(object sender, EventArgs e) { connection.Open(); OleDbCommand command = new OleDbCommand(); command.Connection = connection; command.CommandText = "select * from Table1 where ID='" + alphaBlendTextBox1.Text + "'and Password='******'"; OleDbDataReader reader = command.ExecuteReader(); int c = 0; while (reader.Read()) { c = c + 1; } if (c == 1) { MessageBox.Show("Username and Password are Correct"); this.Hide(); AdminMainPage f1 = new AdminMainPage(); f1.Show(); } else if (c > 1) { MessageBox.Show("Too Many Username of this"); } else { MessageBox.Show("Username and Password is not Correct"); } connection.Close(); }