コード例 #1
0
        // Bouton Ajouter
        private void BTN_Ajouter_Click(object sender, EventArgs e)
        {
            TXT_Titre.Text = "";
            TXT_AnneeSortie.Text = "";
            TXT_Langue.Text = "Français";
            CB_TypeMedia.SelectedIndex = 0;

            action = ActionSelectionnee.Ajouter;
            AfficherMasquerChamps(true);
        }
コード例 #2
0
        // Bouton Ajouter
        private void BTN_Ajouter_Click(object sender, EventArgs e)
        {
            TXT_Titre.Text             = "";
            TXT_AnneeSortie.Text       = "";
            TXT_Langue.Text            = "Français";
            CB_TypeMedia.SelectedIndex = 0;

            action = ActionSelectionnee.Ajouter;
            AfficherMasquerChamps(true);
        }
コード例 #3
0
        // Bouton Ajouter
        private void BTN_Ajouter_Click(object sender, EventArgs e)
        {
            TXT_Nom.Text = "";
            TXT_Auteur.Text = "";
            TXT_NbPages.Text = "";

            action = ActionSelectionnee.Ajouter;
            AfficherMasquerChamps(true);

            TXT_Nom.Focus();
        }
コード例 #4
0
        // Bouton Ajouter
        private void BTN_Ajouter_Click(object sender, EventArgs e)
        {
            TXT_Album.Text       = "";
            TXT_Artiste.Text     = "";
            TXT_AnneeSortie.Text = "";

            action = ActionSelectionnee.Ajouter;
            AfficherMasquerChamps(true);

            TXT_Album.Focus();
        }
コード例 #5
0
        // Bouton Ajouter
        private void BTN_Ajouter_Click(object sender, EventArgs e)
        {
            TXT_Nom.Text     = "";
            TXT_Auteur.Text  = "";
            TXT_NbPages.Text = "";

            action = ActionSelectionnee.Ajouter;
            AfficherMasquerChamps(true);

            TXT_Nom.Focus();
        }
コード例 #6
0
        // Bouton Ajouter
        private void BTN_Ajouter_Click(object sender, EventArgs e)
        {
            TXT_Album.Text = "";
            TXT_Artiste.Text = "";
            TXT_AnneeSortie.Text = "";

            action = ActionSelectionnee.Ajouter;
            AfficherMasquerChamps(true);

            TXT_Album.Focus();
        }
コード例 #7
0
        // Bouton Modifier
        private void BTN_Modifier_Click(object sender, EventArgs e)
        {
            if (LB_Films.SelectedItem != null)
            {
                action = ActionSelectionnee.Modifier;
                AfficherMasquerChamps(true);

                Film itemSelectionne = (Film)LB_Films.SelectedItem;
                Film film            = new Film(itemSelectionne.GetCode());

                TXT_Titre.Text             = film.GetNom();
                TXT_AnneeSortie.Text       = film.GetAnneeSortie().ToString();
                TXT_Langue.Text            = film.GetLangue();
                CB_TypeMedia.SelectedIndex = film.GetType().GetCode() - 1;
            }
        }
コード例 #8
0
        // Bouton Modifier
        private void BTN_Modifier_Click(object sender, EventArgs e)
        {
            if (LB_Films.SelectedItem != null)
            {
                action = ActionSelectionnee.Modifier;
                AfficherMasquerChamps(true);

                Film itemSelectionne = (Film)LB_Films.SelectedItem;
                Film film = new Film(itemSelectionne.GetCode());

                TXT_Titre.Text = film.GetNom();
                TXT_AnneeSortie.Text = film.GetAnneeSortie().ToString();
                TXT_Langue.Text = film.GetLangue();
                CB_TypeMedia.SelectedIndex = film.GetType().GetCode() - 1;
            }
        }
コード例 #9
0
        // Bouton Modifier
        private void BTN_Modifier_Click(object sender, EventArgs e)
        {
            if (LB_Livres.SelectedItem != null)
            {
                action = ActionSelectionnee.Modifier;
                AfficherMasquerChamps(true);

                Livre itemSelectionne = (Livre)LB_Livres.SelectedItem;
                Livre cd = new Livre(itemSelectionne.GetCode());

                TXT_Nom.Text = cd.GetNom();
                TXT_Auteur.Text = cd.GetAuteur();
                TXT_NbPages.Text = cd.GetNombrePages().ToString();

                TXT_Nom.Focus();
            }
        }
コード例 #10
0
        // Bouton Modifier
        private void BTN_Modifier_Click(object sender, EventArgs e)
        {
            if (LB_CDs.SelectedItem != null)
            {
                action = ActionSelectionnee.Modifier;
                AfficherMasquerChamps(true);

                CDAudio itemSelectionne = (CDAudio)LB_CDs.SelectedItem;
                CDAudio cd = new CDAudio(itemSelectionne.GetCode());

                TXT_Album.Text       = cd.GetNom();
                TXT_Artiste.Text     = cd.GetArtiste();
                TXT_AnneeSortie.Text = cd.GetAnneeSortie().ToString();

                TXT_Album.Focus();
            }
        }
コード例 #11
0
        // Bouton Modifier
        private void BTN_Modifier_Click(object sender, EventArgs e)
        {
            if (LB_Livres.SelectedItem != null)
            {
                action = ActionSelectionnee.Modifier;
                AfficherMasquerChamps(true);

                Livre itemSelectionne = (Livre)LB_Livres.SelectedItem;
                Livre cd = new Livre(itemSelectionne.GetCode());

                TXT_Nom.Text     = cd.GetNom();
                TXT_Auteur.Text  = cd.GetAuteur();
                TXT_NbPages.Text = cd.GetNombrePages().ToString();

                TXT_Nom.Focus();
            }
        }
コード例 #12
0
        // Bouton Modifier
        private void BTN_Modifier_Click(object sender, EventArgs e)
        {
            if (LB_CDs.SelectedItem != null)
            {
                action = ActionSelectionnee.Modifier;
                AfficherMasquerChamps(true);

                CDAudio itemSelectionne = (CDAudio)LB_CDs.SelectedItem;
                CDAudio cd = new CDAudio(itemSelectionne.GetCode());

                TXT_Album.Text = cd.GetNom();
                TXT_Artiste.Text = cd.GetArtiste();
                TXT_AnneeSortie.Text = cd.GetAnneeSortie().ToString();

                TXT_Album.Focus();
            }
        }