1 2 3 4 5 6 7 8 9
|
if (textBox1.Text.Length > 0)
{
SqlDataAdapter sda = new SqlDataAdapter("SELECT Employe.Matricule, Employe.Nom, Employe.Prenom, Statut.Corps, Statut.Cadre, Statut.Categorie, Statut.Grade, Statut.Echelon, Service.Service, Direction.Direction FROM Employe INNER JOIN Statut ON Employe.Matricule = Statut.Matricule INNER JOIN Service ON Employe.id_serv = Service.id_serv INNER JOIN Direction ON Service.id_dir = Direction.id_dir WHERE (Employe.Matricule = N' " + textBox1.Text + "%' ) AND (Employe.Nom = '" + textBox2.Text + "%') AND (Employe.Prenom = '" + textBox3.Text + "%')", con);
sda.Fill(dt);
DataGridView1.DataSource = dt;
} |