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; } }
private void rdBtnToday_CheckedChanged(object sender, EventArgs e) { if ((sender as RadioButton).Checked == true) { kindOfTime = (ReportForm.Time)(sender as RadioButton).Tag; createReport(kindOfTime, kindOfReportName); loadInfo(report); } }
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; }
private void btnOptionalTimeApply_Click(object sender, EventArgs e) { if (dateTimePickerStart.Value > dateTimePickerEnd.Value) { CustomNofication.Form_Alert.Alert("Lỗi chọn thời gian!", CustomNofication.Form_Alert.enmType.Warning); } else { kindOfTime = ReportForm.Time.Optional; createReport(kindOfTime, report.reportTitle.title); loadInfo(report); } }