private void button4_Click(object sender, EventArgs e) { this.Hide(); Accueil al = new Accueil(); al.ShowDialog(); this.Close(); }
private void button1_Click(object sender, EventArgs e) { utils.Connect(); OleDbDataAdapter req = new OleDbDataAdapter("select COUNT(*) from users where login='******'and pass='******'", utils.cn); DataTable dt = new DataTable(); req.Fill(dt); if (dt.Rows[0][0].ToString() == "1") { this.Hide(); Accueil ac = new Accueil(); ac.ShowDialog(); this.Close(); } else { MessageBox.Show("incorrect"); } }