78 lines
3.4 KiB
C#
78 lines
3.4 KiB
C#
using Consulenza.ReportWriter.Business;
|
|
using Consulenza.ReportWriter.Business.OBJ_PDF;
|
|
using Consulenza.ReportWriter.Business.Entity;
|
|
using System.Collections.Generic;
|
|
using System;
|
|
using ceTe.DynamicPDF;
|
|
|
|
namespace Consulenza.ReportWriter.Manager.Section.Unica.Monitoraggio
|
|
{
|
|
/// <summary>
|
|
/// Scheda 74 - Glossario idSezione = 117
|
|
/// </summary>
|
|
public class S74 : Unica.S74
|
|
{
|
|
public S74(EnvironmentFacade environmentFacade, int idSection)
|
|
: base(environmentFacade, idSection)
|
|
{
|
|
|
|
try
|
|
{
|
|
//Draw();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
SectionLogger.Write("S74", ex.Message, SectionLoggerMessageLevel.E, EnvironmentFacade.ReportEnvironment);
|
|
}
|
|
}
|
|
|
|
protected override void Draw()
|
|
{
|
|
var testi = GetText();
|
|
var listaOggettiDaRipetere = new List<ObjectPDF>();
|
|
listaOggettiDaRipetere.Add(new SpacePDF(20));
|
|
AddElement(new RepeaterPDF(listaOggettiDaRipetere));
|
|
AddElement(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 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<string> { 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);
|
|
AddElement(new SpacePDF(10));
|
|
for (int i = 9; i <= testi.Columns.Count-3; i++)
|
|
{
|
|
if (profiloProfessionale)
|
|
{
|
|
if (i != 11 && i!= 13 && i != 20)
|
|
{
|
|
string campo = "Testo" + i.ToString();
|
|
AddElement(new FormattedTextAreaPDF(testi.Rows[0][campo].ToString(), EnvironmentFacade.RendererFacade.XLeftLimit) { FontSize = 7, TextHorizontalAlign = TextAlign.Justify });
|
|
AddElement(new SpacePDF(10));
|
|
}
|
|
}
|
|
else
|
|
{
|
|
string campo = "Testo" + i.ToString();
|
|
AddElement(new FormattedTextAreaPDF(testi.Rows[0][campo].ToString(), EnvironmentFacade.RendererFacade.XLeftLimit) { FontSize = 7, TextHorizontalAlign = TextAlign.Justify });
|
|
AddElement(new SpacePDF(10));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|