コード例 #1
0
        /// <summary>
        /// methode qui permet d'effectué suite a l'evenement click
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ConfirmerCB_Click(object sender, EventArgs e)
        {
            DBConnectTest db = new DBConnectTest();

            string UPNom        = textNomCB.Text;
            string UPAdresse    = textAdresseCB.Text;
            string UPLieu       = textLieuCB.Text;
            int    UPcp         = Convert.ToInt32(textCpCB.Text);
            int    UPtelephones = Convert.ToInt32(textTelephoneCB.Text);
            string UPemail      = textEmailCB.Text;
            string UPville      = textVilleCB.Text;
            string UPsite       = textSiteCB.Text;

            db.UpdateCB(UPNom, UPAdresse, UPville, UPAdresse, UPLieu, UPsite, UPcp, UPtelephones, ID);

            listClub.Items.Clear();
            actuCB();

            ConfirmerCB.Hide();
            ModifierCB.Show();
            supprimerCB.Show();
            AjoutClub.Show();

            textBoxClear();
            ID = 0;
        }
コード例 #2
0
        /// <summary>
        /// active aux moment de charger les fenetres
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void interfaceClub_Load(object sender, EventArgs e)
        {
            DBConnectTest db = new DBConnectTest();

            CB = db.ReadClub();
            foreach (club unclub in CB)
            {
                listClub.Items.Add(unclub.GetNom());
            }
            ConfirmerCB.Hide();
        }