using Consulenza.ReportWriter.Business; using Consulenza.ReportWriter.Business.OBJ_PDF; using Consulenza.ReportWriter.Business.Entity; using System.Collections.Generic; using ceTe.DynamicPDF; namespace Consulenza.ReportWriter.Manager.Section.Unica.Proposta { /// /// 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 cliente = datiSeiUnico.clienteUnit().anagrafica; bool profiloProfessionale; bool profiloAggressivo; bool profiloProfessionaleAggressivo; var profiler = new Profiler(cliente); 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)); AddElement(new FormattedTextAreaPDF(testi.Rows[0]["Testo2"].ToString(), EnvironmentFacade.RendererFacade.XLeftLimit) { FontSize = 7, TextHorizontalAlign = TextAlign.Justify }); var stringheElencoPuntato = new List { 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(), testi.Rows[0]["Testo8"].ToString() }; var elencoPuntato = new UnorderedListPDF(EnvironmentFacade.RendererFacade.XLeftLimit, stringheElencoPuntato) { FontSize = 7}; AddElement(elencoPuntato); for (int i = 9; i <= testi.Columns.Count-3; i++) { if (profiloProfessionale) { if (i != 11 && i != 13 && i != 19) { 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 }); } } } } }