コード例 #1
0
        public ReportWrapper BuildContactPopulateReport(
            ApiDateTime fromDate,
            ApiDateTime toDate,
            bool? isCompany,
            string tagName,
            int contactType)
        {
            var reportData = DaoFactory.GetReportDao().BuildContactPopulateReport(fromDate, toDate, isCompany, tagName, contactType);
            var report = new ReportWrapper
                {
                    ReportTitle = CRMReportResource.Report_ContactPopulate_Title,
                    ReportDescription = CRMReportResource.Report_ContactPopulate_Description,
                    Data = reportData.ConvertAll(row => new
                        {
                            Date = (ApiDateTime)TenantUtil.DateTimeFromUtc(DateTime.Parse(Convert.ToString(row[0]))),
                            Count = row[1]
                        }),
                    Lables = new List<string>
                        {
                            CRMCommonResource.Date,
                            CRMCommonResource.Count
                        }
                };

            return report;
        }
コード例 #2
0
        public ReportWrapper BuildSalesForecastByManagerReport(DateTime fromDate, DateTime toDate)
        {

            var reportData = DaoFactory.GetReportDao().
                BuildSalesForecastByManagerReport(
                                                
                                                fromDate,
                                                toDate
                                               );

            var report = new ReportWrapper
            {
                ReportTitle = CRMReportResource.Report_SalesForecastByMonth_Title,
                ReportDescription = CRMReportResource.Report_SalesForecastByMonth_Description,
                Data = reportData.ConvertAll(row => new
                {
                    manager = row[0],
                    amount = row[1],
                    count = row[2],
                    percent = row[3]
                }),
                Lables = new List<string>
                                         {
                                              CRMCommonResource.Date,
                                              CRMCommonResource.Count                                                
                                         }

            };

            return report;

        }