Esempio n. 1
0
 private void QuickReportShow_Load(object sender, EventArgs e)
 {
     if (DesignMode)
     {
         return;
     }
     try
     {
         LoadReports(ReportIDs.Split(','));
     }
     catch (Exception excp)
     {
         MessageBox.Show("报表加载失败。\n原因:" + excp.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Esempio n. 2
0
        //Generate the preport requested and return a string taht is the report.
        private string CreateReport(ReportIDs reportid)
        {
            switch (reportid)
            {
            case ReportIDs.SalesByWeek:
                return(SalesByWeek());

            case ReportIDs.SalesByMonth:
                return(SalesByMonth());

            case ReportIDs.SalesByDay:
                return(SalesByDay());

            default:
                return("Report requested is undefined.");
            }
        }
Esempio n. 3
0
 //Public method to access the creation of the requested report
 public string GenerateReport(ReportIDs reportidrequested)
 {
     return(CreateReport(reportidrequested));
 }
Esempio n. 4
0
 //return the name of the report at the given ID
 public string ReportName(ReportIDs idrequested)
 {
     return(ReportNames[(int)idrequested]);
 }