private void btnDeleteVille_Click(object sender, EventArgs e) { if (this.dataGridVilles.SelectedRows.Count > 0) { int selectedRowIndex = this.dataGridVilles.SelectedRows[0].Index; int idVille = Convert.ToInt32(this.dataGridVilles.Rows[selectedRowIndex].Cells["IdVille"].Value); IGestionEmployes gestionEmployes = GestionEmployesBuilderClassFactory.getInterface(); gestionEmployes.deleteVille(idVille); dataGridVilles.DataSource = gestionEmployes.findAllVilles(); } }