Exemplo n.º 1
0
 public ReportViewer Post([FromBody] ReportViewer ReportViewer)
 {
     if (ModelState.IsValid)
     {
         ReportViewer = _ReportViewers.AddReportViewer(ReportViewer);
         _logger.Log(LogLevel.Information, this, LogFunction.Create, "ReportViewer Added {ReportViewer}", ReportViewer);
     }
     return(ReportViewer);
 }
        public void ImportModule(Module module, string content, string version)
        {
            List <ReportViewer> ReportViewers = null;

            if (!string.IsNullOrEmpty(content))
            {
                ReportViewers = JsonSerializer.Deserialize <List <ReportViewer> >(content);
            }
            if (ReportViewers != null)
            {
                foreach (ReportViewer ReportViewer in ReportViewers)
                {
                    ReportViewer _ReportViewer = new ReportViewer();
                    _ReportViewer.ModuleId = module.ModuleId;
                    _ReportViewer.Name     = ReportViewer.Name;
                    _ReportViewers.AddReportViewer(_ReportViewer);
                }
            }
        }