private void button3_Click(object sender, EventArgs e) { Frm_Listechantier Fgrid = new Frm_Listechantier(); Fgrid.dgv1.Rows.Add(textBox1.Text, textBox2.Text, textBox5.Text, textBox6.Text, comboBox1.Text, dateTimePicker1.Text, dateTimePicker2.Text, textBox3.Text, textBox4.Text, comboBox2.Text, comboBox6.Text, comboBox5.Text, comboBox4.Text); Fgrid.ShowDialog(); foreach (Control c in Controls) { if (c is TextBox || c is DateTimePicker || c is ComboBox) { c.Text = ""; } } /* this.textBox1.Text = ""; * this.textBox1.Clear(); * this.textBox2.Clear(); * this.textBox5.Clear(); * this.textBox6.Clear(); * this.comboBox1.Text = ""; * this.dateTimePicker1.Text = ""; * this.dateTimePicker2.Text = ""; * this.textBox3.Clear(); * this.textBox4.Clear(); * this.comboBox2.Text = ""; * this.comboBox6.Text = ""; * this.comboBox5.Text = ""; * this.comboBox4.Text = ""; * this.comboBox3.Text = ""; * this.textBox7.Clear(); * this.textBox8.Clear(); * this.textBox9.Clear(); * this.textBox10.Clear(); * this.textBox11.Clear(); * this.textBox12.Clear();*/ }
private void interrogationDeLotToolStripMenuItem_Click(object sender, EventArgs e) { Frm_Listechantier s = new Frm_Listechantier(); s.ShowDialog(); }