Beispiel #1
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();
        }
Beispiel #2
0
        private void AjoutParticipants_Load(object sender, EventArgs e)
        {
            if (FromWhere == "FromModifEvent")
            {
                panelListeParticipants.Visible            = false;
                panelChooseAdhToEvent.Visible             = false;
                panelAjoutNAToEvent.Visible               = false;
                panelAddParticipantFromModifEvent.Visible = true;
                BDD       UnEvent   = new BDD();
                Evenement ThisEvent = UnEvent.ReadEvent(idEvent);
                Club      leClub    = UnEvent.ReadClub(idClub);
                labelTypeEventAddPart.Text = ThisEvent.typeEvent;

                labelIdChooseEvent.Text = ThisEvent.id.ToString();

                labelNomClubEventAddPart.Text   = leClub.nomClub;
                labelDateDebutEventAddPart.Text = ThisEvent.dateDebutEvent.ToString();
                labelDateFinEventAddPart.Text   = ThisEvent.dateFinEvent.ToString();
                labelAdresseEventAddPart.Text   = ThisEvent.adresseEvent;
                labelCPEventAddPart.Text        = ThisEvent.CPEvent.ToString();
                labelVilleEventAddPart.Text     = ThisEvent.villeEvent;
                labelURLEventAddPart.Text       = ThisEvent.siteEvent;
                labelAddPartNomEvent.Text       = ThisEvent.nomEvent;
                labelNbPartEventAddPart.Text    = ThisEvent.nbParticipants.ToString();
            }
            else if (FromWhere == "ListeParticipants")
            {
                panelAddParticipantFromModifEvent.Visible = false;
                panelChooseAdhToEvent.Visible             = false;
                panelListeParticipants.Visible            = true;
                dataGridViewListeParticipants.Rows.Clear();
                BDD                liste            = new BDD();
                Inscrit            lInscrit         = new Inscrit("", "");
                int                nb               = 1;
                List <Adherent>    ListeAdherent    = liste.SelectAllEventAdherent(idEvent, idClub);
                List <NonAdherent> ListeNonAdherent = liste.SelectAllEventNonAdherent(idEvent);
                List <Inscrit>     lesInscrits      = lInscrit.genererListe(ListeAdherent, ListeNonAdherent);

                dataGridViewListeParticipants.ColumnCount     = 3;
                dataGridViewListeParticipants.Columns[0].Name = "inscrit n°";
                dataGridViewListeParticipants.Columns[1].Name = "Nom";
                dataGridViewListeParticipants.Columns[2].Name = "Prénom";


                foreach (Inscrit unInscrit in lesInscrits)
                {
                    dataGridViewListeParticipants.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.None;
                    dataGridViewListeParticipants.Rows.Add(nb, unInscrit.nom, unInscrit.prenom);
                    nb++;
                }
            }
        }
Beispiel #3
0
        private void listClubs_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            var nb = listClubs.Rows[e.RowIndex].Cells[0].Value.ToString();

            panel1.Visible             = false;
            panelListAdherents.Visible = false;
            panel2.Visible             = true;
            idClub.Text = nb;
            BDD  club1  = new BDD();
            Club leClub = club1.ReadClub(int.Parse(nb));

            pageClub.Text                = leClub.nomClub;
            textBoxModifNameClub.Text    = leClub.nomClub;
            textBoxModifAdresseClub.Text = leClub.adresseClub;
            textBoxModifCPClub.Text      = leClub.CPClub.ToString();
            textBoxModifVilleClub.Text   = leClub.villeClub;
            textBoxModifTelClub.Text     = leClub.telephone;
            textBoxModifMailClub.Text    = leClub.mail;
            textBoxModifURLClub.Text     = leClub.siteClub;
        }
Beispiel #4
0
        private void dataGridViewListEvent_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            var LaCellule = dataGridViewListEvent.Rows[e.RowIndex].Cells[0].Value.ToString();

            panelConsultEvent.Visible = false;
            panelModifEvent.Visible   = true;
            BDD       UnEvent      = new BDD();
            Evenement ThisEvent    = UnEvent.ReadEvent(int.Parse(LaCellule));
            Club      clubDeLEvent = UnEvent.ReadClub(ThisEvent.id_club);

            labelShowIdEvent.Text                   = ThisEvent.id.ToString();
            labelNomDuClubModifEvent.Text           = clubDeLEvent.nomClub;
            labelNbParticpant.Text                  = ThisEvent.nbParticipants.ToString();
            textBoxModifNomEvent.Text               = ThisEvent.nomEvent;
            textBoxModifAdresseEvent.Text           = ThisEvent.adresseEvent;
            textBoxModifCPEvent.Text                = ThisEvent.CPEvent.ToString();
            textBoxModifVilleEvent.Text             = ThisEvent.villeEvent;
            textBoxModifTypeEvent.Text              = ThisEvent.typeEvent;
            textBoxModifSiteEvent.Text              = ThisEvent.siteEvent;
            dateTimePickerModifDateDebutEvent.Value = ThisEvent.dateDebutEvent;
            dateTimePickerModifDateFinEvent.Value   = ThisEvent.dateFinEvent;
            labelIdClubEvent.Text                   = ThisEvent.id_club.ToString();
        }