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 26 27 28 29
|
private void button_HW_Status_Click(object sender, EventArgs e)
{
HW_Statut ma_form_HW_Statut = new HW_Statut();
if (dataGridView1.RowCount > 0)
{
ma_form_HW_Statut.ID_projet = "";
for (int i = 0; i < dataGridView1.RowCount; i++)
{
if (ma_form_HW_Statut.ID_projet == "")
{
ma_form_HW_Statut.ID_projet += dataGridView1.Rows[i].Cells[0].Value.ToString() + "'";
}
else
{
ma_form_HW_Statut.ID_projet += " OR ID_project='" + dataGridView1.Rows[i].Cells[0].Value.ToString() + "'";
}
}
ma_form_HW_Statut.ID_projet = ma_form_HW_Statut.ID_projet.Substring(0, ma_form_HW_Statut.ID_projet.Length - 1);
}
else
{
ma_form_HW_Statut.ID_projet = "*";
}
ma_form_HW_Statut.ShowDialog();
} |
Partager