예제 #1
0
        private void BtnCreerAtelierEnregistrer_Click(object sender, EventArgs e)
        {
            Collection <String> VacationsDebut = new Collection <String>();
            Collection <String> VacationsFin   = new Collection <String>();
            Collection <String> Themes         = new Collection <String>();

            VacationsDebut.Add(DateCreerAtelierCreerVacationHeureDebut1.Text);
            VacationsFin.Add(DateCreerAtelierCreerVacationHeureFin1.Text);

            if (PanelCreerAtelierCreerVacation2.Enabled)
            {
                VacationsDebut.Add(DateCreerAtelierCreerVacationHeureDebut2.Text);
                VacationsFin.Add(DateCreerAtelierCreerVacationHeureFin2.Text);
            }
            if (PanelCreerAtelierCreerVacation3.Enabled)
            {
                VacationsDebut.Add(DateCreerAtelierCreerVacationHeureDebut3.Text);
                VacationsFin.Add(DateCreerAtelierCreerVacationHeureFin3.Text);
            }
            if (PanelCreerAtelierCreerVacation4.Enabled)
            {
                VacationsDebut.Add(DateCreerAtelierCreerVacationHeureDebut4.Text);
                VacationsFin.Add(DateCreerAtelierCreerVacationHeureFin4.Text);
            }
            if (PanelCreerAtelierCreerVacation5.Enabled)
            {
                VacationsDebut.Add(DateCreerAtelierCreerVacationHeureDebut5.Text);
                VacationsFin.Add(DateCreerAtelierCreerVacationHeureFin5.Text);
            }

            foreach (ListViewItem UnTheme in ListeCreerAtelierCreerTheme.Items)
            {
                Themes.Add(UnTheme.Text);
            }

            UneConnexion.AjoutAtelier(TxtCreerAtelierNom.Text, Convert.ToInt32(NumCreerAtelierNbPlaces.Text), Themes, VacationsDebut, VacationsFin);
        }