private void buttonAddCrit_Click(object sender, EventArgs e) { IhmManager.ajouterAssociation = true; FenCrudCritAssocie form = new FenCrudCritAssocie(); form.ShowDialog(); if (FenCrudCritAssocie.critAss.critere != null) { this.fctElectronique.ajouterCritere(FenCrudCritAssocie.critAss); this.listBoxCrit.DataSource = null; this.listBoxCrit.DataSource = this.fctElectronique.listCritere; } }
private void buttonUpdateCrit_Click(object sender, EventArgs e) { IhmManager.ajouterAssociation = false; IhmManager.critAssSelect = (CritereAssociee)listBoxCrit.SelectedItem; if (IhmManager.critAssSelect != null) { FenCrudCritAssocie form = new FenCrudCritAssocie(); form.ShowDialog(); if (FenCrudCritAssocie.critAss.critere != null) { this.fctElectronique.modifierCritere(FenCrudCritAssocie.critAss); this.listBoxCrit.DataSource = null; this.listBoxCrit.DataSource = this.fctElectronique.listCritere; } } else { MessageBox.Show("Veuillez d'abord selectionner un critère ! "); } }