示例#1
0
        private void buttonAddIo_Click(object sender, EventArgs e)
        {
            IhmManager.ajouterAssociation = true;
            FenCrudIoPhysAssocie form = new FenCrudIoPhysAssocie();

            form.ShowDialog();

            if (FenCrudIoPhysAssocie.ioPhystAss.ioPhysique != null)
            {
                this.fctElectronique.ajouterIoPhys(FenCrudIoPhysAssocie.ioPhystAss);
                this.listBoxIo.DataSource = null;
                this.listBoxIo.DataSource = this.fctElectronique.listIO;
            }
        }
示例#2
0
        private void buttonUpdateIo_Click(object sender, EventArgs e)
        {
            IhmManager.ajouterAssociation = false;
            IhmManager.ioPhysAssSelect    = (IoPhysiqueAssociee)this.listBoxIo.SelectedItem;

            if (IhmManager.ioPhysAssSelect != null)
            {
                FenCrudIoPhysAssocie form = new FenCrudIoPhysAssocie();
                form.ShowDialog();

                if (FenCrudIoPhysAssocie.ioPhystAss != null)
                {
                    this.fctElectronique.modifierIoPhys(FenCrudIoPhysAssocie.ioPhystAss);
                    this.listBoxIo.DataSource = null;
                    this.listBoxIo.DataSource = this.fctElectronique.listIO;
                }
            }
            else
            {
                MessageBox.Show("Veuillez d'abord selectionner un critère ! ");
            }
        }