private void createReport(ReportForm.Time kindOfTime, string kindOfReportName) { switch (kindOfReportName) { case "Chi tiết doanh thu": report = new RevenueDetail(kindOfTime, pnlOptionalTime, crystalReportViewer); break; case "Doanh thu theo nhân viên": report = new RevenueByStaff(kindOfTime, pnlOptionalTime, crystalReportViewer); break; case "Doanh thu theo khách hàng": report = new RevenueByCustomer(kindOfTime, pnlOptionalTime, crystalReportViewer); break; case "Hàng hóa bán ra": report = new FoodSelling(kindOfTime, pnlOptionalTime, crystalReportViewer); break; case "Hàng bán theo nhân viên": report = new FoodByStaff(kindOfTime, pnlOptionalTime, crystalReportViewer); break; case "Hàng bán theo khách hàng": report = new FoodByCustomer(kindOfTime, pnlOptionalTime, crystalReportViewer); break; default: break; } }
public BaoCao() { InitializeComponent(); kindOfTime = ReportForm.Time.ThisMonth; report = new BUS.Report.RevenueDetail(kindOfTime, pnlOptionalTime, crystalReportViewer); kindOfReportName = report.reportTitle.title; loadInfo(report); rdBtnThisMonth.Checked = true; rdBtnRevenueDetail.Checked = true; }