예제 #1
0
        private void btnShowReport_Click(object sender, EventArgs e)
        {
            try
            {
                FinancialDailyRPT rpt = new FinancialDailyRPT();


                DateTime from    = cmbDate.DateTime;
                var      summary = db.FinancialSummary(from);

                if (summary.Any())
                {
                    rpt.bindingSource1.DataSource = summary.ToList();
                    rpt.parameterFrom.Value       = cmbDate.DateTime;
                    try
                    {
                        ReportPrintTool tool = new ReportPrintTool(rpt);
                        tool.ShowPreview();
                    }
                    catch (Exception ex)
                    {
                        ModuleClass.ShowExceptionMessage(this, ex, "خطأ", null);
                    }
                }
            }
            catch (Exception ex)
            {
                ModuleClass.ShowExceptionMessage(this, ex, "خطأ", null);
            }
        }