1048 lines
65 KiB
C#
1048 lines
65 KiB
C#
using System;
|
|
using Consulenza.ReportWriter.Business;
|
|
using Consulenza.ReportWriter.Business.OBJ_PDF;
|
|
using System.Data;
|
|
using Consulenza.ReportCommon;
|
|
using System.Collections.Generic;
|
|
using Consulenza.ReportWriter.Business.CHART_PDF;
|
|
using Consulenza.ReportWriter.Business.Entity;
|
|
using System.Linq;
|
|
|
|
namespace Consulenza.ReportWriter.Manager.Section.Unica
|
|
{
|
|
/// <summary>
|
|
/// S78.PropostaDiversificazione idSezione = 237
|
|
/// </summary>
|
|
public class S78 : Entity.Section
|
|
{
|
|
private bool _visualizzaSintesiComponenti;
|
|
private bool _visualizzaDettaglioComponenti;
|
|
private bool _presenzaNotaPortafoglioAttuale = false;
|
|
private bool _presenzaNotaPortafoglioProposto = false;
|
|
private bool _stampaNota = false;
|
|
|
|
private string _asteriscoAttuale = "";
|
|
private string _asteriscoProposto = "";
|
|
|
|
public S78(EnvironmentFacade environmentFacade, int idSection)
|
|
: base(environmentFacade, idSection)
|
|
{
|
|
try
|
|
{
|
|
//_visualizzaAltriIstituti = GetOption<Opzione4>().Valore;
|
|
|
|
_visualizzaSintesiComponenti = GetOption<Opzione4_5>().Valore;
|
|
_visualizzaDettaglioComponenti = GetOption<Opzione4_6>().Valore;
|
|
|
|
Draw();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
SectionLogger.Write("S78", ex.Message, SectionLoggerMessageLevel.E, EnvironmentFacade.ReportEnvironment);
|
|
}
|
|
}
|
|
|
|
protected override sealed void Draw()
|
|
{
|
|
var dati = GetDataSet();
|
|
var testi = GetText();
|
|
var nota = Helper.ReplaceVariables(GetNote(), EnvironmentFacade.ReportEnvironment);
|
|
var series = new List<Serie>();
|
|
|
|
float axisWidth = 0;
|
|
|
|
float Y1TabellaDiversificazionePortafoglio = 225f;
|
|
float Y2TabellaDiversificazionePortafoglio = 288f;
|
|
|
|
float Y1TabellaSintesiComponentiAttuale = Y2TabellaDiversificazionePortafoglio + 178f;
|
|
float Y2TabellaSintesiComponentiProposto = Y2TabellaDiversificazionePortafoglio + 274f;
|
|
|
|
float Y1TabellaDettaglioComponentiAttuale = 298f;
|
|
//float Y2TabellaDettaglioComponentiProposto = 585f;
|
|
float Y2TabellaDettaglioComponentiProposto = 522f;
|
|
|
|
_asteriscoAttuale = _presenzaNotaPortafoglioAttuale ? "*" : "";
|
|
_asteriscoProposto = _presenzaNotaPortafoglioProposto ? "*" : "";
|
|
|
|
_stampaNota = _presenzaNotaPortafoglioAttuale || _presenzaNotaPortafoglioProposto;
|
|
|
|
string portafoglioAttuale = dati.Tables["Portafoglio"].Rows[0]["Controvalore"].ToString();
|
|
string portafoglioProposto = dati.Tables["Portafoglio"].Rows[1]["Controvalore"].ToString();
|
|
|
|
AddElement(new SpacePDF(20) { AutoIncrementYWritable = true });
|
|
|
|
#region Sezione Diversificazione Portafoglio
|
|
|
|
#region Testo Introduttivo Sezione Diversificazione Portafoglio
|
|
|
|
var testoIntroPortafoglio = string.Empty;
|
|
|
|
testoIntroPortafoglio = testi.Rows[0]["testo1"].ToString();
|
|
|
|
testoIntroPortafoglio = Helper.ReplaceVariables(testoIntroPortafoglio, EnvironmentFacade.ReportEnvironment);
|
|
|
|
var textArea = new FormattedTextAreaPDF(testoIntroPortafoglio, EnvironmentFacade.RendererFacade.XLeftLimit)
|
|
{ FontSize = 7, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify, AutoIncrementYWritable = true };
|
|
|
|
AddElement(new FormattedTextAreaPDF(testoIntroPortafoglio, EnvironmentFacade.RendererFacade.XLeftLimit) { FontSize = 7, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify, AutoIncrementYWritable = true });
|
|
|
|
AddElement(new SpacePDF(20));
|
|
|
|
#endregion Testo Introduttivo Sezione Diversificazione Portafoglio
|
|
|
|
#region Tabella Diversificazione Portafoglio
|
|
|
|
int i = 0;
|
|
|
|
DataTable dtPortafoglio = dati.Tables["Portafoglio"];
|
|
|
|
var tabellaDiversificazionePortafoglio = new TablePDF(EnvironmentFacade.RendererFacade.XLeftLimit, dtPortafoglio)
|
|
{
|
|
Style = Style.ConsulenzaUnica,
|
|
AlternateRow = false,
|
|
ShowSeparationLines = true,
|
|
RowHeight = 30,
|
|
Footer = false,
|
|
HeaderHeight = 30,
|
|
HideLastSeparationLine = false,
|
|
AdditionalSpaceBetweenHeadersAndTable = 3
|
|
};
|
|
|
|
tabellaDiversificazionePortafoglio.Columns.Add(new ColumnPDF("Portafoglio", 110, HorizontalAlignmentType.Sinistra, false, false, 7, ColumnType.Testo, "Portafoglio", "Portafoglio") { HeaderFontSize = 7, PaddingRight = 4 });
|
|
tabellaDiversificazionePortafoglio.Columns.Add(new ColumnPDF("ControvaloreAttuale", 115, HorizontalAlignmentType.Sinistra, false, false, 7, ColumnType.Decimale, "Controvalore", "Controvalore (€)") { PaddingRight = 15, HeaderFontSize = 7 });
|
|
tabellaDiversificazionePortafoglio.Columns.Add(new ColumnPDF("GradoCopertura", 70, HorizontalAlignmentType.Sinistra, false, false, 7, ColumnType.Decimale, "GradoCopertura", "Grado di copertura <br>(%)") { PaddingRight = 15, HeaderFontSize = 7 });
|
|
tabellaDiversificazionePortafoglio.Columns.Add(new ColumnPDF("DiversificazioneObject", 225, HorizontalAlignmentType.Sinistra, false, false, 7, ColumnType.Objectpdf, "DiversificazionePortafoglio", "Diversificazione di portafoglio") { VerticalAlignment = VerticalAlignmentType.Centrato, HeaderFontSize = 7, FontSize = 7, DeltaYContent = 6, HeaderPaddingLeft = 10 });
|
|
|
|
var list = new List<double>();
|
|
list.Add(Convert.ToDouble(dtPortafoglio.AsEnumerable().Max(x => x["DiversificazionePortafoglio"])));
|
|
//var valoreMassimo = (float)Helper.Round(list.Max());
|
|
var valoreMassimo = 100.00f;
|
|
float larghezzaBarra = 0;
|
|
float larghezzaSpazioTestoPercentuale = 0;
|
|
float larghezzaMinimaSpazioTestoPercentuale = 35;
|
|
float deltaXBarra = 0;
|
|
float width = tabellaDiversificazionePortafoglio.Columns[3].Width - 50;
|
|
foreach (DataRow row in dtPortafoglio.Rows)
|
|
{
|
|
var colore = new ColorPDF(Convert.ToInt32(row["Red"]), Convert.ToInt32(row["Green"]), Convert.ToInt32(row["Blue"]));
|
|
|
|
//Allineamento a destro delle colonne numeriche (Controvalore attuale e Grado di Copertura)
|
|
tabellaDiversificazionePortafoglio.Cells[1, i].HorizontalAlignment = HorizontalAlignmentType.Destra;
|
|
tabellaDiversificazionePortafoglio.Cells[2, i].HorizontalAlignment = HorizontalAlignmentType.Destra;
|
|
|
|
//Aggiunge l'asterisco se c'è la nota
|
|
row["Portafoglio"] += i == 0 ? _asteriscoAttuale : _asteriscoProposto;
|
|
|
|
larghezzaBarra = Helper.GetWidthProportional((float)Convert.ToDecimal(row["DiversificazionePortafoglio"]), valoreMassimo, tabellaDiversificazionePortafoglio.Columns[3].Width - 35);
|
|
larghezzaSpazioTestoPercentuale = tabellaDiversificazionePortafoglio.Columns[3].Width - larghezzaBarra;
|
|
deltaXBarra = larghezzaBarra + 10;
|
|
if (larghezzaSpazioTestoPercentuale < larghezzaMinimaSpazioTestoPercentuale)
|
|
{
|
|
deltaXBarra = -(tabellaDiversificazionePortafoglio.Columns[3].Width - larghezzaMinimaSpazioTestoPercentuale);
|
|
larghezzaSpazioTestoPercentuale = larghezzaMinimaSpazioTestoPercentuale;
|
|
}
|
|
if (Convert.ToDouble(row["Controvalore"]) == 0)
|
|
{
|
|
tabellaDiversificazionePortafoglio.Cells[3, i].ValueObjectList = new List<Business.Entity.ObjectPDF>()
|
|
{
|
|
new RectanglePDF(20, 1 , ColorPDF.Bianco),
|
|
new FormattedTextAreaPDF(row["DiversificazionePortafoglio"].ToString()=="0.00"? "0.00" : Helper.FormatDecimal(Convert.ToDecimal(row["DiversificazionePortafoglio"]).ToString(), 2),
|
|
0, larghezzaSpazioTestoPercentuale)
|
|
{
|
|
DeltaY = 3,
|
|
TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Left,
|
|
TextVerticalAlign = ceTe.DynamicPDF.VAlign.Center,
|
|
DeltaX = deltaXBarra,
|
|
FontSize = 7
|
|
}
|
|
};
|
|
}
|
|
else
|
|
{
|
|
tabellaDiversificazionePortafoglio.Cells[3, i].ValueObjectList = new List<Business.Entity.ObjectPDF>()
|
|
{
|
|
new RectanglePDF(20, larghezzaBarra , colore),
|
|
new FormattedTextAreaPDF(row["DiversificazionePortafoglio"].ToString()=="0.00"? "0.00" : Helper.FormatDecimal(Convert.ToDecimal(row["DiversificazionePortafoglio"]).ToString(), 2),
|
|
0, larghezzaSpazioTestoPercentuale)
|
|
{
|
|
DeltaY = 3,
|
|
TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Left,
|
|
TextVerticalAlign = ceTe.DynamicPDF.VAlign.Center,
|
|
DeltaX = deltaXBarra,
|
|
FontSize = 7
|
|
}
|
|
};
|
|
}
|
|
|
|
i++;
|
|
}
|
|
|
|
AddElement(tabellaDiversificazionePortafoglio);
|
|
|
|
//ASSE X
|
|
axisWidth = Helper.GetWidthProportional(100, valoreMassimo, tabellaDiversificazionePortafoglio.Columns[3].Width - larghezzaMinimaSpazioTestoPercentuale);
|
|
XAxisDraw(295, Y2TabellaDiversificazionePortafoglio, 295 + axisWidth, Y2TabellaDiversificazionePortafoglio + 2);
|
|
|
|
//ASSE Y
|
|
AddElement(new LinePDF(EnvironmentFacade.RendererFacade.XLeftLimit + 295 - 0.5f, Y1TabellaDiversificazionePortafoglio + 2, EnvironmentFacade.RendererFacade.XLeftLimit + 295 - 0.5f, Y2TabellaDiversificazionePortafoglio + 2, 0.8F, new ColorPDF(137, 137, 137))
|
|
{ AutoIncrementYWritable = false });
|
|
|
|
#endregion Tabella Diversificazione Portafoglio
|
|
|
|
#endregion Sezione Diversificazione Portafoglio
|
|
|
|
#region Sezione Sintesi Componenti
|
|
if (_visualizzaSintesiComponenti)
|
|
{
|
|
#region Titolo e Testo Introduttivo
|
|
|
|
AddElement(new SpacePDF(20));
|
|
|
|
string titoloSintesi = "Sintesi delle componenti di diversificazione";
|
|
|
|
AddElement(new FormattedTextAreaPDF(titoloSintesi, EnvironmentFacade.RendererFacade.XLeftLimit) { FontSize = 10, FontBold = true, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify });
|
|
AddElement(new SpacePDF(20));
|
|
|
|
string testoIntroSintesi = string.Empty;
|
|
|
|
testoIntroSintesi = testi.Rows[0]["testo3"].ToString();
|
|
|
|
testoIntroSintesi = Helper.ReplaceVariables(testoIntroSintesi, EnvironmentFacade.ReportEnvironment);
|
|
|
|
AddElement(new FormattedTextAreaPDF(testoIntroSintesi, EnvironmentFacade.RendererFacade.XLeftLimit) { FontSize = 7, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify });
|
|
AddElement(new SpacePDF(20));
|
|
|
|
#endregion Titolo e Testo Introduttivo
|
|
|
|
#region Tabella Sintesi Componenti Portafoglio
|
|
|
|
AddElement(new ImagePDF(EnvironmentFacade.RendererFacade.XLeftLimit + 10, 0.20f, "PallinoPortafoglioAttuale_new.png") { AutoIncrementYWritable = false, DeltaY = -1 });
|
|
AddElement(new FormattedTextAreaPDF(String.Format("Portafoglio attuale (€){0}", _asteriscoAttuale), EnvironmentFacade.RendererFacade.XLeftLimit + 25) { FontSize = 7, FontBold = true, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify, AutoIncrementYWritable = false });
|
|
AddElement(new FormattedTextAreaPDF(Helper.FormatCurrency(portafoglioAttuale), EnvironmentFacade.RendererFacade.XLeftLimit + 220) { FontSize = 7, FontBold = true, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify });
|
|
|
|
AddElement(new SpacePDF(10));
|
|
|
|
AddElement(new ImagePDF(EnvironmentFacade.RendererFacade.XLeftLimit + 10, 0.20f, "PallinoPortafoglioProposto_new.png") { AutoIncrementYWritable = false, DeltaY = -1 });
|
|
AddElement(new FormattedTextAreaPDF(String.Format("Portafoglio proposto (€){0}", _asteriscoProposto), EnvironmentFacade.RendererFacade.XLeftLimit + 25) { FontSize = 7, FontBold = true, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify, AutoIncrementYWritable = false });
|
|
AddElement(new FormattedTextAreaPDF(Helper.FormatCurrency(portafoglioProposto), EnvironmentFacade.RendererFacade.XLeftLimit + 220) { FontSize = 7, FontBold = true, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify });
|
|
|
|
AddElement(new SpacePDF(10));
|
|
|
|
if (dati.Tables["SintesiComponentiPortafoglio"].Rows.Count > 0)
|
|
{
|
|
|
|
#region Definizione e Creazione
|
|
var tabellaSintesiComponentiPortafoglio = new TablePDF(EnvironmentFacade.RendererFacade.XLeftLimit, dati.Tables["SintesiComponentiPortafoglio"])
|
|
{
|
|
Style = Style.ConsulenzaUnica,
|
|
AlternateRow = false,
|
|
ShowSeparationLines = true,
|
|
RowHeight = 30,
|
|
Footer = false,
|
|
HeaderHeight = 30,
|
|
HideLastSeparationLine = false,
|
|
AdditionalSpaceBetweenHeadersAndTable = 3
|
|
};
|
|
|
|
tabellaSintesiComponentiPortafoglio.Columns.Add(new ColumnPDF("Componente", 210, HorizontalAlignmentType.Sinistra, false, false, 7, ColumnType.Decimale, "Componente", "Componenti diversificazione di portafoglio") { HeaderFontSize = 7, FontSize = 7 });
|
|
tabellaSintesiComponentiPortafoglio.Columns.Add(new ColumnPDF("DiversificazioneAObject", 155, HorizontalAlignmentType.Destra, false, false, 7, ColumnType.Objectpdf, "DiversificazioneAttuale", "Portafoglio attuale") { VerticalAlignment = VerticalAlignmentType.Centrato, HeaderFontSize = 7, FontSize = 7, DeltaYContent = 6, HeaderPaddingRight = 30 });
|
|
tabellaSintesiComponentiPortafoglio.Columns.Add(new ColumnPDF("DiversificazionePObject", 155, HorizontalAlignmentType.Sinistra, false, false, 7, ColumnType.Objectpdf, "DiversificazioneProposto", "Portafoglio proposto") { VerticalAlignment = VerticalAlignmentType.Centrato, HeaderFontSize = 7, FontSize = 7, DeltaYContent = 6, HeaderPaddingLeft = 30 });
|
|
#endregion
|
|
|
|
#region Creazione Stacked Bar
|
|
list = new List<double>();
|
|
list.Add(Convert.ToDouble(dati.Tables["SintesiComponentiPortafoglio"].AsEnumerable().Max(x => x["DiversificazioneAttuale"])));
|
|
list.Add(Convert.ToDouble(dati.Tables["SintesiComponentiPortafoglio"].AsEnumerable().Max(x => x["DiversificazioneProposto"])));
|
|
//valoreMassimo = (float)Helper.Round(list.Max());
|
|
valoreMassimo = 100f;
|
|
larghezzaBarra = 0;
|
|
larghezzaSpazioTestoPercentuale = 0;
|
|
larghezzaMinimaSpazioTestoPercentuale = 35;
|
|
deltaXBarra = 0;
|
|
width = tabellaSintesiComponentiPortafoglio.Columns[1].Width - 50;
|
|
i = 0;
|
|
foreach (DataRow row in dati.Tables["SintesiComponentiPortafoglio"].Rows)
|
|
{
|
|
#region Barra Attuale
|
|
|
|
var colore = new ColorPDF(195, 195, 195);
|
|
|
|
larghezzaBarra = Helper.GetWidthProportional((float)Convert.ToDecimal(row["DiversificazioneAttuale"]), valoreMassimo, tabellaSintesiComponentiPortafoglio.Columns[1].Width - 35);
|
|
larghezzaSpazioTestoPercentuale = tabellaSintesiComponentiPortafoglio.Columns[1].Width - larghezzaBarra;
|
|
deltaXBarra = -larghezzaBarra - 10;
|
|
if (larghezzaSpazioTestoPercentuale < larghezzaMinimaSpazioTestoPercentuale)
|
|
{
|
|
deltaXBarra = -(tabellaSintesiComponentiPortafoglio.Columns[1].Width - larghezzaMinimaSpazioTestoPercentuale);
|
|
larghezzaSpazioTestoPercentuale = larghezzaMinimaSpazioTestoPercentuale;
|
|
}
|
|
if (Convert.ToDouble(row["DiversificazioneAttuale"]) == 0)
|
|
{
|
|
tabellaSintesiComponentiPortafoglio.Cells[1, i].ValueObjectList = new List<Business.Entity.ObjectPDF>()
|
|
{
|
|
new RectanglePDF(20, 1 , ColorPDF.Bianco),
|
|
new FormattedTextAreaPDF(row["DiversificazioneAttuale"].ToString()=="0.00"? "0.00" : Helper.FormatDecimal(Convert.ToDecimal(row["DiversificazioneAttuale"]).ToString(), 2),
|
|
0, larghezzaSpazioTestoPercentuale)
|
|
{
|
|
DeltaY = 3,
|
|
TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Right,
|
|
TextVerticalAlign = ceTe.DynamicPDF.VAlign.Center,
|
|
DeltaX = deltaXBarra,
|
|
FontSize = 7
|
|
}
|
|
};
|
|
}
|
|
else
|
|
{
|
|
tabellaSintesiComponentiPortafoglio.Cells[1, i].ValueObjectList = new List<Business.Entity.ObjectPDF>()
|
|
{
|
|
new RectanglePDF(20, larghezzaBarra , colore),
|
|
new FormattedTextAreaPDF(row["DiversificazioneAttuale"].ToString()=="0.00"? "0.00" : Helper.FormatDecimal(Convert.ToDecimal(row["DiversificazioneAttuale"]).ToString(), 2),
|
|
0, larghezzaSpazioTestoPercentuale)
|
|
{
|
|
DeltaY = 3,
|
|
TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Right,
|
|
TextVerticalAlign = ceTe.DynamicPDF.VAlign.Center,
|
|
DeltaX = deltaXBarra,
|
|
FontSize = 7
|
|
}
|
|
};
|
|
}
|
|
|
|
#endregion Barra Attuale
|
|
|
|
#region Barra Proposto
|
|
|
|
colore = new ColorPDF(91, 155, 213);
|
|
|
|
larghezzaBarra = Helper.GetWidthProportional((float)Convert.ToDecimal(row["DiversificazioneProposto"]), valoreMassimo, tabellaSintesiComponentiPortafoglio.Columns[2].Width - 35);
|
|
larghezzaSpazioTestoPercentuale = tabellaSintesiComponentiPortafoglio.Columns[2].Width - larghezzaBarra;
|
|
deltaXBarra = larghezzaBarra + 10;
|
|
if (larghezzaSpazioTestoPercentuale < larghezzaMinimaSpazioTestoPercentuale)
|
|
{
|
|
deltaXBarra = (tabellaSintesiComponentiPortafoglio.Columns[2].Width - larghezzaMinimaSpazioTestoPercentuale);
|
|
larghezzaSpazioTestoPercentuale = larghezzaMinimaSpazioTestoPercentuale;
|
|
}
|
|
if (row["DiversificazioneProposto"].ToString() == "0.00")
|
|
{
|
|
tabellaSintesiComponentiPortafoglio.Cells[2, i].ValueObjectList = new List<Business.Entity.ObjectPDF>()
|
|
{
|
|
new RectanglePDF(20, 1, ColorPDF.Bianco),
|
|
new FormattedTextAreaPDF( "0.00",
|
|
0,
|
|
30 )
|
|
{
|
|
DeltaY = 3,
|
|
TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Left,
|
|
TextVerticalAlign = ceTe.DynamicPDF.VAlign.Center,
|
|
DeltaX = deltaXBarra,
|
|
FontSize = 7
|
|
}
|
|
};
|
|
}
|
|
else
|
|
{
|
|
tabellaSintesiComponentiPortafoglio.Cells[2, i].ValueObjectList = new List<Business.Entity.ObjectPDF>()
|
|
{
|
|
new RectanglePDF(20, larghezzaBarra, colore),
|
|
new FormattedTextAreaPDF( Helper.FormatDecimal(Convert.ToDecimal(row["DiversificazioneProposto"]).ToString(), 2),
|
|
0,
|
|
larghezzaSpazioTestoPercentuale)
|
|
{
|
|
DeltaY = 3,
|
|
TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Left,
|
|
TextVerticalAlign = ceTe.DynamicPDF.VAlign.Center,
|
|
DeltaX = deltaXBarra,
|
|
FontSize = 7
|
|
}
|
|
};
|
|
}
|
|
|
|
#endregion Barra Proposto
|
|
|
|
i++;
|
|
}
|
|
|
|
AddElement(tabellaSintesiComponentiPortafoglio);
|
|
//ASSE X
|
|
axisWidth = Helper.GetWidthProportional(100, valoreMassimo, tabellaSintesiComponentiPortafoglio.Columns[1].Width - larghezzaMinimaSpazioTestoPercentuale);
|
|
//asse x attuale
|
|
XAxisDraw(365, Y2TabellaSintesiComponentiProposto, 365 + axisWidth, Y2TabellaSintesiComponentiProposto + 2, 2);
|
|
//asse x proposto
|
|
XAxisDraw(365, Y2TabellaSintesiComponentiProposto, 365 - axisWidth, Y2TabellaSintesiComponentiProposto + 2, 2);
|
|
|
|
//ASSE Y
|
|
AddElement(new LinePDF(EnvironmentFacade.RendererFacade.XLeftLimit + 365 - 0.5f, Y1TabellaSintesiComponentiAttuale + 2, EnvironmentFacade.RendererFacade.XLeftLimit + 365 - 0.5f, Y2TabellaSintesiComponentiProposto + 2, 0.8F, new ColorPDF(137, 137, 137))
|
|
{ AutoIncrementYWritable = false });
|
|
}
|
|
|
|
#endregion Tabella Sintesi Componenti Portafoglio
|
|
|
|
#endregion Sezione Sintesi Componenti
|
|
#region Nota a pie' pagina
|
|
if (_stampaNota)
|
|
{
|
|
AddElement(new SpacePDF(15));
|
|
AddElement(new FormattedTextAreaPDF(string.Format("{0}", nota), EnvironmentFacade.RendererFacade.XLeftLimit) { Y = 700, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify, AutoIncrementYWritable = false, FontSize = 7, AbsolutePosition = true });
|
|
}
|
|
#endregion Nota a pie' pagina
|
|
}
|
|
else
|
|
{
|
|
#region Nota a pie' pagina
|
|
if (_stampaNota)
|
|
{
|
|
AddElement(new SpacePDF(15));
|
|
AddElement(new FormattedTextAreaPDF(string.Format("{0}", nota), EnvironmentFacade.RendererFacade.XLeftLimit) { Y = 300, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify, AutoIncrementYWritable = false, FontSize = 7, AbsolutePosition = true });
|
|
}
|
|
#endregion Nota a pie' pagina
|
|
|
|
}
|
|
#endregion Sezione Sintesi Componenti
|
|
|
|
#region Sezione Dettaglio Componenti
|
|
|
|
if (_visualizzaDettaglioComponenti)
|
|
{
|
|
#region Nota a pie' pagina e cambio pagina
|
|
//if (_stampaNota)
|
|
//{
|
|
// AddElement(new SpacePDF(15));
|
|
// //AddElement(new FormattedTextAreaPDF(string.Format("{0}", nota), EnvironmentFacade.RendererFacade.XLeftLimit) { FontSize = 7, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify });
|
|
// AddElement(new FormattedTextAreaPDF(string.Format("{0}", nota), EnvironmentFacade.RendererFacade.XLeftLimit) { Y = 700, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify, AutoIncrementYWritable = false, FontSize = 7, AbsolutePosition = true });
|
|
//}
|
|
|
|
AddElement(new ImagePDF(435, 0.15F, "changepage.png") { Y = 745 - 5, AutoIncrementYWritable = false });
|
|
AddElement(new FormattedTextAreaPDF("continua alla pagina successiva", 450, 200) { Y = 745 - 5, AutoIncrementYWritable = false, FontSize = 6, AbsolutePosition = true });
|
|
|
|
AddElement(new PagePDF());
|
|
|
|
AddElement(new SpacePDF(2));
|
|
|
|
AddElement(new ImagePDF(37, 0.15F, "changepage.png") { AutoIncrementYWritable = false });
|
|
AddElement(new FormattedTextAreaPDF("continua dalla pagina precedente", 37 + 15, 200) { FontSize = 6, AutoIncrementYWritable = true });
|
|
|
|
#endregion Nota a pie' pagina e cambio pagina
|
|
|
|
#region Titolo e Testo Introduttivo
|
|
|
|
AddElement(new SpacePDF(20));
|
|
|
|
string titoloDettaglio = "Dettaglio delle componenti di diversificazione";
|
|
|
|
AddElement(new FormattedTextAreaPDF(titoloDettaglio, EnvironmentFacade.RendererFacade.XLeftLimit) { FontSize = 10, FontBold = true, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify });
|
|
AddElement(new SpacePDF(10));
|
|
|
|
string testoIntroDettaglio = string.Empty;
|
|
|
|
testoIntroDettaglio = testi.Rows[0]["testo5"].ToString();
|
|
|
|
testoIntroDettaglio = Helper.ReplaceVariables(testoIntroDettaglio, EnvironmentFacade.ReportEnvironment);
|
|
|
|
AddElement(new FormattedTextAreaPDF(testoIntroDettaglio, EnvironmentFacade.RendererFacade.XLeftLimit) { FontSize = 7, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify });
|
|
AddElement(new SpacePDF(20));
|
|
|
|
#endregion Titolo e Testo Introduttivo
|
|
|
|
#region Tabella Dettaglio Componenti Attuale
|
|
|
|
AddElement(new ImagePDF(EnvironmentFacade.RendererFacade.XLeftLimit + 10, 0.20f, "PallinoPortafoglioAttuale_new.png") { AutoIncrementYWritable = false, DeltaY = -1 });
|
|
AddElement(new FormattedTextAreaPDF(String.Format("Portafoglio attuale (€){0}", _asteriscoAttuale), EnvironmentFacade.RendererFacade.XLeftLimit + 25) { FontSize = 7, FontBold = true, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify, AutoIncrementYWritable = false });
|
|
AddElement(new FormattedTextAreaPDF(Helper.FormatCurrency(portafoglioAttuale), EnvironmentFacade.RendererFacade.XLeftLimit + 220) { FontSize = 7, FontBold = true, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify });
|
|
|
|
AddElement(new SpacePDF(10));
|
|
|
|
AddElement(new ImagePDF(EnvironmentFacade.RendererFacade.XLeftLimit + 10, 0.20f, "PallinoPortafoglioProposto_new.png") { AutoIncrementYWritable = false, DeltaY = -1 });
|
|
AddElement(new FormattedTextAreaPDF(String.Format("Portafoglio proposto (€){0}", _asteriscoProposto), EnvironmentFacade.RendererFacade.XLeftLimit + 25) { FontSize = 7, FontBold = true, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify, AutoIncrementYWritable = false });
|
|
AddElement(new FormattedTextAreaPDF(Helper.FormatCurrency(portafoglioProposto), EnvironmentFacade.RendererFacade.XLeftLimit + 220) { FontSize = 7, FontBold = true, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify });
|
|
|
|
AddElement(new SpacePDF(10));
|
|
|
|
if (dati.Tables["DettaglioComponentiPortafoglio"].Rows.Count > 0)
|
|
{
|
|
#region Definizione e Creazione
|
|
var tabellaDettaglioComponentiPortafoglio = new TablePDF(EnvironmentFacade.RendererFacade.XLeftLimit, dati.Tables["DettaglioComponentiPortafoglio"])
|
|
{
|
|
Style = Style.ConsulenzaUnica,
|
|
AlternateRow = false,
|
|
ShowSeparationLines = true,
|
|
RowHeight = 30,
|
|
Footer = false,
|
|
HeaderHeight = 30,
|
|
HideLastSeparationLine = false,
|
|
AdditionalSpaceBetweenHeadersAndTable = 3
|
|
};
|
|
|
|
tabellaDettaglioComponentiPortafoglio.Columns.Add(new ColumnPDF("Componente", 210, HorizontalAlignmentType.Sinistra, false, false, 7, ColumnType.Decimale, "Componente", "Componenti diversificazione di portafoglio") { HeaderFontSize = 7, FontSize = 7 });
|
|
tabellaDettaglioComponentiPortafoglio.Columns.Add(new ColumnPDF("DiversificazioneAObject", 155, HorizontalAlignmentType.Destra, false, false, 7, ColumnType.Objectpdf, "DiversificazioneAttuale", "Portafoglio attuale") { VerticalAlignment = VerticalAlignmentType.Centrato, HeaderFontSize = 7, FontSize = 7, DeltaYContent = 6, HeaderPaddingRight = 30 });
|
|
tabellaDettaglioComponentiPortafoglio.Columns.Add(new ColumnPDF("DiversificazionePObject", 155, HorizontalAlignmentType.Sinistra, false, false, 7, ColumnType.Objectpdf, "DiversificazioneAttuale", "Portafoglio proposto") { VerticalAlignment = VerticalAlignmentType.Centrato, HeaderFontSize = 7, FontSize = 7, DeltaYContent = 6, HeaderPaddingLeft = 30 });
|
|
|
|
#endregion Definizione e Creazione
|
|
|
|
#region Creazione Stacked Bar
|
|
i = 0;
|
|
list = new List<double>();
|
|
list.Add(Convert.ToDouble(dati.Tables["DettaglioComponentiPortafoglio"].AsEnumerable().Max(x => x["DiversificazioneAttuale"])));
|
|
list.Add(Convert.ToDouble(dati.Tables["DettaglioComponentiPortafoglio"].AsEnumerable().Max(x => x["DiversificazioneProposto"])));
|
|
//valoreMassimo = (float)Helper.Round(list.Max());
|
|
valoreMassimo = 100;
|
|
larghezzaBarra = 0;
|
|
larghezzaSpazioTestoPercentuale = 0;
|
|
larghezzaMinimaSpazioTestoPercentuale = 35;
|
|
deltaXBarra = 0;
|
|
width = tabellaDettaglioComponentiPortafoglio.Columns[1].Width - 50;
|
|
foreach (DataRow row in dati.Tables["DettaglioComponentiPortafoglio"].Rows)
|
|
{
|
|
#region Barra Attuale
|
|
|
|
var colore = new ColorPDF(195, 195, 195);
|
|
tabellaDettaglioComponentiPortafoglio.Row[i].BackgroundGray = Convert.ToBoolean(row["IsHeader"].ToString());
|
|
tabellaDettaglioComponentiPortafoglio.Row[i].FontBold = Convert.ToBoolean(row["IsHeader"].ToString());
|
|
tabellaDettaglioComponentiPortafoglio.Row[i].ForceStyleFontBold = Convert.ToBoolean(row["IsHeader"].ToString());
|
|
if (!Convert.ToBoolean(row["IsHeader"].ToString()))
|
|
tabellaDettaglioComponentiPortafoglio.Cells[0, i].XContentOffset = 20;
|
|
|
|
tabellaDettaglioComponentiPortafoglio.Cells[1, i].HorizontalAlignment = HorizontalAlignmentType.Destra;
|
|
|
|
larghezzaBarra = Helper.GetWidthProportional((float)Convert.ToDecimal(row["DiversificazioneAttuale"]), valoreMassimo, tabellaDettaglioComponentiPortafoglio.Columns[1].Width - 35);
|
|
larghezzaSpazioTestoPercentuale = tabellaDettaglioComponentiPortafoglio.Columns[1].Width - larghezzaBarra;
|
|
deltaXBarra = -larghezzaBarra - 10;
|
|
if (larghezzaSpazioTestoPercentuale < larghezzaMinimaSpazioTestoPercentuale)
|
|
{
|
|
deltaXBarra = -(tabellaDettaglioComponentiPortafoglio.Columns[1].Width - larghezzaMinimaSpazioTestoPercentuale);
|
|
larghezzaSpazioTestoPercentuale = larghezzaMinimaSpazioTestoPercentuale;
|
|
}
|
|
if (Convert.ToDouble(row["DiversificazioneAttuale"]) == 0)
|
|
{
|
|
tabellaDettaglioComponentiPortafoglio.Cells[1, i].ValueObjectList = new List<Business.Entity.ObjectPDF>()
|
|
{
|
|
new RectanglePDF(20, 1 , ColorPDF.Bianco),
|
|
new FormattedTextAreaPDF(row["DiversificazioneAttuale"].ToString()=="0.00"? "0.00" : Helper.FormatDecimal(Convert.ToDecimal(row["DiversificazioneAttuale"]).ToString(), 2),
|
|
0, larghezzaSpazioTestoPercentuale)
|
|
{
|
|
DeltaY = 2,
|
|
TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Right,
|
|
DeltaX = deltaXBarra,
|
|
FontSize = 7
|
|
}
|
|
};
|
|
}
|
|
else
|
|
{
|
|
tabellaDettaglioComponentiPortafoglio.Cells[1, i].ValueObjectList = new List<Business.Entity.ObjectPDF>()
|
|
{
|
|
new RectanglePDF(20, larghezzaBarra , colore),
|
|
new FormattedTextAreaPDF(row["DiversificazioneAttuale"].ToString()=="0.00"? "0.00" : Helper.FormatDecimal(Convert.ToDecimal(row["DiversificazioneAttuale"]).ToString(), 2),
|
|
0, larghezzaSpazioTestoPercentuale)
|
|
{
|
|
DeltaY = 2,
|
|
TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Right,
|
|
DeltaX = deltaXBarra,
|
|
FontSize = 7
|
|
}
|
|
};
|
|
}
|
|
|
|
#endregion Barra Attuale
|
|
|
|
#region Barra Proposto
|
|
|
|
colore = new ColorPDF(91, 155, 213);
|
|
tabellaDettaglioComponentiPortafoglio.Cells[2, i].HorizontalAlignment = HorizontalAlignmentType.Sinistra;
|
|
|
|
larghezzaBarra = Helper.GetWidthProportional((float)Convert.ToDecimal(row["DiversificazioneProposto"]), valoreMassimo, tabellaDettaglioComponentiPortafoglio.Columns[2].Width - 35);
|
|
larghezzaSpazioTestoPercentuale = tabellaDettaglioComponentiPortafoglio.Columns[2].Width - larghezzaBarra;
|
|
deltaXBarra = larghezzaBarra + 10;
|
|
if (larghezzaSpazioTestoPercentuale < larghezzaMinimaSpazioTestoPercentuale)
|
|
{
|
|
deltaXBarra = (tabellaDettaglioComponentiPortafoglio.Columns[2].Width - larghezzaMinimaSpazioTestoPercentuale);
|
|
larghezzaSpazioTestoPercentuale = larghezzaMinimaSpazioTestoPercentuale;
|
|
}
|
|
if (row["DiversificazioneProposto"].ToString() == "0.00")
|
|
{
|
|
tabellaDettaglioComponentiPortafoglio.Cells[2, i].ValueObjectList = new List<Business.Entity.ObjectPDF>()
|
|
{
|
|
new RectanglePDF(20, 1, ColorPDF.Bianco),
|
|
new FormattedTextAreaPDF( "n.c.",
|
|
0,
|
|
30 )
|
|
{
|
|
DeltaY = 2,
|
|
TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Left,
|
|
DeltaX = deltaXBarra,
|
|
FontSize = 7
|
|
}
|
|
};
|
|
}
|
|
else
|
|
{
|
|
tabellaDettaglioComponentiPortafoglio.Cells[2, i].ValueObjectList = new List<Business.Entity.ObjectPDF>()
|
|
{
|
|
new RectanglePDF(20, larghezzaBarra, colore),
|
|
new FormattedTextAreaPDF( Helper.FormatDecimal(Convert.ToDecimal(row["DiversificazioneProposto"]).ToString(), 2),
|
|
0,
|
|
larghezzaSpazioTestoPercentuale)
|
|
{
|
|
DeltaY = 2,
|
|
TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Left,
|
|
DeltaX = deltaXBarra,
|
|
FontSize = 7
|
|
}
|
|
};
|
|
}
|
|
|
|
#endregion Barra Proposto
|
|
|
|
i++;
|
|
}
|
|
#endregion Creazione Stacked Bar
|
|
|
|
AddElement(tabellaDettaglioComponentiPortafoglio);
|
|
//ASSE X
|
|
//axisWidth = Helper.GetWidthProportional(100, valoreMassimo, tabellaDettaglioComponentiFideuram.Columns[1].Width - larghezzaMinimaSpazioTestoPercentuale);
|
|
//XAxisDraw(210, 210 + axisWidth);
|
|
|
|
//ASSE X
|
|
axisWidth = Helper.GetWidthProportional(100, valoreMassimo, tabellaDettaglioComponentiPortafoglio.Columns[1].Width - larghezzaMinimaSpazioTestoPercentuale);
|
|
// asse x attuale
|
|
XAxisDraw(365, Y2TabellaDettaglioComponentiProposto, 365 + axisWidth, Y2TabellaDettaglioComponentiProposto + 2, 2);
|
|
// asse x proposto
|
|
XAxisDraw(365, Y2TabellaDettaglioComponentiProposto, 365 - axisWidth, Y2TabellaDettaglioComponentiProposto + 2, 2);
|
|
|
|
//ASSE Y
|
|
AddElement(new LinePDF(EnvironmentFacade.RendererFacade.XLeftLimit + 365 - 0.5f, Y1TabellaDettaglioComponentiAttuale + 2, EnvironmentFacade.RendererFacade.XLeftLimit + 365 - 0.5f, Y2TabellaDettaglioComponentiProposto + 2, 0.8F, new ColorPDF(137, 137, 137))
|
|
{ AutoIncrementYWritable = false });
|
|
}
|
|
|
|
#endregion Tabella Dettaglio Componenti
|
|
|
|
#region Nota a pie' pagina
|
|
if (_stampaNota)
|
|
{
|
|
//AddElement(new SpacePDF(15));
|
|
//AddElement(new FormattedTextAreaPDF(string.Format("{0}", nota), EnvironmentFacade.RendererFacade.XLeftLimit) { FontSize = 7, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify });
|
|
AddElement(new FormattedTextAreaPDF(string.Format("{0}", nota), EnvironmentFacade.RendererFacade.XLeftLimit) { Y = 700, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify, AutoIncrementYWritable = false, FontSize = 7, AbsolutePosition = true });
|
|
}
|
|
#endregion Nota a pie' pagina
|
|
}
|
|
#endregion Sezione Dettaglio Componenti
|
|
}
|
|
|
|
/// <summary>
|
|
/// Recupera i dati necessari alla Section restituendo un DataTable.
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
protected sealed override DataTable GetDataTable()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Recupera i dati necessari alla Section restituendo un DataSet.
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
protected sealed override DataSet GetDataSet()
|
|
{
|
|
var ds = new DataSet();
|
|
var rischio = datiSeiUnico.rischioUnit().rischio.rischioMercatoCredito;
|
|
|
|
//Adriano 20180125 Per eliminare la gestione profilazione per i nuclei (non più gestita nel WS)
|
|
decimal varMassimoProfiloCliente = datiSeiUnico.piramideModelloUnit().questionarioMifid.profileVarMax;
|
|
|
|
//if (EnvironmentFacade.ReportEnvironment.ReportId == 6)
|
|
//{
|
|
// profilo = 5;
|
|
// varMassimoProfiloCliente = rischio.soglieMassime.FirstOrDefault(o => o.key == profilo).value.varMax;
|
|
//}
|
|
//else
|
|
//{
|
|
// profilo = rischio.profileId;
|
|
// varMassimoProfiloCliente = rischio.soglieMassime.FirstOrDefault(o => o.key == profilo).value.varMax;
|
|
//}
|
|
|
|
//var profilo = rischio.profileId;
|
|
//var varMassimoProfiloCliente = rischio.soglieMassime.FirstOrDefault(o => o.key == profilo).value.varMax;
|
|
//Adriano 20180125
|
|
|
|
//var totCasa = datiSeiUnico.rischioUnit().rischio.rischioCreditoConcetrazione.totaliFideuram;
|
|
//var totTerzi = datiSeiUnico.rischioUnit().rischio.rischioCreditoConcetrazione.totaliAltriIstituti;
|
|
|
|
//var totalePatrimonioCasa = totCasa.risorseFinanziarie + totCasa.partiteViaggianti;
|
|
//var totalePatrimonioTerzi = totTerzi.risorseFinanziarie;
|
|
//var totalePatrimonioFinanziario = totCasa.risorseFinanziarie + totCasa.partiteViaggianti + totTerzi.risorseFinanziarie;
|
|
|
|
//var rischioFideuram = rischio.bancaFideuram;
|
|
//var rischioAltriIstituti = rischio.altriIstituti;
|
|
//var rischioComplessivo = rischio.totale;
|
|
//_presenzaNotaEccessivaAdeguatezza = rischio.eccessivamenteAdeguato;
|
|
|
|
var datiPortaglioAttuale = datiSeiUnico.rischioUnit().adeguatezza.adeguatezzaTopBean.datiPortafoglio;
|
|
var portafoglioproposto = datiSeiUnico.propostaUnit().stDettaglioProposta;
|
|
|
|
#region DataTable Portafoglio
|
|
|
|
ds.Tables.Add(new DataTable("Portafoglio"));
|
|
|
|
ds.Tables["Portafoglio"].Columns.Add(new DataColumn("Portafoglio", typeof(string)));
|
|
ds.Tables["Portafoglio"].Columns.Add(new DataColumn("Controvalore", typeof(decimal)));
|
|
ds.Tables["Portafoglio"].Columns.Add(new DataColumn("GradoCopertura", typeof(decimal)));
|
|
ds.Tables["Portafoglio"].Columns.Add(new DataColumn("DiversificazionePortafoglio", typeof(decimal)));
|
|
ds.Tables["Portafoglio"].Columns.Add(new DataColumn("Red", typeof(int)));
|
|
ds.Tables["Portafoglio"].Columns.Add(new DataColumn("Green", typeof(int)));
|
|
ds.Tables["Portafoglio"].Columns.Add(new DataColumn("Blue", typeof(int)));
|
|
|
|
//ds.Tables["Portafoglio"].Rows.Add("Portafoglio attuale", 400247.20, 75.02, 29.18, 0, 0, 0);
|
|
ds.Tables["Portafoglio"].Rows.Add("Portafoglio attuale",
|
|
datiSeiUnico.ATTUTALE_TOTALEPOSITIVO,
|
|
datiPortaglioAttuale != null ? datiPortaglioAttuale.copertura : 0.00,
|
|
rischio.diversicazioneCasa.beneficio.Count() > 0 ?
|
|
rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("BENEFICIO")).value
|
|
: 0,
|
|
//rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("BENEFICIO")).value,
|
|
195, 195, 195);
|
|
//ds.Tables["Portafoglio"].Rows.Add("Portafoglio proposto", 400247.20, 100.00, 34.82, 157, 195, 230);
|
|
ds.Tables["Portafoglio"].Rows.Add("Portafoglio proposto",
|
|
datiSeiUnico.PROPOSTO_TOTALEPOSITIVO,
|
|
portafoglioproposto.copertura,
|
|
portafoglioproposto.diversificazioneProposta.FirstOrDefault(o => o.key.ToUpper().Equals("BENEFICIO")).value,
|
|
91, 155, 213);
|
|
#endregion DataTable Portafoglio
|
|
|
|
#region DataTable SintesiComponentiPortafoglio
|
|
|
|
ds.Tables.Add(new DataTable("SintesiComponentiPortafoglio"));
|
|
|
|
ds.Tables["SintesiComponentiPortafoglio"].Columns.Add("Componente", typeof(string));
|
|
ds.Tables["SintesiComponentiPortafoglio"].Columns.Add("DiversificazioneAttuale", typeof(decimal));
|
|
ds.Tables["SintesiComponentiPortafoglio"].Columns.Add("DiversificazioneProposto", typeof(decimal));
|
|
|
|
//ds.Tables["SintesiComponentiPortafoglio"].Rows.Add("Diversificazione del rischio mercato", 56, 63);
|
|
ds.Tables["SintesiComponentiPortafoglio"].Rows.Add("Diversificazione del rischio mercato",
|
|
rischio.diversicazioneCasa.beneficio.Count() > 0 ?
|
|
rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOMERCATO")).value
|
|
: 0,
|
|
//rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOMERCATO")).value,
|
|
portafoglioproposto.diversificazioneProposta.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOMERCATO")).value);
|
|
//ds.Tables["SintesiComponentiPortafoglio"].Rows.Add("Diversificazione del rischio credito", 43, 45);
|
|
ds.Tables["SintesiComponentiPortafoglio"].Rows.Add("Diversificazione del rischio credito",
|
|
rischio.diversicazioneCasa.beneficio.Count() > 0 ?
|
|
rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOCREDITO")).value
|
|
: 0,
|
|
//rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOCREDITO")).value,
|
|
portafoglioproposto.diversificazioneProposta.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOCREDITO")).value);
|
|
//ds.Tables["SintesiComponentiPortafoglio"].Rows.Add("Diversificazione del rischio concentrazione", 9, 10);
|
|
ds.Tables["SintesiComponentiPortafoglio"].Rows.Add("Diversificazione del rischio concentrazione",
|
|
rischio.diversicazioneCasa.beneficio.Count() > 0 ?
|
|
rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONECONCENTRAZIONE")).value
|
|
: 0,
|
|
//rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONECONCENTRAZIONE")).value,
|
|
portafoglioproposto.diversificazioneProposta.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONECONCENTRAZIONE")).value);
|
|
|
|
#endregion DataTable SintesiComponentiPortafoglio
|
|
|
|
#region DataTable DettaglioComponentiPortafoglio
|
|
|
|
ds.Tables.Add(new DataTable("DettaglioComponentiPortafoglio"));
|
|
|
|
ds.Tables["DettaglioComponentiPortafoglio"].Columns.Add("Componente", typeof(string));
|
|
ds.Tables["DettaglioComponentiPortafoglio"].Columns.Add("DiversificazioneAttuale", typeof(decimal));
|
|
ds.Tables["DettaglioComponentiPortafoglio"].Columns.Add("DiversificazioneProposto", typeof(decimal));
|
|
ds.Tables["DettaglioComponentiPortafoglio"].Columns.Add("IsHeader", typeof(bool));
|
|
|
|
//ds.Tables["DettaglioComponentiPortafoglio"].Rows.Add("Diversificazione del rischio mercato", 56, 63, true);
|
|
ds.Tables["DettaglioComponentiPortafoglio"].Rows.Add("Diversificazione del rischio mercato",
|
|
rischio.diversicazioneCasa.beneficio.Count() > 0 ?
|
|
rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOMERCATO")).value
|
|
: 0,
|
|
//rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOMERCATO")).value,
|
|
portafoglioproposto.diversificazioneProposta.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOMERCATO")).value,
|
|
true);
|
|
//ds.Tables["DettaglioComponentiPortafoglio"].Rows.Add("breve periodo", 86, 95, false);
|
|
|
|
//ds.Tables["DettaglioComponentiPortafoglio"].Rows.Add("breve periodo",
|
|
// rischio.diversicazioneCasa.beneficio.Count() > 0 ?
|
|
// rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOMERCATOBREVEPERIODO")).value
|
|
// : 0,
|
|
// //rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOMERCATOBREVEPERIODO")).value,
|
|
// portafoglioproposto.diversificazioneProposta.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOMERCATOBREVEPERIODO")).value,
|
|
// false);
|
|
|
|
//ds.Tables["DettaglioComponentiPortafoglio"].Rows.Add("lungo periodo", 95, 100, false);
|
|
|
|
//ds.Tables["DettaglioComponentiPortafoglio"].Rows.Add("lungo periodo",
|
|
// rischio.diversicazioneCasa.beneficio.Count() > 0 ?
|
|
// rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOMERCATOLUNGOPERIODO")).value
|
|
// : 0,
|
|
// //rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOMERCATOLUNGOPERIODO")).value,
|
|
// portafoglioproposto.diversificazioneProposta.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOMERCATOLUNGOPERIODO")).value,
|
|
// false);
|
|
|
|
|
|
|
|
//ds.Tables["DettaglioComponentiPortafoglio"].Rows.Add("Diversificazione del rischio credito", 43, 45, true);
|
|
ds.Tables["DettaglioComponentiPortafoglio"].Rows.Add("Diversificazione del rischio credito",
|
|
rischio.diversicazioneCasa.beneficio.Count() > 0 ?
|
|
rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOCREDITO")).value
|
|
: 0,
|
|
//rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOCREDITO")).value,
|
|
portafoglioproposto.diversificazioneProposta.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOCREDITO")).value,
|
|
true);
|
|
//ds.Tables["DettaglioComponentiPortafoglio"].Rows.Add("risparmio gestito", 85, 94, false);
|
|
ds.Tables["DettaglioComponentiPortafoglio"].Rows.Add("risparmio gestito",
|
|
rischio.diversicazioneCasa.beneficio.Count() > 0 ?
|
|
rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOCREDITOGESTITO")).value
|
|
: 0,
|
|
//rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOCREDITOGESTITO")).value,
|
|
portafoglioproposto.diversificazioneProposta.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOCREDITOGESTITO")).value,
|
|
false);
|
|
//ds.Tables["DettaglioComponentiPortafoglio"].Rows.Add("risparmio amministrato", 20, 23, false);
|
|
ds.Tables["dettagliocomponentiportafoglio"].Rows.Add("risparmio amministrato",
|
|
rischio.diversicazioneCasa.beneficio.Count() > 0 ?
|
|
rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOCREDITOAMMINISTRATI")).value
|
|
: 0,
|
|
//rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOCREDITOAMMINISTRATI")).value,
|
|
portafoglioproposto.diversificazioneProposta.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONERISCHIOCREDITOAMMINISTRATI")).value,
|
|
false);
|
|
//ds.Tables["DettaglioComponentiPortafoglio"].Rows.Add("Diversificazione del rischio concentrazione", 9, 10, true);
|
|
ds.Tables["DettaglioComponentiPortafoglio"].Rows.Add("Diversificazione del rischio concentrazione",
|
|
rischio.diversicazioneCasa.beneficio.Count() > 0 ?
|
|
rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONECONCENTRAZIONE")).value
|
|
: 0,
|
|
//rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONECONCENTRAZIONE")).value,
|
|
portafoglioproposto.diversificazioneProposta.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONECONCENTRAZIONE")).value,
|
|
true);
|
|
//ds.Tables["DettaglioComponentiPortafoglio"].Rows.Add("case di investimento", 40, 55, false);
|
|
ds.Tables["DettaglioComponentiPortafoglio"].Rows.Add("case di investimento",
|
|
rischio.diversicazioneCasa.beneficio.Count() > 0 ?
|
|
rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONECASEINVESTIMENTO")).value
|
|
: 0,
|
|
//rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONECASEINVESTIMENTO")).value,
|
|
portafoglioproposto.diversificazioneProposta.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONECASEINVESTIMENTO")).value,
|
|
false);
|
|
//ds.Tables["DettaglioComponentiPortafoglio"].Rows.Add("numerosità titoli", 20, 36, false);
|
|
ds.Tables["DettaglioComponentiPortafoglio"].Rows.Add("numerosità titoli",
|
|
rischio.diversicazioneCasa.beneficio.Count() > 0 ?
|
|
rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONENUMEROTITOLI")).value
|
|
: 0,
|
|
//rischio.diversicazioneCasa.beneficio.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONENUMEROTITOLI")).value,
|
|
portafoglioproposto.diversificazioneProposta.FirstOrDefault(o => o.key.ToUpper().Equals("DIVERSIFICAZIONENUMEROTITOLI")).value,
|
|
false);
|
|
#endregion DataTable DettaglioComponentiPortafoglio
|
|
|
|
return ds;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Recupera la nota dinamica
|
|
/// </summary>
|
|
/// <param name="nota"></param>
|
|
/// <returns></returns>
|
|
public virtual string GetNote()
|
|
{
|
|
string nota = "";
|
|
string token = "";
|
|
|
|
var pianificazioneVerticale = datiSeiUnico.pianificazioneUnit().pianificazioneVerticale;
|
|
var proposta = datiSeiUnico.propostaUnit().stDettaglioProposta;
|
|
|
|
decimal CCN_ATTUALE = pianificazioneVerticale.contoCorrenteNegativo; //cc negativi del patrimonio casa
|
|
decimal GPELIGOFONDI_ATTUALE = pianificazioneVerticale.liqEligoFondiNeg; // liquidità sottostante la GP Eligo Fondi del patrimonio casa
|
|
decimal GPELIGOTITOLI_ATTUALE = pianificazioneVerticale.liqEligoTitoliNeg; //liquidità sottostante la GP Eligo Titoli del patrimonio casa
|
|
|
|
decimal CCN_PROPOSTO = proposta.contoCorrenteNegativo;
|
|
decimal GPELIGOFONDI_PROPOSTO = proposta.liqEligoFondiNeg;
|
|
decimal GPELIGOTITOLI_PROPOSTO = proposta.liqEligoTitoliNeg;
|
|
|
|
// 20181009 AC
|
|
decimal TUOFOGLIO_ATTUALE = pianificazioneVerticale.liqFogliNeg; // liquidità sottostante Il Mio Foglio del patrimonio casa
|
|
decimal TUOFOGLIO_PROPOSTO = proposta.liqFogliNeg; // liquidità sottostante Il Mio Foglio del patrimonio casa
|
|
//--20181009 AC
|
|
|
|
//**************************************SIMULAZIONE******************************************************
|
|
|
|
//decimal CCN_ATTUALE = 0;
|
|
//decimal GPELIGOFONDI_ATTUALE = 10;
|
|
//decimal GPELIGOTITOLI_ATTUALE = 0;
|
|
//decimal TUOFOGLIO_ATTUALE = 0;
|
|
|
|
//decimal CCN_PROPOSTO = 210;
|
|
//decimal GPELIGOFONDI_PROPOSTO = 0;
|
|
//decimal GPELIGOTITOLI_PROPOSTO = 0;
|
|
//decimal TUOFOGLIO_PROPOSTO = 0;
|
|
|
|
//**************************************FINE SIMULAZIONE*************************************************
|
|
|
|
// 20181009 AC
|
|
//_presenzaNotaPortafoglioAttuale = CCN_ATTUALE != 0 || GPELIGOFONDI_ATTUALE != 0 || GPELIGOTITOLI_ATTUALE != 0;
|
|
|
|
//_presenzaNotaPortafoglioProposto = CCN_PROPOSTO != 0 || GPELIGOFONDI_PROPOSTO != 0 || GPELIGOTITOLI_PROPOSTO != 0;
|
|
//--20181009 AC
|
|
|
|
_presenzaNotaPortafoglioAttuale = CCN_ATTUALE != 0 || GPELIGOFONDI_ATTUALE != 0 || GPELIGOTITOLI_ATTUALE != 0 || TUOFOGLIO_ATTUALE != 0;
|
|
|
|
_presenzaNotaPortafoglioProposto = CCN_PROPOSTO != 0 || GPELIGOFONDI_PROPOSTO != 0 || GPELIGOTITOLI_PROPOSTO != 0 || TUOFOGLIO_PROPOSTO != 0;
|
|
|
|
//decimal GC = 100;
|
|
//decimal OC_CASA = 0;//patrimonioCasa.totaliPatrimonio.partiteViaggianti; //Operazioni in corso del patrimonio casa
|
|
//decimal CC_CASA = 0;// patrimonioCasa.totaliPatrimonio.contoCorrentePositivo; //cc positivo del patrimonio casa
|
|
//decimal CC_TERZI = 0;// patrimonioTerzi.totaliPatrimonio.contoCorrentePositivo; //cc positivo del patrimonio terzi
|
|
//decimal PNR_CASA = 0; //Patrimonio non rappresentabile per macroassetclass del patrimonio casa
|
|
//decimal PNR_TERZI = 0;
|
|
|
|
// 20181009 AC
|
|
//if (CCN_ATTUALE != 0 || GPELIGOFONDI_ATTUALE != 0 || GPELIGOTITOLI_ATTUALE != 0 || CCN_PROPOSTO != 0 || GPELIGOFONDI_PROPOSTO != 0 || GPELIGOTITOLI_PROPOSTO != 0)
|
|
if (CCN_ATTUALE != 0 || GPELIGOFONDI_ATTUALE != 0 || GPELIGOTITOLI_ATTUALE != 0 || TUOFOGLIO_ATTUALE != 0 || CCN_PROPOSTO != 0 || GPELIGOFONDI_PROPOSTO != 0 || GPELIGOTITOLI_PROPOSTO != 0 || TUOFOGLIO_PROPOSTO != 0)
|
|
{
|
|
// 20181009 AC
|
|
//if (CCN_ATTUALE != 0 || GPELIGOFONDI_ATTUALE != 0 || GPELIGOTITOLI_ATTUALE != 0)
|
|
if (CCN_ATTUALE != 0 || GPELIGOFONDI_ATTUALE != 0 || GPELIGOTITOLI_ATTUALE != 0 || TUOFOGLIO_ATTUALE != 0)
|
|
//--20181009 AC
|
|
{
|
|
nota += token + "Il controvalore";
|
|
token = " ";
|
|
nota += token + "del portafoglio attuale esclude il saldo negativo";
|
|
|
|
if (CCN_ATTUALE != 0)
|
|
{
|
|
nota += token + datiSeiUnico.FormatDecimal("dei conti correnti ({0} €)", CCN_ATTUALE);
|
|
token = (TUOFOGLIO_ATTUALE != 0 || GPELIGOFONDI_ATTUALE != 0 || GPELIGOTITOLI_ATTUALE != 0) ? ", " : "";
|
|
}
|
|
// 20181009 AC
|
|
if (TUOFOGLIO_ATTUALE != 0)
|
|
{
|
|
nota += token + datiSeiUnico.FormatDecimal("della liquidità sottostante Il Mio Foglio ({0} €)", TUOFOGLIO_ATTUALE);
|
|
token = (GPELIGOFONDI_ATTUALE != 0 || GPELIGOTITOLI_ATTUALE != 0) ? ", " : "";
|
|
}
|
|
//--20181009 AC
|
|
if (GPELIGOFONDI_ATTUALE != 0)
|
|
{
|
|
nota += token + datiSeiUnico.FormatDecimal("della liquidità sottostante la GP Eligo Fondi ({0} €)", GPELIGOFONDI_ATTUALE);
|
|
token = (GPELIGOTITOLI_ATTUALE != 0) ? ", " : "";
|
|
}
|
|
if (GPELIGOTITOLI_ATTUALE != 0)
|
|
{
|
|
nota += token + datiSeiUnico.FormatDecimal("della liquidità sottostante la GP Eligo Titoli ({0} €)", GPELIGOTITOLI_ATTUALE);
|
|
}
|
|
token = ". ";
|
|
}
|
|
|
|
// 20181009 AC
|
|
//if (CCN_PROPOSTO != 0 || GPELIGOFONDI_PROPOSTO != 0 || GPELIGOTITOLI_PROPOSTO != 0)
|
|
if (CCN_PROPOSTO != 0 || GPELIGOFONDI_PROPOSTO != 0 || GPELIGOTITOLI_PROPOSTO != 0 || TUOFOGLIO_PROPOSTO != 0)
|
|
//--20181009 AC
|
|
{
|
|
nota += token + "Il controvalore";
|
|
token = " ";
|
|
nota += token + "del portafoglio proposto esclude il saldo negativo";
|
|
|
|
// 20181009 AC ELIMINARE??
|
|
//if (CCN_PROPOSTO != 0 || GPELIGOFONDI_PROPOSTO != 0 || GPELIGOTITOLI_PROPOSTO != 0)
|
|
if (CCN_PROPOSTO != 0 || GPELIGOFONDI_PROPOSTO != 0 || GPELIGOTITOLI_PROPOSTO != 0 || TUOFOGLIO_PROPOSTO != 0)
|
|
//--20181009 AC
|
|
{
|
|
if (CCN_PROPOSTO != 0)
|
|
{
|
|
nota += token + datiSeiUnico.FormatDecimal("dei conti correnti ({0} €)", CCN_PROPOSTO);
|
|
token = (TUOFOGLIO_PROPOSTO != 0 || GPELIGOFONDI_PROPOSTO != 0 || GPELIGOTITOLI_PROPOSTO != 0) ? ", " : "";
|
|
}
|
|
// 20181009 AC
|
|
if (TUOFOGLIO_PROPOSTO != 0)
|
|
{
|
|
nota += token + datiSeiUnico.FormatDecimal("della liquidità sottostante Il Mio Foglio ({0} €)", TUOFOGLIO_PROPOSTO);
|
|
token = (GPELIGOFONDI_PROPOSTO != 0 || GPELIGOTITOLI_PROPOSTO != 0) ? ", " : "";
|
|
}
|
|
//--20181009 AC
|
|
if (GPELIGOFONDI_PROPOSTO != 0)
|
|
{
|
|
nota += token + datiSeiUnico.FormatDecimal("della liquidità sottostante la GP Eligo Fondi ({0} €)", GPELIGOFONDI_PROPOSTO);
|
|
token = (GPELIGOTITOLI_PROPOSTO != 0) ? ", " : "";
|
|
}
|
|
if (GPELIGOTITOLI_PROPOSTO != 0)
|
|
{
|
|
nota += token + datiSeiUnico.FormatDecimal("della liquidità sottostante la GP Eligo Titoli ({0} €)", GPELIGOTITOLI_PROPOSTO);
|
|
}
|
|
token = ". ";
|
|
}
|
|
}
|
|
}
|
|
nota += ".";
|
|
nota = !nota.Equals("") ? "(*) " + nota : nota;
|
|
return datiSeiUnico.FormatBanca(nota);
|
|
}
|
|
|
|
private void XAxisDraw(float x1, float x2)
|
|
{
|
|
AddElement(new LinePDF(EnvironmentFacade.RendererFacade.XLeftLimit + x1 - 1, EnvironmentFacade.RendererFacade.XLeftLimit + x2 + 1, 0.8F, new ColorPDF(137, 137, 137))
|
|
{ AutoIncrementYWritable = false });
|
|
|
|
var incr = (x2 - x1) / 5;
|
|
float currentX = EnvironmentFacade.RendererFacade.XLeftLimit + x1;
|
|
|
|
for (int i = 0; i <= 100; i += 20)
|
|
{
|
|
AddElement(new FormattedTextAreaPDF(i.ToString(), currentX, 20) { FontSize = 6, AutoIncrementYWritable = false });
|
|
currentX += incr;
|
|
}
|
|
}
|
|
|
|
private void XAxisDraw(float x1, float y1, float x2, float y2)
|
|
{
|
|
//AddElement(new LinePDF(EnvironmentFacade.RendererFacade.XLeftLimit + x1 - 1, EnvironmentFacade.RendererFacade.XLeftLimit + x2 + 1, 0.8F, new ColorPDF(137, 137, 137))
|
|
AddElement(new LinePDF(EnvironmentFacade.RendererFacade.XLeftLimit + x1, EnvironmentFacade.RendererFacade.XLeftLimit + x2, 0.8F, new ColorPDF(137, 137, 137))
|
|
|
|
{ AutoIncrementYWritable = false });
|
|
|
|
var incr = (x2 - x1) / 5;
|
|
float currentX = EnvironmentFacade.RendererFacade.XLeftLimit + x1;
|
|
|
|
for (int i = 0; i <= 100; i += 20)
|
|
{
|
|
//currentX - 3 serve a centrare la label rispetto al trattino
|
|
AddElement(new FormattedTextAreaPDF(i.ToString(), currentX - 3, 20) { FontSize = 6, AutoIncrementYWritable = false, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Left });
|
|
XAxisLabelLineDraw(currentX, y1, currentX, y2);
|
|
|
|
currentX += incr;
|
|
}
|
|
}
|
|
|
|
private void XAxisDraw(float x1, float y1, float x2, float y2, int interval)
|
|
{
|
|
//AddElement(new LinePDF(EnvironmentFacade.RendererFacade.XLeftLimit + x1 - 1, EnvironmentFacade.RendererFacade.XLeftLimit + x2 + 1, 0.8F, new ColorPDF(137, 137, 137))
|
|
AddElement(new LinePDF(EnvironmentFacade.RendererFacade.XLeftLimit + x1, EnvironmentFacade.RendererFacade.XLeftLimit + x2, 0.8F, new ColorPDF(137, 137, 137))
|
|
|
|
{ AutoIncrementYWritable = false });
|
|
|
|
var incr = (x2 - x1) / interval;
|
|
float currentX = EnvironmentFacade.RendererFacade.XLeftLimit + x1;
|
|
|
|
for (int i = 0; i <= 100; i += (100 / interval))
|
|
{
|
|
//currentX - 3 serve a centrare la label rispetto al trattino
|
|
AddElement(new FormattedTextAreaPDF(i.ToString(), currentX - 3, 20) { FontSize = 6, AutoIncrementYWritable = false, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Left });
|
|
XAxisLabelLineDraw(currentX, y1, currentX, y2);
|
|
|
|
currentX += incr;
|
|
}
|
|
}
|
|
|
|
private void XAxisLabelLineDraw(float x1, float y1, float x2, float y2)
|
|
{
|
|
float leftShift = -0.5f;
|
|
AddElement(new LinePDF(x1 + leftShift, y1, x2 + leftShift, y2, 0.8F, new ColorPDF(137, 137, 137))
|
|
{ AutoIncrementYWritable = false });
|
|
}
|
|
|
|
public virtual string GetTesto1()
|
|
{
|
|
bool isAdeguata = datiSeiUnico.flagAdeguatezzaPro();
|
|
string testo = "";
|
|
string banca = "$/Banca/$";
|
|
banca = /*"altri Istituti";*/ banca.Replace("$/Banca/$", Helper.ReplaceVariables("$/Banca/$", EnvironmentFacade.ReportEnvironment));
|
|
testo = isAdeguata ?
|
|
"In questa scheda è riportato il confronto, in termini di Rischio Mercato (VaR) e di Diversificazione, tra il patrimonio che lei attualmente detiene presso " + banca + " (\"portafoglio attuale\") e il patrimonio derivante dalla presente proposta (\"portafoglio proposto\"). " :
|
|
"In questa scheda è riportato il confronto, in termini di Rischio Mercato (VaR) e di Diversificazione, tra il patrimonio che lei attualmente detiene presso " + banca + " (\"portafoglio attuale\") e il patrimonio derivante dalle operazioni da lei richieste al suo private banker (\"portafoglio prospettico\"). ";
|
|
|
|
return testo;
|
|
}
|
|
}
|
|
}
|