示例#1
0
        /// <summary>
        /// Aux moment de la chargement de la page
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void interfaceAdherent_Load(object sender, EventArgs e)
        {
            DBConnectTest db = new DBConnectTest();

            bb = db.Read();
            foreach (Adherent unAdherent in bb)
            {
                ListeAD.Items.Add(unAdherent.GetNom());
            }

            ConfirmeAD.Hide();
        }
示例#2
0
        /// <summary>
        /// envoie les champs modifier dans la base de donnée
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ConfirmeAD_Click(object sender, EventArgs e)
        {
            DBConnectTest db           = new DBConnectTest();
            string        upNom        = textNomAD.Text;
            string        upPrenom     = textPrenomAD.Text;
            DateTime      upDate       = dateTimePicker1.Value;
            string        upSexe       = textSexeAD.Text;
            string        upVille      = textVilleAD.Text;
            string        upAdresse    = textAdresseAD.Text;
            int           upNumLicence = Convert.ToInt32(textNumLicence.Text);
            int           upCP         = Convert.ToInt32(textCPAD.Text);
            int           upCotisation = Convert.ToInt32(textCotisationAD.Text);

            db.UpdateAD(upNom, upPrenom, upVille, upAdresse, upSexe, upCP, upCotisation, upDate, upNumLicence, ID);
            actuAD();

            textBoxClearAD();
            ConfirmeAD.Hide();
            ModifierAD.Show();
            ID = 0;
        }