using System; using Consulenza.ReportWriter.Business; using Consulenza.ReportWriter.Business.OBJ_PDF; using System.Data; using Consulenza.ReportCommon; using Consulenza.ReportWriter.Manager.Integration; using System.Linq; using Consulenza.ReportWriter.Business.CHART_PDF; using System.Collections.Generic; using Consulenza.ReportWriter.Business.Entity; using Consulenza.DataServices.fideuram.data.service; using Consulenza.ReportWriter.Business.CUSTOM_PDF.ConsulenzaUnica; using Dundas.Charting.WebControl; namespace Consulenza.ReportWriter.Manager.Section.Unica { public class S69 : Entity.Section { /// /// S69.MonitoraggioProgetto idSezione = 112 /// public S69(EnvironmentFacade environmentFacade, int idSection) : base(environmentFacade, idSection) { try { Draw(); } catch (Exception ex) { SectionLogger.Write("S69", ex.Message, SectionLoggerMessageLevel.E, EnvironmentFacade.ReportEnvironment); } } protected override sealed void Draw() { var areaMonitorata = datiSeiUnico.monitoraggioUnit().monitoraggio.FirstOrDefault(o => o.area.Equals("Inv")); if (areaMonitorata != null) { var progetti = areaMonitorata.progetti.Where(o => o.idMonitoraggio != 0); foreach (var item in progetti) { string titolospezzato = item.nomeProgetto.Length > 23 ? item.nomeProgetto.Substring(0, 23) + "..." : item.nomeProgetto; AddElement(new PagePDF(PagePDF.PagePDFType.Generic)); var intestazione = new SectionHeadingPDF( // BugFix #3727 - Modifica intestazione "Monitoraggio: progetto «" + titolospezzato + "»", string.Format(GetTesto1(item.nomeProgetto)), EnvironmentFacade.RendererFacade.XLeftLimit, EnvironmentFacade.RendererFacade.YUpperLimit, EnvironmentFacade.ReportEnvironment.FontFamily ); AddElement(intestazione.ToElement()); Draw(item.chiaveProgetto, item.nomeProgetto); } } } public virtual void Draw(long chiaveProgetto, string nomeProgetto) { var dati = GetDataSet(chiaveProgetto); // 1st table var dati1 = dati.Tables["risorseApportate"].Clone(); var dati2 = dati.Tables["risorseApportate"].Clone(); var dati3 = dati.Tables["risorseApportate"].Clone(); dati1.Rows.Clear(); dati2.Rows.Clear(); dati3.Rows.Clear(); for (int i = 0; i < 3; i++) { dati1.Rows.Add(dati.Tables["risorseApportate"].Rows[i].ItemArray); } for (int i = 3; i < 5; i++) { dati2.Rows.Add(dati.Tables["risorseApportate"].Rows[i].ItemArray); } for (int i = 5; i < dati.Tables["risorseApportate"].Rows.Count; i++) { dati3.Rows.Add(dati.Tables["risorseApportate"].Rows[i].ItemArray); } var serieCombination = new List(); #region Tabella delle Risorse Apportate var tabellaRisorseApportate = new TablePDF(EnvironmentFacade.RendererFacade.XLeftLimit, dati1)//dati.Tables["risorseApportate"]) { Style = Style.ConsulenzaUnica, Header = false, Footer = false, AlternateRow = false, RowHeight = 25, ID = "d1" }; //BugFix #3742 - distanziamento da destra tabellaRisorseApportate.Columns.Add(new ColumnPDF("descrizione", 145, HorizontalAlignmentType.Sinistra, true, false, 7, ColumnType.Testo, "descrizione", string.Empty) { PaddingRight = 5, HeaderFontSize = 7 }); tabellaRisorseApportate.Columns.Add(new ColumnPDF("valore", 75, HorizontalAlignmentType.Destra, false, false, 7, ColumnType.Testo, "valore", string.Empty) { PaddingLeft = 5, HeaderFontSize = 7 }); tabellaRisorseApportate.Row[0].BackgroundGray = true; //BugFix #3733 prolungamento riga bianca tabellaRisorseApportate.Cells[0, 0].ColSpan = 2; //BugFix #3731 concatenazione prima riga tabellaRisorseApportate.Cells[0, 0].Value = dati.Tables["risorseApportate"].Rows[0].ItemArray[0].ToString() + " " + dati.Tables["risorseApportate"].Rows[0].ItemArray[1].ToString(); //tabellaRisorseApportate.Cells[0, 3].HorizontalAlignment = HorizontalAlignmentType.Destra; //tabellaRisorseApportate.Cells[0, 2].HorizontalAlignment = HorizontalAlignmentType.Destra; AddElement(tabellaRisorseApportate); var rectangleGray1 = new RectanglePDF(EnvironmentFacade.RendererFacade.XLeftLimit + 145, 1, 75, new ColorPDF(232, 236, 237)) { AutoIncrementYWritable = false, DeltaY = -1 }; var rectangleGray2 = new RectanglePDF(EnvironmentFacade.RendererFacade.XLeftLimit + 145, 1, 75, new ColorPDF(232, 236, 237)) { AutoIncrementYWritable = false, DeltaY = 53.3f }; AddElement(rectangleGray1); AddElement(rectangleGray2); var tabellaRisorseApportate2 = new TablePDF(EnvironmentFacade.RendererFacade.XLeftLimit + 45, dati2) { Style = Style.ConsulenzaUnica, Header = false, Footer = false, AlternateRow = false, RowHeight = 25, ID = "d2", YOffset = 1f }; tabellaRisorseApportate2.ShowSeparationLines = true; tabellaRisorseApportate2.WidthSeparationLines = 0.2f; tabellaRisorseApportate2.Columns.Add(new ColumnPDF("descrizione", 100, HorizontalAlignmentType.Sinistra, true, false, 7, ColumnType.Testo, "descrizione", string.Empty)); tabellaRisorseApportate2.Columns.Add(new ColumnPDF("valore", 75, HorizontalAlignmentType.Destra, false, false, 7, ColumnType.Testo, "valore", string.Empty) { PaddingLeft = 5 }); AddElement(tabellaRisorseApportate2); var tabellaRisorseApportate3 = new TablePDF(EnvironmentFacade.RendererFacade.XLeftLimit, dati3) { Style = Style.ConsulenzaUnica, Header = false, Footer = false, AlternateRow = false, RowHeight = 25, ID = "d3", YOffset = 2f }; tabellaRisorseApportate3.Columns.Add(new ColumnPDF("descrizione", 145, HorizontalAlignmentType.Sinistra, true, false, 7, ColumnType.Testo, "descrizione", string.Empty)); tabellaRisorseApportate3.Columns.Add(new ColumnPDF("valore", 75, HorizontalAlignmentType.Destra, false, false, 7, ColumnType.Testo, "valore", string.Empty) { PaddingLeft = 5 }); AddElement(tabellaRisorseApportate3); if (GetNote1(chiaveProgetto).Length > 0) { AddElement(new SpacePDF(7)); AddElement(new FormattedTextAreaPDF(GetNote1(chiaveProgetto), EnvironmentFacade.RendererFacade.XLeftLimit, 520) { FontSize = 6, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify }); AddElement(new SpacePDF(15)); } #endregion AddElement(new ResetterYPDF()); AddElement(new SpacePDF(80)); #region Grafico Risorse Apportate AddElement(new FormattedTextAreaPDF("Valori espressi in migliaia di euro", EnvironmentFacade.RendererFacade.XLeftLimit, 520) { FontSize = 7, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Right }); AddElement(new SpacePDF(7)); var coloreSerieRisorseApportate = new ColorPDF(95, 215, 95); //TODO var coloreSerieControvaloreMonetario = ColorPDF.Nero; //TODO var graficoCombination = new CombinationPDF(EnvironmentFacade.RendererFacade.XLeftLimit + 260, 1F) { Height = 190, Width = 260, MinorGridAxisY = true, ShowLegend = true, LegendWidthColumns = new List { 20, 5, 100 }, LegendSymbolHeight = 1, LegendDeltaX = 50, LegendFontSizeText = 7, LegendSymbolDeltaY = 9, MarginAxisY = 0, ShowLineAxisY = true, ShowLabelAxisY = true, LabelFormatAxisY = FormatType.Intero, IntervalNumberAxisY = 5, StartFromZeroAxisY = true, LabelFormatAxisX = FormatType.DataSenzaOra, ShowLineAxisX = true, ShowLabelAxisX = true, IntervalNumberAxisX = 4, LegendYOffset = 10 }; serieCombination = new List() { new Serie { Name = "RisorseApportate", Type = Dundas.Charting.WebControl.SeriesChartType.Area, Text = "Risorse apportate", Color = coloreSerieRisorseApportate }, new Serie { Name = "ControvaloreMonitorato", Type = Dundas.Charting.WebControl.SeriesChartType.Line, BorderWidth = 3, Text = "Controvalore monitorato", Color = coloreSerieControvaloreMonetario } }; foreach (DataRow item in dati.Tables["risorseApportateMonitorato"].Rows) { #region Serie ControvaloreMonitorato serieCombination[1].Points.Add(new Point { Color = coloreSerieControvaloreMonetario, Values = new ValuesPointXY(Convert.ToDateTime(item["Data"]).ToOADate(), Convert.ToDouble(item["ControvaloreMonitorato"])), ShowLabelAxisY = false, LabelAxisY = "ControvaloreMonitorato", FontSizeLabelAxisY = 7, FontBoldLabelAxisY = false, ShowLabelAxisX = false }); #endregion #region Serie RisorseApportate serieCombination[0].Points.Add(new Point { Color = coloreSerieRisorseApportate, Values = new ValuesPointXY(Convert.ToDateTime(item["Data"]).ToOADate(), Convert.ToDouble(item["RisorseApportate"])), ShowLabelAxisY = false, LabelAxisY = "RisorseApportate", FontSizeLabelAxisY = 7, FontBoldLabelAxisY = false, ShowLabelAxisX = false }); #endregion } graficoCombination.SeriesCollection = serieCombination; AddElement(graficoCombination); #endregion if (GraficoRendimentoCumulato()) { #region Grafico Rendimento Cumulato AddElement(new SpacePDF(20)); AddElement(new FormattedTextAreaPDF(getTesto2(nomeProgetto), EnvironmentFacade.RendererFacade.XLeftLimit) { FontSize = 7, TextHorizontalAlign = ceTe.DynamicPDF.TextAlign.Justify }); AddElement(new SpacePDF(15)); // BugFix #3763 - Rimuovere % e mostrarlo alla dx dei valori numerici //AddElement(new FormattedTextAreaPDF("%", EnvironmentFacade.RendererFacade.XLeftLimit) { FontSize = 7, TextVerticalDirection = true, DeltaY = 100 }); var coloreSerieRendimentoCumulato = ColorPDF.Nero; var coloreSerieScenarioPessimistico = ColorPDF.Rosso; var coloreSerieScenarioOttimistico = ColorPDF.Blu; var graficoCombination_RendimentoCumulato = new CombinationPDF(EnvironmentFacade.RendererFacade.XLeftLimit + 30, 1F) { Height = 185, Width = 470, MinorGridAxisY = true, //BugFix #3758 - Distanziamento voci legenda LegendWidthColumns = new List { 12, 5, 110 }, LegendSymbolHeight = 1, ShowLegend = false, LegendFontSizeText = 7, LegendSymbolDeltaY = 9, LegendDeltaX = !ConoEvoluzione() ? 230 : RendimentoCumulanto() ? 130 : 180, showZeroInLabel = true, MarginAxisY = 0, ShowLineAxisY = true, ShowLabelAxisY = true, LabelFormatAxisY = FormatType.Decimale2, ShowLineAxisX = true, ShowLabelAxisX = true, LabelFormatAxisX = FormatType.DataShort, LegendYOffset = 6, SeriesCollection = new List(), ChartBaseWidth = 840, ChartBaseHeight = 350 }; #region Serie ScenarioOttimistico Serie ScenarioOttimistico = new Serie() { Name = "ScenarioOttimistico", Type = Dundas.Charting.WebControl.SeriesChartType.Line, Color = coloreSerieScenarioOttimistico, BorderWidth = 2, Text = "Scenario ottimistico ", ShowInLegend = ConoEvoluzione() }; graficoCombination_RendimentoCumulato.SeriesCollection.Add(ScenarioOttimistico); #endregion #region Serie RendimentoCumulato_Punto Serie RendimentoCumulato_Punto = new Serie() { Name = "RendimentoCumulato_Punto", Type = Dundas.Charting.WebControl.SeriesChartType.Point, Text = "", BorderWidth = 2, Color = coloreSerieRendimentoCumulato, ShowInLegend = false, AutoCalculateLastPointLabelPosition = true }; graficoCombination_RendimentoCumulato.SeriesCollection.Add(RendimentoCumulato_Punto); #endregion #region Serie RendimentoCumulato_Linea Serie RendimentoCumulato_Linea = new Serie() { Name = "RendimentoCumulato_Linea", Type = Dundas.Charting.WebControl.SeriesChartType.Line, Color = coloreSerieRendimentoCumulato, BorderWidth = 2, Text = "Rendimento cumulato ", ShowInLegend = RendimentoCumulanto(), AutoCalculateLastPointLabelPosition = true }; graficoCombination_RendimentoCumulato.SeriesCollection.Add(RendimentoCumulato_Linea); #endregion #region Serie ScenarioPessimistico Serie ScenarioPessimistico = new Serie() { Name = "ScenarioPessimistico", Type = Dundas.Charting.WebControl.SeriesChartType.Line, Color = coloreSerieScenarioPessimistico, BorderWidth = 2, Text = "Scenario pessimistico", ShowInLegend = ConoEvoluzione() }; graficoCombination_RendimentoCumulato.SeriesCollection.Add(ScenarioPessimistico); #endregion foreach (DataRow item in dati.Tables["rendimentoCumulato"].Rows) { #region Serie RendimentoCumulato_Punto RendimentoCumulato_Punto.Points.Add(new Point { Color = coloreSerieRendimentoCumulato, Values = new ValuesPointXY(Convert.ToDateTime(item["Data"]).ToOADate(), Convert.ToDouble(item["Percentuale"])), Visible = false, Label = string.Format("Rend. cumulato {0}", Helper.FormatPercentage(Convert.ToDecimal(item["Percentuale"]), 2)), Font = new System.Drawing.Font("verdana", 8.8F), Marker = new PointMarker() { MarkerStyle = MarkerStyle.Circle, MarkerColor = System.Drawing.Color.Black, MarkerSize = 2.5f } }); #endregion #region Serie RendimentoCumulato_Linea RendimentoCumulato_Linea.Points.Add(new Point { Color = coloreSerieRendimentoCumulato, Values = new ValuesPointXY(Convert.ToDateTime(item["Data"]).ToOADate(), Convert.ToDouble(item["Percentuale"])), Visible = RendimentoCumulanto() }); #endregion } var punto = RendimentoCumulato_Punto.Points.Last(); if (punto != null) { punto.Visible = true; } foreach (DataRow item in dati.Tables["Cono"].Rows) { #region Serie Scenario ottimistico ScenarioOttimistico.Points.Add(new Point { Color = coloreSerieScenarioOttimistico, Values = new ValuesPointXY(Convert.ToDateTime(item["Data"]).ToOADate(), Convert.ToDouble(item["ScenarioOttimistico"])), Visible = ConoEvoluzione() }); #endregion #region Serie Scenario pessimistico ScenarioPessimistico.Points.Add(new Point { Color = coloreSerieScenarioPessimistico, Values = new ValuesPointXY(Convert.ToDateTime(item["Data"]).ToOADate(), Convert.ToDouble(item["ScenarioPessimistico"])), Visible = ConoEvoluzione() }); #endregion } AddElement(graficoCombination_RendimentoCumulato); //#region Legenda AddElement(new SpacePDF(25)); #region Legenda 1 float xLegenda = base.EnvironmentFacade.RendererFacade.XLeftLimit + 100; if (ConoEvoluzione()) { AddElement(new RectanglePDF(0.5F, 20, coloreSerieScenarioOttimistico) { DeltaY = 4.5F, X = xLegenda, AutoIncrementYWritable = false }); xLegenda += 12; var ftaNomeLabel = new FormattedTextAreaPDF { Text = "Scenario ottimistico", FontColor = ColorPDF.Nero, DeltaX = 12F, AutoIncrementYWritable = false, X = xLegenda, FontSize = 7 }; xLegenda += 10 + (ftaNomeLabel.Text.Length * 5) + (10 - ftaNomeLabel.Text.Length); AddElement(ftaNomeLabel); } #endregion #region Legenda 2 if (!RendimentoCumulanto()) { AddElement(new ImagePDF(xLegenda, 0.1F, "PallinoPortafoglioAttuale.png") { DeltaY = 2.0F, AutoIncrementYWritable = false }); xLegenda += 5; var ftaNomeLabel = new FormattedTextAreaPDF { Text = "Rendimento cumulato", FontColor = ColorPDF.Nero, DeltaX = 5F, AutoIncrementYWritable = false, X = xLegenda, FontSize = 7 }; xLegenda += 10 + (ftaNomeLabel.Text.Length * 5) + (10 - ftaNomeLabel.Text.Length); AddElement(ftaNomeLabel); } else { AddElement(new RectanglePDF(0.5F, 20, coloreSerieRendimentoCumulato) { DeltaY = 4.5F, X = xLegenda, AutoIncrementYWritable = false }); xLegenda += 12; var ftaNomeLabel = new FormattedTextAreaPDF { Text = "Rendimento cumulato", FontColor = ColorPDF.Nero, DeltaX = 12F, AutoIncrementYWritable = false, X = xLegenda, FontSize = 7 }; xLegenda += 10 + (ftaNomeLabel.Text.Length * 5) + (10 - ftaNomeLabel.Text.Length); AddElement(ftaNomeLabel); } #endregion #region Legenda 3 if (ConoEvoluzione()) { xLegenda += 10; AddElement(new RectanglePDF(0.5F, 20, coloreSerieScenarioPessimistico) { DeltaY = 4, X = xLegenda, AutoIncrementYWritable = false }); xLegenda += 12; var ftaNomeLabel = new FormattedTextAreaPDF { Text = "Scenario pessimistico", FontColor = ColorPDF.Nero, DeltaX = 12F, AutoIncrementYWritable = false, X = xLegenda, FontSize = 7 }; xLegenda += 10 + (ftaNomeLabel.Text.Length * 5) + (10 - ftaNomeLabel.Text.Length); AddElement(ftaNomeLabel); } #endregion //#endregion #endregion } } protected sealed override DataTable GetDataTable() { return null; } protected sealed override DataSet GetDataSet() { return null; } public virtual DataSet GetDataSet(long chiaveProgetto) { var ds = new DataSet(); ds.Tables.Add(new DataTable("risorseApportate")); ds.Tables.Add(new DataTable("risorseApportateMonitorato")); ds.Tables.Add(new DataTable("rendimentoCumulato")); ds.Tables.Add(new DataTable("Cono")); ds.Tables["risorseApportate"].Columns.Add(new DataColumn("Descrizione", typeof(string))); ds.Tables["risorseApportate"].Columns.Add(new DataColumn("Valore", typeof(string))); ds.Tables["risorseApportateMonitorato"].Columns.Add(new DataColumn("Data", typeof(DateTime))); ds.Tables["risorseApportateMonitorato"].Columns.Add(new DataColumn("ControvaloreMonitorato", typeof(decimal))); ds.Tables["risorseApportateMonitorato"].Columns.Add(new DataColumn("RisorseApportate", typeof(decimal))); ds.Tables["rendimentoCumulato"].Columns.Add(new DataColumn("Data", typeof(DateTime))); ds.Tables["rendimentoCumulato"].Columns.Add(new DataColumn("Percentuale", typeof(decimal))); ds.Tables["Cono"].Columns.Add(new DataColumn("Data", typeof(DateTime))); ds.Tables["Cono"].Columns.Add(new DataColumn("ScenarioOttimistico", typeof(decimal))); ds.Tables["Cono"].Columns.Add(new DataColumn("ScenarioPessimistico", typeof(decimal))); var rendimentiCumulati = new andamentoRendimento[0]; var progetto = new progettoMon(); var rendimento = new rendimentoProgetto(); var controvaloreMonitorato_RisorseApportate = new ctvRisorse[0]; var conoPianificazione = new conoBean[0]; var areaMonitorata = datiSeiUnico.monitoraggioUnit().monitoraggio.FirstOrDefault(o => o.area.Equals("Inv")); try { progetto = areaMonitorata.progetti.FirstOrDefault(o => o.chiaveProgetto == chiaveProgetto); rendimento = progetto.rendimentoProgetto; controvaloreMonitorato_RisorseApportate = progetto.ctvRisorse != null ? progetto.ctvRisorse : new ctvRisorse[0]; rendimentiCumulati = progetto.andamentiRedimenti; conoPianificazione = datiSeiUnico.pianificazioneUnit().pianificazioneOrizzontale.FirstOrDefault(o => o.portafoglioModello.area.Equals("Inv") && o.chiaveProgetto == chiaveProgetto).cono; } catch { } #region Tabella e Grafico delle risorse apportate { ds.Tables["risorseApportate"].Rows.Add("MONITORAGGIO ATTIVATO IL", string.Format("{0}", rendimento.dtAvvio.ToShortDateString())); ds.Tables["risorseApportate"].Rows.Add(string.Format("Controvalore (€){0}
(Aggiornato il {1})", GetNote1(chiaveProgetto).Length > 0 ? "*" : "", rendimento.dtCtv.ToShortDateString()), string.Format("{0}", Helper.FormatCurrency(rendimento.ctvMonitorato.ToString()))); ds.Tables["risorseApportate"].Rows.Add("Risorse apportate (€)", string.Format("{0}", Helper.FormatCurrency(rendimento.risorseApportate.ToString()))); ds.Tables["risorseApportate"].Rows.Add("Apporti iniziali", Helper.FormatCurrency(rendimento.apportoIniziale.ToString())); ds.Tables["risorseApportate"].Rows.Add("Movimenti successivi", Helper.FormatCurrency(rendimento.movimentiSuccessivi.ToString())); ds.Tables["risorseApportate"].Rows.Add("Plus/Minusvalenza (€)", Helper.FormatCurrency(rendimento.minusPlusAreaProgetto.ToString())); ds.Tables["risorseApportate"].Rows.Add("Cedole/Dividendi (€)", Helper.FormatCurrency(rendimento.cedoleDividendi.ToString())); ds.Tables["risorseApportate"].Rows.Add("Guadagno/Perdita totale (€)", Helper.FormatCurrency((rendimento.minusPlusAreaProgetto + rendimento.cedoleDividendi).ToString())); string rendimentoAnnualizzato = rendimento.rendimentoAnnualizzato != 0 ? "
(" + Helper.FormatDecimal(rendimento.rendimentoAnnualizzato.ToString(), 2) + " % su base annua)" : ""; if (FlagBaseAnnua()) ds.Tables["risorseApportate"].Rows.Add("Rendimento cumulato (%)", Helper.FormatDecimal(rendimento.rendAvvio.ToString(), 2) + rendimentoAnnualizzato); else ds.Tables["risorseApportate"].Rows.Add("Rendimento cumulato (%)", Helper.FormatDecimal(rendimento.rendAvvio.ToString(), 2)); foreach (var item in from o in controvaloreMonitorato_RisorseApportate orderby o.dtValorizzazione select o) { ds.Tables["risorseApportateMonitorato"].Rows.Add( item.dtValorizzazione, item.ctv / 1000, item.risorseAssociate / 1000); } #endregion if (GraficoRendimentoCumulato()) { #region Grafico del rendimento cumulato foreach (var item in from o in rendimentiCumulati orderby o.dtRendimento select o) { ds.Tables["rendimentoCumulato"].Rows.Add( item.dtRendimento, item.percentuale ); }; foreach (var item in from o in conoPianificazione orderby o.dtRiferimento select o) { ds.Tables["Cono"].Rows.Add( item.dtRiferimento, item.quantileSup * 100, item.quantileInf * 100 ); } #endregion } } return ds; } public virtual bool GraficoRendimentoCumulato() { return GetOption().Valore; } public virtual bool FlagBaseAnnua() { return GetOption().Valore; } public virtual bool ConoEvoluzione() { return GetOption().Valore; } public virtual bool RendimentoCumulanto() { return ConoEvoluzione() ? GetOption().Valore : true; } public virtual string GetTesto1(string nomeProgetto) { return "Nella tabella sulla sinistra sono riportati il controvalore e il dettaglio delle risorse da lei apportate al progetto di investimento \"" + nomeProgetto + "\". Le risorse apportate corrispondono alla somma degli apporti e delle liquidazioni effettuate a partire dalla data di avvio del monitoraggio, al netto di eventuali cedole o dividendi incassati. A seguire sono riportati la minus/plusvalenza del progetto ed il rendimento percentuale. Il grafico sulla destra riporta l’andamento nel tempo del controvalore del progetto rispetto alle risorse da lei apportate, al netto delle cedole e dividendi incassati, a partire dalla data di avvio del monitoraggio."; } public virtual string GetNote1(long chiaveProgetto) { string nota = ""; var areaMonitorata = datiSeiUnico.monitoraggioUnit().monitoraggio.FirstOrDefault(o => o.area.Equals("Inv")); var progetto = areaMonitorata.progetti.LastOrDefault(o => o.chiaveProgetto == chiaveProgetto); if (progetto.scarti != null && progetto.scarti.Length > 0) nota += "(*) Il controvalore esclude alcuni prodotti che non è stato possibile considerare nel calcolo dei rendimenti."; return nota; } public virtual string getTesto2(string nomeProgetto) { string testo = ""; if (ConoEvoluzione() && !RendimentoCumulanto()) testo += "Il grafico riporta il rendimento cumulato, a partire dalla data di avvio del monitoraggio, delle risorse da lei apportate al progetto di investimento \"" + nomeProgetto + "\" (pallino nero), rispetto allo scenario pessimistico (linea rossa) e allo scenario ottimistico (linea blu), stimati all’avvio del monitoraggio."; if (ConoEvoluzione() && RendimentoCumulanto()) testo += "Il grafico riporta il rendimento cumulato, a partire dalla data di avvio del monitoraggio, delle risorse da lei apportate al progetto di investimento \"" + nomeProgetto + "\" (linea nera), rispetto allo scenario pessimistico (linea rossa) e allo scenario ottimistico (linea blu), stimati all’avvio del monitoraggio."; if (!ConoEvoluzione()) testo += "Il grafico riporta l'evoluzione del rendimento cumulato delle risorse da lei apportate al progetto di investimento \"" + nomeProgetto + "\", a partire dalla data di avvio del monitoraggio."; return testo; } } }