Exemple #1
0
 private void salesReportToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         BusinessManager BM     = new BusinessManager();
         rptSalesReport  report = new rptSalesReport();
         report.SetDataSource(BM.BALSalesReport());
         frmSalesReport rpt = new frmSalesReport();
         rpt.crystalReportViewer1.ReportSource = report;
         rpt.Visible = true;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemple #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         Cursor         = Cursors.WaitCursor;
         timer1.Enabled = true;
         BusinessManager BM     = new BusinessManager();
         rptSalesReport  report = new rptSalesReport();
         report.SetDataSource(BM.BALSalesReport());
         frmSalesReport rpt = new frmSalesReport();
         rpt.crystalReportViewer1.ReportSource = report;
         rpt.Visible = true;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }