private void button1_Click_1(object sender, EventArgs e) { x = 0; con.Open(); MySqlCommand cmd = con.CreateCommand(); cmd.CommandType = CommandType.Text; cmd.CommandText = "select *from login where user='******' and pass ='******'"; cmd.ExecuteNonQuery(); DataTable dt = new DataTable(); MySqlDataAdapter mdp = new MySqlDataAdapter(cmd); mdp.Fill(dt); x = Convert.ToInt32(dt.Rows.Count.ToString()); if (x == 0) { labelX1.Text = "Sorry Your User or Password Invalid"; } else { this.Hide(); student dir = new student(); dir.Show(); } con.Close(); }
private void etudiantsToolStripMenuItem1_Click(object sender, EventArgs e) { student el = new student(); el.Show(); }
private void inscriptionToolStripMenuItem2_Click(object sender, EventArgs e) { student st = new student(); st.Show(); }