Exemplo n.º 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;
        }
Exemplo n.º 2
0
        /// <summary>
        /// methode qui permet d'effectué suite a l'évenement click
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ModifierCB_Click(object sender, EventArgs e)
        {
            int x = listClub.SelectedIndex;

            DBConnectTest db = new DBConnectTest();

            textNomCB.Text       = CB[x].GetNom();
            textAdresseCB.Text   = CB[x].GetAdresse();
            textLieuCB.Text      = CB[x].GetLieu();
            textCpCB.Text        = Convert.ToString(CB[x].GetCP());
            textTelephoneCB.Text = Convert.ToString(CB[x].GetTelephone());
            textEmailCB.Text     = CB[x].GetEmail();
            textVilleCB.Text     = CB[x].GetVille();
            textSiteCB.Text      = CB[x].GetSiteWeb();

            ID = CB[x].GetID();

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