99 lines
7.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Consulenza.ReportWriter.Business;
using Consulenza.ReportCommon;
using Consulenza.ReportWriter.Business.OBJ_PDF;
using System.Collections.Generic;
using Consulenza.ReportWriter.Business.Entity;
namespace Consulenza.ReportWriter.Manager.Section.Unica.Diagnosi
{
/// <summary>
/// Scheda 75 - Avvertenze idSezione = 118
/// </summary>
public class S75 : Unica.S75
{
public S75(EnvironmentFacade environmentFacade, int idSection)
: base(environmentFacade, idSection)
{
}
protected override void Draw()
{
var testi = GetText();
/******************** Aggiunta testo statico nella Avvertenze 23-02-2021 -- Pino Da togliere per per la produzione*******************/
//testi.Rows[0]["Testo26"] = "nelleventuale presenza in portafoglio di fondi di Investimento alternativi / Private Equity, il controvalore è determinato tramite lultimo NAV trimestrale disponibile al netto delle eventuali successive distribuzioni ancora non contabilizzate nella valorizzazione del NAV.";
/*************************************************************************************************************************************/
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;
var listaOggettiDaRipetere = new List<ObjectPDF>();
listaOggettiDaRipetere.Add(new SpacePDF(20));
AddElement(new RepeaterPDF(listaOggettiDaRipetere));
AddElement(new SpacePDF(20));
if (profiloProfessionale)
// ES 20180726
// Viene usata la Testo30 per differenziare il primo capoverso delle Avvertenze per i Clienti Professionali
AddElement(new FormattedTextAreaPDF(showBanca(testi.Rows[0]["Testo30"].ToString()), EnvironmentFacade.RendererFacade.XLeftLimit) {FontSize = 7, TextHorizontalAlign= ceTe.DynamicPDF.TextAlign.Justify });
else
AddElement(new FormattedTextAreaPDF(showBanca(testi.Rows[0]["Testo1"].ToString()), EnvironmentFacade.RendererFacade.XLeftLimit) { FontSize = 7, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify });
AddElement(new SpacePDF(15));
AddElement(new FormattedTextAreaPDF(showBanca(testi.Rows[0]["Testo2"].ToString()), EnvironmentFacade.RendererFacade.XLeftLimit) {FontSize = 7, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify });
/******************** Aggiunta testo statico nella Avvertenze 23-02-2021 -- Pino *******************/
//var stringheElencoPuntato = new List<string> { showBanca(testi.Rows[0]["Testo3"].ToString()), showBanca(testi.Rows[0]["Testo4"].ToString()), showBanca(testi.Rows[0]["Testo5"].ToString()), showBanca(testi.Rows[0]["Testo6"].ToString()), showBanca(testi.Rows[0]["Testo7"].ToString()) }; //originale
var stringheElencoPuntato = new List<string> { showBanca(testi.Rows[0]["Testo3"].ToString()), showBanca(testi.Rows[0]["Testo4"].ToString()), showBanca(testi.Rows[0]["Testo5"].ToString()), showBanca(testi.Rows[0]["Testo26"].ToString()), showBanca(testi.Rows[0]["Testo6"].ToString()), showBanca(testi.Rows[0]["Testo7"].ToString()) };
/***************************************************************************************************/
var elencoPuntato = new UnorderedListPDF(EnvironmentFacade.RendererFacade.XLeftLimit, stringheElencoPuntato) { FontSize = 7 };
AddElement(new SpacePDF(6));
AddElement(elencoPuntato);
AddElement(new SpacePDF(10));
AddElement(new FormattedTextAreaPDF(showBanca(testi.Rows[0]["Testo8"].ToString()), EnvironmentFacade.RendererFacade.XLeftLimit) { FontSize = 7, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify });
AddElement(new SpacePDF(15));
AddElement(new FormattedTextAreaPDF(showBanca(testi.Rows[0]["Testo9"].ToString()), EnvironmentFacade.RendererFacade.XLeftLimit) { FontSize = 7, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify });
AddElement(new SpacePDF(6));
if (profiloProfessionale)
{
var stringheElencoPuntato2 = new List<string> { showBanca(testi.Rows[0]["Testo10"].ToString()), showBanca(testi.Rows[0]["Testo11"].ToString()), showBanca(testi.Rows[0]["Testo15"].ToString()), showBanca(testi.Rows[0]["Testo16"].ToString()) };
var elencoPuntato2 = new UnorderedListPDF(EnvironmentFacade.RendererFacade.XLeftLimit, stringheElencoPuntato2) { FontSize = 7 };
AddElement(elencoPuntato2);
AddElement(new SpacePDF(210));
}
else
{
var stringheElencoPuntato2 = new List<string> { showBanca(testi.Rows[0]["Testo10"].ToString()), showBanca(testi.Rows[0]["Testo11"].ToString()), showBanca(testi.Rows[0]["Testo12"].ToString()), showBanca(testi.Rows[0]["Testo13"].ToString()), showBanca(testi.Rows[0]["Testo14"].ToString()), showBanca(testi.Rows[0]["Testo15"].ToString()), showBanca(testi.Rows[0]["Testo16"].ToString()) };
var elencoPuntato2 = new UnorderedListPDF(EnvironmentFacade.RendererFacade.XLeftLimit, stringheElencoPuntato2) { FontSize = 7 };
AddElement(elencoPuntato2);
AddElement(new SpacePDF(140));
}
AddElement(new FormattedTextAreaPDF(showBanca(testi.Rows[0]["Testo17"].ToString()), EnvironmentFacade.RendererFacade.XLeftLimit) {FontSize = 7, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify });
AddElement(new SpacePDF(6));
var stringheElencoPuntato3 = new List<string> { showBanca(testi.Rows[0]["Testo18"].ToString()), showBanca(testi.Rows[0]["Testo19"].ToString()), showBanca(testi.Rows[0]["Testo20"].ToString()), showBanca(testi.Rows[0]["Testo21"].ToString()), showBanca(testi.Rows[0]["Testo22"].ToString()) };
var elencoPuntato3 = new UnorderedListPDF(EnvironmentFacade.RendererFacade.XLeftLimit, stringheElencoPuntato3) { FontSize = 7 };
AddElement(elencoPuntato3);
AddElement(new SpacePDF(10));
AddElement(new FormattedTextAreaPDF(showBanca(testi.Rows[0]["Testo23"].ToString()), EnvironmentFacade.RendererFacade.XLeftLimit) {FontSize = 7, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify });
AddElement(new SpacePDF(15));
AddElement(new FormattedTextAreaPDF(showBanca(testi.Rows[0]["Testo24"].ToString()), EnvironmentFacade.RendererFacade.XLeftLimit) {FontSize = 7, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify });
AddElement(new SpacePDF(15));
AddElement(new FormattedTextAreaPDF(showBanca(testi.Rows[0]["Testo25"].ToString()), EnvironmentFacade.RendererFacade.XLeftLimit) { FontSize = 7, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify });
}
}
}