Пример #1
0
        //foreach fco in fco table, create weekly report and copy to report folder
        public async Task GenerateWeeklyReport()
        {
            if (!FCOPath.TestRootDir())
            {
                LogHelper.Instance.Error("Fail to generate weekly report.");
                return;
            }

            foreach (string fco in FCOList)
            {
                FCOPath      fcoPath      = new FCOPath(fco, DateTime.Now);
                WeeklyReport weeklyReport = new WeeklyReport(fco, DateTime.Now);
                weeklyReport.GenerateReportTo(fcoPath.GetReportFilePath((int)Constants.REPORTTYPE.WEEKLY));
                LogHelper.Instance.Info(string.Format("Generate weekly report for FCO {0}.", fco));
            }
        }
Пример #2
0
        //Create new daily report and copy to report folder despite of the fco number, archive to archive folder
        public async Task GenerateDailyReport()
        {
            if (!FCOPath.TestRootDir())
            {
                return;
            }


            FCOPath fcoPath = new FCOPath(DateTime.Now);
            //DailyReport dailyReport = new DailyReport(fco, DateTime.Now);
            DailyReport dailyReport = new DailyReport(DateTime.Now);

            if (Directory.Exists(fcoPath.GetUpgradeCodeDir()))
            {
                dailyReport.Import(fcoPath.GetUpgradeCodeDir());
                dailyReport.GenerateReportTo(fcoPath.GetReportFilePath((int)Constants.REPORTTYPE.DAILY));
            }
        }