using Consulenza.ReportWriter.Business; using System; using Consulenza.ReportWriter.Business.OBJ_PDF; using System.Collections.Generic; using Consulenza.ReportWriter.Business.Entity; using ceTe.DynamicPDF; namespace Consulenza.ReportWriter.Manager.Section.Unica.Nucleo { /// /// Scheda 74 - Glossario idSezione = 117 /// public class S74 : Unica.S74 { public S74(EnvironmentFacade environmentFacade, int idSection) : base(environmentFacade, idSection) { } protected override void Draw() { var testi = GetText(); var listaOggettiDaRipetere = new List(); listaOggettiDaRipetere.Add(new SpacePDF(20)); var nucleo = datiSeiUnico.nucleiUnit().anagrafica; bool profiloProfessionale; bool profiloAggressivo; bool profiloProfessionaleAggressivo; var profiler = new Profiler(nucleo); profiloProfessionale = profiler.ProfiloProfessionale; profiloAggressivo = profiler.ProfiloAggressivo; profiloProfessionaleAggressivo = profiler.ProfiloProfessionaleAggressivo; AddElement(new RepeaterPDF(listaOggettiDaRipetere)); AddElement(new SpacePDF(20)); AddElement(new FormattedTextAreaPDF(testi.Rows[0]["Testo1"].ToString(), EnvironmentFacade.RendererFacade.XLeftLimit) { FontSize = 7, TextHorizontalAlign = TextAlign.Justify }); AddElement(new SpacePDF(10)); var stringheElencoPuntato = new List { testi.Rows[0]["Testo2"].ToString(), testi.Rows[0]["Testo3"].ToString(), testi.Rows[0]["Testo4"].ToString(), testi.Rows[0]["Testo5"].ToString(), testi.Rows[0]["Testo6"].ToString(), testi.Rows[0]["Testo7"].ToString() }; var elencoPuntato = new UnorderedListPDF(EnvironmentFacade.RendererFacade.XLeftLimit, stringheElencoPuntato) { FontSize = 7 }; AddElement(elencoPuntato); for (int i = 8; i <= testi.Columns.Count - 3; i++) { if (profiloProfessionale) { if (i != 10) { AddElement(new SpacePDF(10)); string campo = "Testo" + i.ToString(); AddElement(new FormattedTextAreaPDF(testi.Rows[0][campo].ToString(), EnvironmentFacade.RendererFacade.XLeftLimit) { FontSize = 7, TextHorizontalAlign = TextAlign.Justify }); } } else { AddElement(new SpacePDF(10)); string campo = "Testo" + i.ToString(); AddElement(new FormattedTextAreaPDF(testi.Rows[0][campo].ToString(), EnvironmentFacade.RendererFacade.XLeftLimit) { FontSize = 7, TextHorizontalAlign = TextAlign.Justify }); } } } } }