1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
private void button1_Click(object sender, EventArgs e)
{
/*string req = "select Login, MotPasse from Connexion";
DataTable tab = new DataTable();
SqlCeCommand com = new SqlCeCommand(req, sqlceconn);
SqlCeDataAdapter ada = new SqlCeDataAdapter(com);
ada.Fill(tab);*/
string s1 = textBox1.Text.ToString();
string s2 = textBox2.Text.ToString();
BaseGmaoLocaleDataSet2 dat = new BaseGmaoLocaleDataSet2();
DataRow[] foundRows;
foundRows = dat.Tables["Connexion"].Select("Login like s1 and MotPasse like s2");
if (foundRows != null)
{
MessageBox.Show("Authentification réussie");
MenuP m = new MenuP();
m.Show();
}
else
{
MessageBox.Show("Login ou mot de passe incorrect veuillez réessayer");
}
}}} |
Partager