Example #1
0
        private void ToolStripMenuItemNewEtu_Click(object sender, EventArgs e)
        {
            FormEtudiant etudiant = new FormEtudiant();

            etudiant.MdiParent = this;
            etudiant.Show();
        }
Example #2
0
        private void buttonListEtudiantAfficher_Click(object sender, EventArgs e)
        {
            int value;

            Int32.TryParse(comboBoxListEtudiant.SelectedValue.ToString(), out value);
            etudiantSelectionne = EtudiantManager.GetEtudiant(value);
            if (value != -1 && value != 1)
            {
                FormEtudiant formEtudiant = new FormEtudiant(etudiantSelectionne);
                formEtudiant.MdiParent = this.MdiParent;
                formEtudiant.Show();
                this.Close();
            }
            // Protection de l'id de l'étudiant par défaut
            if (value == 1)
            {
                MessageBox.Show("Ligne protégée pour la stabilité de l'application", "Attention", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }