Ejemplo n.º 1
0
        private void ConfirmAjoutEvent_VisibleChanged(object sender, EventArgs e)
        {
            if (idAdh != 0)
            {
                panelConfirmAjoutAdh.Visible = true;
                panelConfirmAjoutNA.Visible  = false;
                BDD       UnEvent   = new BDD();
                Evenement ThisEvent = UnEvent.ReadEvent(idEvent);
                Adherent  LAdherent = UnEvent.ReadAdherent(idAdh);

                labelNomEventConfirm.Text       = ThisEvent.nomEvent;
                labelDateDebutEventConfirm.Text = ThisEvent.dateDebutEvent.ToString();
                labelDateFinConfirm.Text        = ThisEvent.dateFinEvent.ToString();
                labelNomAdhConfirm.Text         = LAdherent.nomAdh;
                labelLicenceConfirm.Text        = LAdherent.numLicence;
            }
            else if (idAdh == 0)
            {
                panelConfirmAjoutAdh.Visible = false;
                panelConfirmAjoutNA.Visible  = true;
                BDD       UnEvent   = new BDD();
                Evenement ThisEvent = UnEvent.ReadEvent(idEvent);
                labelIdEventNA.Text  = ThisEvent.id.ToString();
                labelNomEventNA.Text = ThisEvent.nomEvent;

                labelNomNAEvent.Text    = nomNA;
                labelPrenomNAEvent.Text = prenomNA;
                labelTelNAEvent.Text    = telNA;
            }
        }
Ejemplo n.º 2
0
        private void dataGridViewListAdherents_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            var LaCellule = dataGridViewListAdherents.Rows[e.RowIndex].Cells[0].Value.ToString();

            panelListAdherents.Visible = false;
            PanelModifAdherent.Visible = true;
            labelIdAdhModif.Text       = LaCellule;
            BDD      UnAdherent   = new BDD();
            Adherent ThisAdherent = UnAdherent.ReadAdherent(int.Parse(LaCellule));
            Club     clubDeLAdh   = UnAdherent.ReadClub(ThisAdherent.id_club);

            labelNomClubAdhModif.Text             = clubDeLAdh.nomClub;
            labelIdAdhModif.Text                  = ThisAdherent.id.ToString();
            textBoxNomAdhModif.Text               = ThisAdherent.nomAdh;
            textBoxPrenomAdhModif.Text            = ThisAdherent.prenomAdh;
            textBoxSexeAdhModif.Text              = ThisAdherent.sexe;
            dateTimePickerNaissanceAdhModif.Value = ThisAdherent.naissance;
            textBoxLicenceAdhModif.Text           = ThisAdherent.numLicence;
            textBoxAdresseAdhModif.Text           = ThisAdherent.adresseAdh;
            textBoxCPAdhModif.Text                = ThisAdherent.CPAdh.ToString();
            textBoxVilleAdhModif.Text             = ThisAdherent.villeAdh;
            textBoxCotisationAdhModif.Text        = ThisAdherent.cotisation.ToString();

            labelIdClubAdh.Text = ThisAdherent.id_club.ToString();
        }