Пример #1
0
        public ReportResponse GetRepoersByType(ReportRequest request)
        {
            ReportResponse response = new ReportResponse();

            Query query = new Query("Report");
            query.AddCriterion("Type", request.ReportType, CriteriaOperator.Equal);
            IEnumerable<Report> reports = reportRepository.FindBy(query);
            response.Reports = reports;

            return response;
        }
Пример #2
0
        public static string GetReportName(string reportTypeId)
        {
            ReportRequest request = new ReportRequest
            {
                ReportType = int.Parse(reportTypeId)
            };
            ReportService service = new ReportService();
            ReportResponse response = service.GetRepoersByType(request);

            IEnumerable<ReportNameView> reportName = response.Reports.ConvertToReportNameViews();

            string result = JsonHelper.ObjectToJson(reportName);

            return result;
        }