コード例 #1
0
ファイル: FenCrudFctElect.cs プロジェクト: Julien4T/A2E_Stage
        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;
            }
        }
コード例 #2
0
ファイル: FenCrudFctElect.cs プロジェクト: Julien4T/A2E_Stage
        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 ! ");
            }
        }