Beispiel #1
0
        private void buttonConnexion_Click(object sender, EventArgs e)
        {
            SqlConnection  Connection = new SqlConnection(SqlConnectionString);
            SqlDataAdapter Select     = new SqlDataAdapter("Select * From LoginAdmin where log ='" + textBoxLogin.Text + "' and password ='******'", Connection);
            DataTable      Dt         = new DataTable();

            Select.Fill(Dt);
            if (Dt.Rows.Count == 1)
            {
                Hide();
                PageContact admin = new PageContact();
                admin.Show();
            }
            else
            {
                MessageBox.Show("Veuillez entre bon login et mot de passe");
                textBoxLogin.Text = "";
                textBoxMdp.Text   = "";
            }
        }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            PageContact contact = new PageContact();

            contact.Show();
        }