private void button1_Click(object sender, EventArgs e) { //int OR_ID = Convert.ToInt32(textBox1.Text); Reporting.طباعه_فاتوره_فورم reform = new Reporting.طباعه_فاتوره_فورم(); Reporting.طباعه_فاوره report = new Reporting.طباعه_فاوره(); report.SetDataSource(or.Get_order_detials_for_print(Properties.Settings.Default.Order_ID)); reform.crystalReportViewer1.ReportSource = report; reform.ShowDialog(); }
private void button3_Click(object sender, EventArgs e) { try { Reporting.طباعه_فاتوره_فورم reform = new Reporting.طباعه_فاتوره_فورم(); Reporting.طباعه_فاوره report = new Reporting.طباعه_فاوره(); report.SetDataSource(or.Get_order_detials_for_print(Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value))); reform.crystalReportViewer1.ReportSource = report; reform.ShowDialog(); }catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void button3_Click(object sender, EventArgs e) { if (textBox1.Text != string.Empty) { int OR_ID = Convert.ToInt32(textBox1.Text); Reporting.طباعه_فاتوره_فورم reform = new Reporting.طباعه_فاتوره_فورم(); Reporting.طباعه_فاوره report = new Reporting.طباعه_فاوره(); report.SetDataSource(ord.Get_order_detials_for_print(OR_ID)); reform.crystalReportViewer1.ReportSource = report; reform.ShowDialog(); } else { MessageBox.Show("حقل رقم الفاتور فارغ"); } }