Пример #1
0
 private void button4_Click(object sender, EventArgs e)
 {
     try
     {
         Form4 salesreport = new Form4();
        salesreport.textBox1.Text = this.comboBox2.Text;
        salesreport.textBox2.Text = this.comboBox1.Text;
        salesreport.textBox3.Text = this.textBox10.Text;
        salesreport.textBox4.Text = this.textBox4.Text;
        salesreport.textBox5.Text = this.dateTimePicker2.Value.ToShortDateString();
        salesreport.textBox6.Text = this.textBox3.Text;
        salesreport.textBox7.Text = this.textBox2.Text;
        salesreport.textBox8.Text = this.textBox1.Text;
        salesreport.Show();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Пример #2
0
 private void button4_Click(object sender, EventArgs e)
 {
     try
     {
         if (comboBox1.Text == "")
         {
             MessageBox.Show("Select Customer Name Before Printing Report");
         }
         else
         {
             Form4 salesrepor = new Form4();
             salesrepor.textBox1.Text = this.textBox1.Text;
             salesrepor.textBox2.Text = this.comboBox1.Text;
             salesrepor.textBox3.Text = this.textBox13.Text;
             salesrepor.textBox4.Text = this.textBox14.Text;
             salesrepor.textBox5.Text = this.dateTimePicker1.Value.ToShortDateString();
             salesrepor.textBox6.Text = this.textBox7.Text;
             salesrepor.textBox7.Text = this.textBox8.Text;
             salesrepor.textBox8.Text = this.textBox9.Text;
             salesrepor.Show();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }