private void button1_Click(object sender, EventArgs e)//OK { HowMany = Int32.Parse(textBox1.Text); Form_AddImplementation form = new Form_AddImplementation(); form.GetCopiesMethod(); this.Close(); }
public void GetCopiesMethod() { int howManyCopies = Form_HowManyFromCopiesPrompt.HowMany; for (int i = 0; i < howManyCopies; i++) { Form_AddImplementation form1 = new Form_AddImplementation(); form1.Show(); form1.Focus(); //unhide the controls and put FileConsultantRequestForm.docx data on the controls of this form form1.Activate(); form1.label12.Visible = false; form1.label1.Show(); form1.label2.Show(); form1.label3.Show(); form1.label4.Show(); form1.label5.Show(); form1.label6.Show(); form1.label7.Show(); form1.label8.Show(); form1.label9.Show(); form1.label10.Show(); form1.label11.Show(); form1.label13.Show(); form1.textBox1.Show(); form1.textBox2.Show(); form1.textBox3.Show(); form1.textBox4.Show(); form1.textBox5.Show(); form1.textBox6.Show(); form1.textBox7.Show(); form1.textBox8.Show(); form1.textBox9.Show(); form1.textBox10.Show(); form1.textBox11.Show(); form1.dataGridView1.Show(); form1.dataGridView2.Show(); form1.button1.Show(); form1.button2.Visible = false; form1.button3.Visible = false; form1.button4.Show(); form1.button5.Show(); //set the tab order for all textboxes on this form form1.textBox1.TabIndex = 0; form1.textBox2.TabIndex = 1; form1.textBox3.TabIndex = 2; form1.textBox4.TabIndex = 3; form1.textBox5.TabIndex = 4; form1.textBox6.TabIndex = 5; form1.textBox7.TabIndex = 6; form1.textBox8.TabIndex = 7; form1.textBox9.TabIndex = 8; form1.textBox10.TabIndex = 9; //import the data from one form to the other form1.textBox1.Text = this.textBox1.Text; form1.textBox2.Text = this.textBox2.Text; form1.textBox3.Text = this.textBox3.Text; form1.textBox4.Text = this.textBox4.Text; form1.textBox5.Text = this.textBox5.Text; form1.textBox6.Text = this.textBox6.Text; form1.textBox7.Text = this.textBox7.Text; form1.textBox8.Text = this.textBox8.Text; form1.textBox9.Text = this.textBox9.Text; form1.textBox10.Text = this.textBox10.Text; form1.textBox11.Text = this.textBox11.Text; try { form1.dataGridView1[0, 0].Value = this.dataGridView1[0, 0].Value; form1.dataGridView1[1, 0].Value = this.dataGridView1[1, 0].Value; form1.dataGridView1[2, 0].Value = this.dataGridView1[2, 0].Value; form1.dataGridView1[3, 0].Value = this.dataGridView1[3, 0].Value; //form1.dataGridView1[0, 1].Value = this.dataGridView1[0, 1].Value; //form1.dataGridView1[1, 1].Value = this.dataGridView1[1, 1].Value; //form1.dataGridView1[2, 1].Value = this.dataGridView1[2, 1].Value; //form1.dataGridView1[3, 1].Value = this.dataGridView1[3, 1].Value; //form1.dataGridView1[0, 2].Value = this.dataGridView1[0, 2].Value; //form1.dataGridView1[1, 2].Value = this.dataGridView1[1, 2].Value; //form1.dataGridView1[2, 2].Value = this.dataGridView1[2, 2].Value; //form1.dataGridView1[3, 2].Value = this.dataGridView1[3, 2].Value; //form1.dataGridView1[0, 3].Value = this.dataGridView1[0, 3].Value; //form1.dataGridView1[1, 3].Value = this.dataGridView1[1, 3].Value; //form1.dataGridView1[2, 3].Value = this.dataGridView1[2, 3].Value; //form1.dataGridView1[3, 3].Value = this.dataGridView1[3, 3].Value; form1.dataGridView2[0, 0].Value = this.dataGridView2[0, 0].Value; form1.dataGridView2[1, 0].Value = this.dataGridView2[1, 0].Value; form1.dataGridView2[2, 0].Value = this.dataGridView2[2, 0].Value; form1.dataGridView2[3, 0].Value = this.dataGridView2[3, 0].Value; //form1.dataGridView2[0, 1].Value = this.dataGridView2[0, 1].Value; //form1.dataGridView2[1, 1].Value = this.dataGridView2[1, 1].Value; //form1.dataGridView2[2, 1].Value = this.dataGridView2[2, 1].Value; //form1.dataGridView2[3, 1].Value = this.dataGridView2[3, 1].Value; //form1.dataGridView2[0, 2].Value = this.dataGridView2[0, 2].Value; //form1.dataGridView2[1, 2].Value = this.dataGridView2[1, 2].Value; //form1.dataGridView2[2, 2].Value = this.dataGridView2[2, 2].Value; //form1.dataGridView2[3, 2].Value = this.dataGridView2[3, 2].Value; //form1.dataGridView2[0, 3].Value = this.dataGridView2[0, 3].Value; //form1.dataGridView2[1, 3].Value = this.dataGridView2[1, 3].Value; //form1.dataGridView2[2, 3].Value = this.dataGridView2[2, 3].Value; //form1.dataGridView2[3, 3].Value = this.dataGridView2[3, 3].Value; ////datagridview1 //if (dataGridView1.Rows.Count == 2) //{ // form1.dataGridView1[0, 1].Value = this.dataGridView1[0, 1].Value; // form1.dataGridView1[1, 1].Value = this.dataGridView1[1, 1].Value; // form1.dataGridView1[2, 1].Value = this.dataGridView1[2, 1].Value; // form1.dataGridView1[3, 1].Value = this.dataGridView1[3, 1].Value; //} //else if (dataGridView1.Rows.Count == 3) //{ // form1.dataGridView1[0, 2].Value = this.dataGridView1[0, 2].Value; // form1.dataGridView1[1, 2].Value = this.dataGridView1[1, 2].Value; // form1.dataGridView1[2, 2].Value = this.dataGridView1[2, 2].Value; // form1.dataGridView1[3, 2].Value = this.dataGridView1[3, 2].Value; //} //else if (dataGridView1.Rows.Count == 4) //{ // form1.dataGridView1[0, 3].Value = this.dataGridView1[0, 3].Value; // form1.dataGridView1[1, 3].Value = this.dataGridView1[1, 3].Value; // form1.dataGridView1[2, 3].Value = this.dataGridView1[2, 3].Value; // form1.dataGridView1[3, 3].Value = this.dataGridView1[3, 3].Value; //} ////datagridview2 //if (dataGridView2.Rows.Count == 2) //{ // form1.dataGridView2[0, 1].Value = this.dataGridView2[0, 1].Value; // form1.dataGridView2[1, 1].Value = this.dataGridView2[1, 1].Value; // form1.dataGridView2[2, 1].Value = this.dataGridView2[2, 1].Value; // form1.dataGridView2[3, 1].Value = this.dataGridView2[3, 1].Value; //} //else if (dataGridView2.Rows.Count == 3) //{ // form1.dataGridView2[0, 2].Value = this.dataGridView2[0, 2].Value; // form1.dataGridView2[1, 2].Value = this.dataGridView2[1, 2].Value; // form1.dataGridView2[2, 2].Value = this.dataGridView2[2, 2].Value; // form1.dataGridView2[3, 2].Value = this.dataGridView2[3, 2].Value; //} //else if (dataGridView2.Rows.Count == 4) //{ // form1.dataGridView2[0, 3].Value = this.dataGridView2[0, 3].Value; // form1.dataGridView2[1, 3].Value = this.dataGridView2[1, 3].Value; // form1.dataGridView2[2, 3].Value = this.dataGridView2[2, 3].Value; // form1.dataGridView2[3, 3].Value = this.dataGridView2[3, 3].Value; //} } catch { } } }
private void button4_Click(object sender, EventArgs e)//Create Copy { Form_AddImplementation form1 = new Form_AddImplementation(); form1.Show(); form1.Focus(); //unhide the controls and put FileConsultantRequestForm.docx data on the controls of this form form1.Activate(); form1.label12.Visible = false; form1.label1.Show(); form1.label2.Show(); form1.label3.Show(); form1.label4.Show(); form1.label5.Show(); form1.label6.Show(); form1.label7.Show(); form1.label8.Show(); form1.label9.Show(); form1.label10.Show(); form1.label11.Show(); form1.label13.Show(); form1.textBox1.Show(); form1.textBox2.Show(); form1.textBox3.Show(); form1.textBox4.Show(); form1.textBox5.Show(); form1.textBox6.Show(); form1.textBox7.Show(); form1.textBox8.Show(); form1.textBox9.Show(); form1.textBox10.Show(); form1.textBox11.Show(); form1.dataGridView1.Show(); form1.dataGridView2.Show(); form1.button1.Show(); form1.button2.Visible = false; form1.button3.Visible = false; form1.button4.Show(); form1.button5.Show(); //set the tab order for all textboxes on this form form1.textBox1.TabIndex = 0; form1.textBox2.TabIndex = 1; form1.textBox3.TabIndex = 2; form1.textBox4.TabIndex = 3; form1.textBox5.TabIndex = 4; form1.textBox6.TabIndex = 5; form1.textBox7.TabIndex = 6; form1.textBox8.TabIndex = 7; form1.textBox9.TabIndex = 8; form1.textBox10.TabIndex = 9; //import the data from one form to the other form1.textBox1.Text = this.textBox1.Text; form1.textBox2.Text = this.textBox2.Text; form1.textBox3.Text = this.textBox3.Text; form1.textBox4.Text = this.textBox4.Text; form1.textBox5.Text = this.textBox5.Text; form1.textBox6.Text = this.textBox6.Text; form1.textBox7.Text = this.textBox7.Text; form1.textBox8.Text = this.textBox8.Text; form1.textBox9.Text = this.textBox9.Text; form1.textBox10.Text = this.textBox10.Text; form1.textBox11.Text = this.textBox11.Text; //System.Data.DataTable dtForDataGridView1 = new System.Data.DataTable(); //dtForDataGridView1. //this.dataGridView1 //try //{ // for (int j = 0; j <= this.dataGridView1.ColumnCount; j++) // { // //form1.dataGridView1.Rows.Add(); // //this.dataGridView1.Rows.Add(); // for (int i = 0; i <= this.dataGridView1.Rows.Count; i++) // { // form1.dataGridView1[j, i].Value = this.dataGridView1[j, i].Value; // } // } //} //catch //{ //} //try //{ // for (int j = 0; j <= this.dataGridView2.ColumnCount; j++) // { // //form1.dataGridView1.Rows.Add(); // //this.dataGridView1.Rows.Add(); // for (int i = 0; i <= this.dataGridView2.Rows.Count; i++) // { // form1.dataGridView2[j, i].Value = this.dataGridView2[j, i].Value; // } // } //} //catch //{ //} try { form1.dataGridView1[0, 0].Value = this.dataGridView1[0, 0].Value; form1.dataGridView1[1, 0].Value = this.dataGridView1[1, 0].Value; form1.dataGridView1[2, 0].Value = this.dataGridView1[2, 0].Value; form1.dataGridView1[3, 0].Value = this.dataGridView1[3, 0].Value; //form1.dataGridView1[0, 1].Value = this.dataGridView1[0, 1].Value; //form1.dataGridView1[1, 1].Value = this.dataGridView1[1, 1].Value; //form1.dataGridView1[2, 1].Value = this.dataGridView1[2, 1].Value; //form1.dataGridView1[3, 1].Value = this.dataGridView1[3, 1].Value; //form1.dataGridView1[0, 2].Value = this.dataGridView1[0, 2].Value; //form1.dataGridView1[1, 2].Value = this.dataGridView1[1, 2].Value; //form1.dataGridView1[2, 2].Value = this.dataGridView1[2, 2].Value; //form1.dataGridView1[3, 2].Value = this.dataGridView1[3, 2].Value; //form1.dataGridView1[0, 3].Value = this.dataGridView1[0, 3].Value; //form1.dataGridView1[1, 3].Value = this.dataGridView1[1, 3].Value; //form1.dataGridView1[2, 3].Value = this.dataGridView1[2, 3].Value; //form1.dataGridView1[3, 3].Value = this.dataGridView1[3, 3].Value; form1.dataGridView2[0, 0].Value = this.dataGridView2[0, 0].Value; form1.dataGridView2[1, 0].Value = this.dataGridView2[1, 0].Value; form1.dataGridView2[2, 0].Value = this.dataGridView2[2, 0].Value; form1.dataGridView2[3, 0].Value = this.dataGridView2[3, 0].Value; //form1.dataGridView2[0, 1].Value = this.dataGridView2[0, 1].Value; //form1.dataGridView2[1, 1].Value = this.dataGridView2[1, 1].Value; //form1.dataGridView2[2, 1].Value = this.dataGridView2[2, 1].Value; //form1.dataGridView2[3, 1].Value = this.dataGridView2[3, 1].Value; //form1.dataGridView2[0, 2].Value = this.dataGridView2[0, 2].Value; //form1.dataGridView2[1, 2].Value = this.dataGridView2[1, 2].Value; //form1.dataGridView2[2, 2].Value = this.dataGridView2[2, 2].Value; //form1.dataGridView2[3, 2].Value = this.dataGridView2[3, 2].Value; //form1.dataGridView2[0, 3].Value = this.dataGridView2[0, 3].Value; //form1.dataGridView2[1, 3].Value = this.dataGridView2[1, 3].Value; //form1.dataGridView2[2, 3].Value = this.dataGridView2[2, 3].Value; //form1.dataGridView2[3, 3].Value = this.dataGridView2[3, 3].Value; ////datagridview1 //if (dataGridView1.Rows.Count == 2) //{ // form1.dataGridView1[0, 1].Value = this.dataGridView1[0, 1].Value; // form1.dataGridView1[1, 1].Value = this.dataGridView1[1, 1].Value; // form1.dataGridView1[2, 1].Value = this.dataGridView1[2, 1].Value; // form1.dataGridView1[3, 1].Value = this.dataGridView1[3, 1].Value; //} //else if (dataGridView1.Rows.Count == 3) //{ // form1.dataGridView1[0, 2].Value = this.dataGridView1[0, 2].Value; // form1.dataGridView1[1, 2].Value = this.dataGridView1[1, 2].Value; // form1.dataGridView1[2, 2].Value = this.dataGridView1[2, 2].Value; // form1.dataGridView1[3, 2].Value = this.dataGridView1[3, 2].Value; //} //else if (dataGridView1.Rows.Count == 4) //{ // form1.dataGridView1[0, 3].Value = this.dataGridView1[0, 3].Value; // form1.dataGridView1[1, 3].Value = this.dataGridView1[1, 3].Value; // form1.dataGridView1[2, 3].Value = this.dataGridView1[2, 3].Value; // form1.dataGridView1[3, 3].Value = this.dataGridView1[3, 3].Value; //} ////datagridview2 //if (dataGridView2.Rows.Count == 2) //{ // form1.dataGridView2[0, 1].Value = this.dataGridView2[0, 1].Value; // form1.dataGridView2[1, 1].Value = this.dataGridView2[1, 1].Value; // form1.dataGridView2[2, 1].Value = this.dataGridView2[2, 1].Value; // form1.dataGridView2[3, 1].Value = this.dataGridView2[3, 1].Value; //} //else if (dataGridView2.Rows.Count == 3) //{ // form1.dataGridView2[0, 2].Value = this.dataGridView2[0, 2].Value; // form1.dataGridView2[1, 2].Value = this.dataGridView2[1, 2].Value; // form1.dataGridView2[2, 2].Value = this.dataGridView2[2, 2].Value; // form1.dataGridView2[3, 2].Value = this.dataGridView2[3, 2].Value; //} //else if (dataGridView2.Rows.Count == 4) //{ // form1.dataGridView2[0, 3].Value = this.dataGridView2[0, 3].Value; // form1.dataGridView2[1, 3].Value = this.dataGridView2[1, 3].Value; // form1.dataGridView2[2, 3].Value = this.dataGridView2[2, 3].Value; // form1.dataGridView2[3, 3].Value = this.dataGridView2[3, 3].Value; //} } catch { } }