コード例 #1
0
        private void GetMonthlyReportData(int year, IList <MonthlyReportData> onlineList, IList <MonthlyReportData> inHouseList)
        {
            var monthlyRunsCount     = _dataSheetService.GetMonthlyRunsCount(year);
            var monthlyConsultations = _dataSheetService.GetMonthlyConsultationReport(year);
            var monthlyNewUsers      = _dataSheetService.GetMonthlyNewUserReport(year);

            foreach (var month in MonthYearHelper.GetMonths())
            {
                //inhouse
                inHouseList.Add(new MonthlyReportData
                {
                    Month           = month.Item1,
                    MonthName       = month.Item2,
                    Inhouse         = Common.Constants.Constants.INHOUSE,
                    NoOfRuns        = GetMonthlyRunsCount(monthlyRunsCount, month.Item1, Common.Constants.Constants.INHOUSE),
                    ConsultationACT = GetMonthlyConsultationACTCount(monthlyConsultations, month.Item1, Common.Constants.Constants.INHOUSE),
                    NUACT           = GetMonthlyNewUserCount(monthlyNewUsers, month.Item1, Common.Constants.Constants.INHOUSE)
                });

                //online
                onlineList.Add(new MonthlyReportData
                {
                    Month           = month.Item1,
                    MonthName       = month.Item2,
                    Inhouse         = Common.Constants.Constants.INHOUSE,
                    NoOfRuns        = GetMonthlyRunsCount(monthlyRunsCount, month.Item1, Common.Constants.Constants.ONLINE),
                    ConsultationACT = GetMonthlyConsultationACTCount(monthlyConsultations, month.Item1, Common.Constants.Constants.ONLINE),
                    NUACT           = GetMonthlyNewUserCount(monthlyNewUsers, month.Item1, Common.Constants.Constants.ONLINE)
                });
            }
        }