private void buttonValider_Click(object sender, EventArgs e) { addButtonMateriel.Enabled = true; editButtonMateriel.Enabled = true; deleteButtonMateriel.Enabled = true; buttonModifier.Visible = false; ToggleForm(); DataSet1TableAdapters.materielTableAdapter materielAdaptater = new DataSet1TableAdapters.materielTableAdapter(); DataSet1TableAdapters.interventionTableAdapter intervetionAdaptater = new DataSet1TableAdapters.interventionTableAdapter(); DataSet1.materielDataTable tab1 = new DataSet1.materielDataTable(); ListItem client = (ListItem)formFieldClient.SelectedItem; ListItem batiment = (ListItem)formFieldClient.SelectedItem; ListItem materiel = (ListItem)formFieldClient.SelectedItem; ListItem type_materiel = (ListItem)formFieldTypeMateriel.SelectedItem; ListItem salle = (ListItem)formFieldSalle.SelectedItem; string name_materiel = formFieldNomMateriel.Text; string description = ""; string commentaires = ""; materielAdaptater.InsertMaterielAndIntervention(tab1, client.ID, name_materiel, description, type_materiel.ID, commentaires, salle.ID); MessageBox.Show("Materiel crée avec succès"); FillDataViewGrid(); FillDataViewGridIntervention(); formFieldNomMateriel.Text = ""; }