Пример #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     connection.con.Open();
     if (textBox2.Text != "" && textBox1.Text != "")
     {
         string req = "select count(*) from formateur where users='" + textBox1.Text + "' and pass='******'";
         connection.cmd = new SqlCommand(req, connection.con);
         connection.dr  = connection.cmd.ExecuteReader();
         connection.dr.Read();
         if (connection.dr[0].ToString() == "1")
         {
             connection.con.Close();
             this.Hide();
             formateur m = new formateur();
             m.Show();
         }
         else
         {
             MessageBox.Show("Mot de passe ou username est incorrect");
         }
     }
     else
     {
         MessageBox.Show("Remplir tous les champs !!");
     }
     connection.con.Close();
 }
Пример #2
0
        private void pictureBox3_Click(object sender, EventArgs e)
        {
            this.Hide();
            formateur L = new formateur();

            L.Show();
        }
Пример #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            formateur m = new formateur();

            m.Show();
        }
Пример #4
0
        private void confirmer_Click(object sender, EventArgs e)
        {
            if (question.Text != "" && reponse.Text != "" && chois1.Text != "" && chois2.Text != "" && chois3.Text != "")
            {
                connection.con.Open();
                string req = "insert into question_qcm values(" + creer_qcm.id + "," + Convert.ToInt16(num.Text) + ",'" + question.Text + "','" + reponse.Text + "','" + chois1.Text + "','" + chois2.Text + "','" + chois3.Text + "')";
                connection.cmd = new SqlCommand(req, connection.con);
                connection.cmd.ExecuteNonQuery();
                connection.con.Close();
                //vider les champs
                question.Text = "";
                reponse.Text  = "";
                chois1.Text   = "";
                chois2.Text   = "";
                chois3.Text   = "";

                MessageBox.Show("** Module Bien Ajouter **");
                this.Hide();
                formateur ff = new formateur();
                ff.Show();
            }
            else
            {
                MessageBox.Show("Remplir tous les champs !!");
            }
        }
Пример #5
0
        private void pictureBox3_Click(object sender, EventArgs e)
        {
            connection.con.Close();
            this.Hide();
            formateur f = new formateur();

            f.Show();
        }