private void btnDeleteSociete_Click(object sender, EventArgs e) { if (this.dataGridSocietes.SelectedRows.Count > 0) { int selectedRowIndex = this.dataGridSocietes.SelectedRows[0].Index; int IdSociete = Convert.ToInt32(this.dataGridSocietes.Rows[selectedRowIndex].Cells["IdSociete"].Value); IGestionEmployes gestionEmployes = GestionEmployesBuilderClassFactory.getInterface(); gestionEmployes.deleteSociete(IdSociete); dataGridSocietes.DataSource = gestionEmployes.findAllSocietes(); } }