133 lines
5.8 KiB
C#
133 lines
5.8 KiB
C#
using System;
|
|
using ceTe.DynamicPDF;
|
|
using Consulenza.ReportWriter.Business;
|
|
using Consulenza.ReportCommon;
|
|
using Consulenza.ReportWriter.Business.OBJ_PDF;
|
|
using System.Data;
|
|
|
|
namespace Consulenza.ReportWriter.Manager.Section.Unica.Proposta
|
|
{
|
|
/// <summary>
|
|
/// Scheda 1. Copertina. IdSezione 44
|
|
/// </summary>
|
|
public class S1 : Unica.S1
|
|
{
|
|
public S1(EnvironmentFacade environmentFacade, int idSection)
|
|
: base(environmentFacade, idSection)
|
|
{
|
|
var testi = GetText();
|
|
//ExtendedProperties.Add("titoloReport", testoCopertina);
|
|
|
|
try
|
|
{
|
|
Draw();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
SectionLogger.Write("S1", ex.Message, SectionLoggerMessageLevel.E, EnvironmentFacade.ReportEnvironment);
|
|
}
|
|
}
|
|
|
|
protected override void Draw()
|
|
{
|
|
#region TEST Opzioni
|
|
//try
|
|
//{
|
|
// string log = "";
|
|
// log += "Opzione1:" + GetOption<Opzione1>().anonimo;
|
|
// log += "Opzione2:" + GetOption<Opzione2>().proposta;
|
|
// log += "Opzione3:" + GetOption<Opzione3>().visualizzazione;
|
|
// log += "Opzione4:" + GetOption<Opzione4>().visualizzazione;
|
|
// log += "Opzione4_1:" + GetOption<Opzione4_1>().visualizzazione;
|
|
// log += "Opzione4_2:" + GetOption<Opzione4_2>().visualizzazione;
|
|
// log += "Opzione4_3:" + GetOption<Opzione4_3>().visualizzazione;
|
|
// log += "Opzione4_4:" + GetOption<Opzione4_4>().visualizzazione;
|
|
// log += "Opzione4_5:" + GetOption<Opzione4_5>().visualizzazione;
|
|
// log += "Opzione4A:" + GetOption<Opzione4A>().visualizzazione;
|
|
// SectionLogger.Write("S1Opzioni", log, SectionLoggerMessageLevel.I, EnvironmentFacade.ReportEnvironment);
|
|
//}
|
|
//catch { }
|
|
#endregion
|
|
|
|
var reportAnonimo = GetOption<Opzione1>().ReportAnonimo;
|
|
|
|
var nomeCliente = Helper.CapitalizeWords(EnvironmentFacade.ReportEnvironment.Cliente.Nome);
|
|
var cognomeCliente = Helper.CapitalizeWords(EnvironmentFacade.ReportEnvironment.Cliente.Cognome);
|
|
var report = new FormattedTextAreaPDF(datiSeiUnico.flagAdeguatezzaPro() ?
|
|
GetText().Rows[0]["testo1"].ToString()/*"PROPOSTA"*/ : "OPERAZIONI RICHIESTE DAL CLIENTE",
|
|
datiSeiUnico.flagAdeguatezzaPro() ? 157 : -20,
|
|
datiSeiUnico.flagAdeguatezzaPro() ? 220 : 390)
|
|
{
|
|
FontSize = datiSeiUnico.flagAdeguatezzaPro() ? 18 : 16,
|
|
Y = datiSeiUnico.flagAdeguatezzaPro() ? 231 : 233,
|
|
AutoIncrementYWritable = false,
|
|
AbsolutePosition = true,
|
|
TextHorizontalAlign = TextAlign.Right,
|
|
FontColor = ColorPDF.Bianco,
|
|
FontBold = true
|
|
};
|
|
|
|
// data ultimo aggiornamento
|
|
//var dDataUtlimoAggiornamento = datiSeiUnico.propostaUnit().stDettaglioProposta.dtProposta;
|
|
var dDataUtlimoAggiornamento = datiSeiUnico.propostaUnit().stDettaglioProposta.dtUltimoAgg;
|
|
var sDataUltimoAggiornamento = "Dati Aggiornati al : {0}";
|
|
var DataUltimoAggiornamento = new FormattedTextAreaPDF(string.Format(sDataUltimoAggiornamento, Helper.FormatDateMonthName(dDataUtlimoAggiornamento)), 210, 300)
|
|
{
|
|
FontSize = 9,
|
|
Y = 25,
|
|
AutoIncrementYWritable = false,
|
|
AbsolutePosition = true,
|
|
TextHorizontalAlign = TextAlign.Right
|
|
};
|
|
|
|
// data di stampa
|
|
var sDataStampa = reportAnonimo ? "Report prodotto il {0}" : "Report prodotto il {0} per";
|
|
var dataStampa = new FormattedTextAreaPDF(string.Format(sDataStampa, Helper.FormatDateMonthName(DateTime.Now)), 88, 300)
|
|
{
|
|
FontSize = 9,
|
|
Y = 265,
|
|
AutoIncrementYWritable = false,
|
|
AbsolutePosition = true,
|
|
TextHorizontalAlign = TextAlign.Right
|
|
};
|
|
|
|
// cliente
|
|
var cliente = new FormattedTextAreaPDF(string.Format("{0} {1}", cognomeCliente, nomeCliente), 88, 300)
|
|
{
|
|
FontSize = 9,
|
|
Y = 280,
|
|
AutoIncrementYWritable = false,
|
|
AbsolutePosition = true,
|
|
TextHorizontalAlign = TextAlign.Right,
|
|
FontBold = true
|
|
};
|
|
|
|
// Aggiungo gli oggetti
|
|
AddElement(DataUltimoAggiornamento);
|
|
AddElement(report);
|
|
AddElement(dataStampa);
|
|
|
|
if (!reportAnonimo)
|
|
AddElement(cliente);
|
|
|
|
AddElement(new FormattedTextAreaPDF(getNote(), EnvironmentFacade.RendererFacade.XLeftLimit) { FontSize = 7, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify, Y = EnvironmentFacade.RendererFacade.YLowerLimit+50 });
|
|
|
|
}
|
|
|
|
public string getNote() {
|
|
string nota = "";
|
|
if (!datiSeiUnico.flagAdeguatezzaPro())
|
|
{
|
|
nota += "Nel presente report è riportata una descrizione dettagliata delle operazioni da lei richieste al suo private banker, ";
|
|
nota += "allo scopo di fornirle una rappresentazione dei rilativi impatti sul suo portafoglio, nonché delle motivazioni che ne sconsigliano l'esecuzione. ";
|
|
nota += "Tuttavia, laddove lei desideri ugualmente eseguire tali operazioni, potrà farlo avvalendosi del servizio di collocamento ";
|
|
nota += "ovvero dei servizi di esecuzione di ordini per conto della clientela, di negoziazione per contro proprio o di ricezione ";
|
|
nota += "e trasmissione ordini.";
|
|
}
|
|
return nota;
|
|
}
|
|
}
|
|
|
|
|
|
}
|