private void metroButton1_Click(object sender, EventArgs e)
        {
            this.Hide();
            AdminScolGlob g2 = new AdminScolGlob();

            g2.Show();
        }
        private void C_Click(object sender, EventArgs e)
        {
            this.Hide();
            AdminScolGlob ga = new AdminScolGlob();

            ga.Show();
        }
Ejemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            AdminScolGlob gl = new AdminScolGlob();

            gl.Show();
        }
Ejemplo n.º 4
0
        private void conx_Click_1(object sender, EventArgs e)
        {
            connection.Open();
            SqlDataReader myReader  = null;
            SqlCommand    myCommand = new SqlCommand("select Profil from Compte where Login = '******' and Password = '******'", connection);

            myReader = myCommand.ExecuteReader();
            //string userText = MainMDI.globalstring;
            if (myReader.HasRows)
            {
                while (myReader.Read())
                {
                    if (myReader["Profil"].ToString() == "Administrateur")
                    {
                        this.Hide();
                        Administrateur ad = new Administrateur();
                        ad.Show();
                    }
                    else if (myReader["Profil"].ToString() == "Professeur")
                    {
                        this.Hide();
                        Prof ad = new Prof(login.Text);
                        ad.Show();
                    }
                    else if (myReader["Profil"].ToString() == "AdministrateurScol")
                    {
                        this.Hide();
                        AdminScolGlob adsc = new AdminScolGlob();
                        adsc.Show();
                    }
                    else if (myReader["Profil"].ToString() == "Etudiant")
                    {
                        this.Hide();
                        EtudiantAbsenceExam et = new EtudiantAbsenceExam(login.Text);
                        et.Show();
                    }
                }
            }
            else
            {
                MessageBox.Show("Invalid Login or Password !!");
                this.login.Focus();
                this.login.Clear();
                this.pass.Clear();
            }


            connection.Close();
        }