Esempio n. 1
0
        public static bool TryCreateReport(string query, out ReportState state)
        {
            var p = ReportFilterSerializer.GetParameterFromUri(query, "reportType");

            if (string.IsNullOrEmpty(p))
            {
                throw new Exception(ReportResource.ErrorParse);
            }

            ReportType reportType;

            if (!Enum.TryParse(p, out reportType))
            {
                throw new Exception(ReportResource.ErrorParse);
            }

            var filter = ReportFilterSerializer.FromUri(query);

            var template = new ReportTemplate(reportType)
            {
                Id = -1, Filter = filter, CreateBy = SecurityContext.CurrentAccount.ID
            };

            return(TryCreateReportFromTemplate(template, template.SaveDocbuilderReport, null, out state));
        }
Esempio n. 2
0
 public static TaskFilter FromUri(string uri)
 {
     return(ReportFilterSerializer.FromUri(uri));
 }