private void Back_Click(object sender, EventArgs e) { choix choix = new choix(); choix.Show(); this.Close(); }
private void button2_Click(object sender, EventArgs e) { choix c = new choix(); c.Show(); this.Close(); }
private void Login_Click(object sender, EventArgs e) { Class1 c = new Class1(); c.s = "SELECT count(*) FROM [dbo].[Table] WHERE pseudo = '" + textBox1.Text + "' AND password = '******' "; SqlCommand cmd = new SqlCommand(c.s, c.cnx); c.cnx.Open(); int a = (Int32)cmd.ExecuteScalar(); if (a > 0) { Singleton.Instance.Pseudo = textBox1.Text; c.cnx.Close(); choix vue_choix = new choix(); vue_choix.Show(); } else { MessageBox.Show("email eronée"); } }