예제 #1
0
        private void Insert_Click(object sender, EventArgs e)
        {
            if (condition())
            {
                Clubs club = new Clubs();
                club.setNom(comboBox1.Text);

                Evenements Event = new Evenements();
                Event.setTitre(textBox1.Text);
                Event.setLienSite(textBox2.Text);
                Event.setMoment(dateTimePicker1.Value);
                Event.setClub(club);
                Event.setType(comboBox2.Text);
                Event.setVille(textBox7.Text);
                Event.setCPT(Int32.Parse(textBox4.Text));
                Event.setAdresse(textBox3.Text);
                ModeleBDD con = new ModeleBDD();
                con.setEvent(Event);

                textBox1.Text         = "";
                textBox2.Text         = "";
                textBox3.Text         = "";
                textBox4.Text         = "";
                dateTimePicker1.Value = DateTime.Now;
                textBox7.Text         = "";
                comboBox1.Text        = "";
                comboBox2.Text        = "";


                dataGridView1.ClearSelection();
                FillDataGridView();
            }
            else
            {
                MessageBox.Show("Veuillez remplir tout les champs");
            }
        }
예제 #2
0
 public Clubs setClub(Clubs club)
 {
     this.leClub = club;
     return(leClub);
 }
예제 #3
0
 public Clubs setClub(Clubs leclub)
 {
     this.club = leclub;
     return(leclub);
 }