Example #1
0
        private void archBtn_Click(object sender, EventArgs e)
        {
            // Récupération des données du formulaire
            string     libelle      = liste[numSelectionne].LblMdc;
            bool       ach          = liste[numSelectionne].ArchivageMdc;
            Medicament unMedicament = new Medicament(numSelectionne, libelle, ach);

            // Appel de la méthode SupprimerMedicament() de la GestionMedicament
            GestionMedicament.ArchiveMedicament(unMedicament);
        }
Example #2
0
        private void archBtn_Click(object sender, EventArgs e)
        {
            // Appel de la méthode SupprimerMedicament() de la GestionMedicament
            GestionMedicament.ArchiveMedicament(new Medicament((int)libelleMdcCmbx.SelectedValue, libelleMdcCmbx.Text, false));

            // Afficher le MessageBox.
            MessageBox.Show(
                this,
                "Le médicament a bien été archivé.",
                "Valider",
                MessageBoxButtons.OK,
                MessageBoxIcon.Question,
                MessageBoxDefaultButton.Button1);
        }
Example #3
0
        private void archBtn_Click(object sender, EventArgs e)
        {
            Medicament unMedicament = new Medicament((int)lblMdc_list.SelectedValue, lblMdc_list.Text, false);

            // Appel de la méthode SupprimerMedicament() de la GestionMedicament
            GestionMedicament.ArchiveMedicament(unMedicament);

            // Initializes the variables to pass to the MessageBox.Show method.
            DialogResult result;

            // Displays the MessageBox.
            result = MessageBox.Show(
                this,
                "Le médicament a bien été archivé.",
                "Valider",
                MessageBoxButtons.OK,
                MessageBoxIcon.Question,
                MessageBoxDefaultButton.Button1);

            if (result == DialogResult.No)
            {
                this.Close();
            }
        }