204 lines
11 KiB
C#
204 lines
11 KiB
C#
using System;
|
||
using System.Data;
|
||
using System.Configuration;
|
||
using System.Web;
|
||
using System.Web.Security;
|
||
using System.Web.UI;
|
||
using System.Web.UI.WebControls;
|
||
using System.Web.UI.WebControls.WebParts;
|
||
using System.Web.UI.HtmlControls;
|
||
using System.Collections;
|
||
using System.Collections.Generic;
|
||
using ceTe.DynamicPDF;
|
||
using ceTe.DynamicPDF.Text;
|
||
using PDFGenerator.Presentation.Section.Tables;
|
||
using PDFGenerator.BusinessLayer.DataSection;
|
||
using PDFGenerator.Presentation.Section.Charts;
|
||
using PDFGenerator.BusinessLayer;
|
||
|
||
|
||
namespace PDFGenerator.Presentation.Section
|
||
{
|
||
/********************* Modifiche per Aladdin grafici a barre -- Pino ***************************/
|
||
/************** Modificata l'ereditarieta da STorta a SIstogramma *******************************/
|
||
public class S153 : SIstogramma, ISezione
|
||
{
|
||
public S153()
|
||
{
|
||
//
|
||
// TODO: Add constructor logic here
|
||
//
|
||
}
|
||
|
||
#region ISezione Members
|
||
|
||
public new void writeSezione(DataThread dataThread)
|
||
{
|
||
document = dataThread.DocumentPDF;
|
||
|
||
DataSetS153 set = new DataSetS153();
|
||
set = (DataSetS153)dataThread.Data.DatiSezione;
|
||
|
||
tabTortaTabella = set.Tables["Intermediario"];
|
||
tabTortaTotali = set.Tables["IntermediarioTotale"];
|
||
//tabTortaContoCorrenteBancaFideuram = set.Tables["ContoCorrenteBancaFideuram"];
|
||
tabTotale = set.Tables["Totale"];
|
||
|
||
#region Disclaimer Verticale
|
||
// Modifica per Disclaimer Verticale
|
||
if (isPatrimonioTerzi(dataThread.Rete, dataThread.CodiceFiscale, dataThread.Periodico))
|
||
{
|
||
string sVerticalText = "Le eventuali informazioni riguardanti investimenti da lei detenuti presso altri intermediari vengono elaborate secondo le indicazioni da lei ";
|
||
//if (dataThread.Rete.Equals("F"))
|
||
//{
|
||
// sVerticalText = sVerticalText + "fornite e/ o disponibili sul mercato, per le quali Fideuram non garantisce la completezza e la veridicità. ";
|
||
// sVerticalText = sVerticalText + "La preghiamo di comunicare a Fideuram ogni successiva variazione a tali informazioni, al fine di consentire a Fideuram la correzione e l’aggiornamento dei dati contenuti ";
|
||
// sVerticalText = sVerticalText + "nel presente report.Gli investimenti detenuti presso altri intermediari vengono utilizzati da Fideuram con finalità meramente informative e secondo le indicazioni da lei fornite, ";
|
||
// sVerticalText = sVerticalText + "in modo da offrire una rappresentazione unitaria degli investimenti, senza con ciò formare oggetto di raccomandazioni personalizzate o di rendicontazione ufficiale.";
|
||
//}
|
||
//else
|
||
//{
|
||
// sVerticalText = sVerticalText + "fornite e/ o disponibili sul mercato, per le quali Sanpaolo Invest SIM non garantisce la completezza e la veridicità. ";
|
||
// sVerticalText = sVerticalText + "La preghiamo di comunicare a Sanpaolo Invest SIM ogni successiva variazione a tali informazioni, al fine di consentire a Sanpaolo Invest SIM la correzione e l’aggiornamento dei dati contenuti ";
|
||
// sVerticalText = sVerticalText + "nel presente report.Gli investimenti detenuti presso altri intermediari vengono utilizzati da Sanpaolo Invest SIM con finalità meramente informative e secondo le indicazioni da lei fornite, ";
|
||
// sVerticalText = sVerticalText + "in modo da offrire una rappresentazione unitaria degli investimenti, senza con ciò formare oggetto di raccomandazioni personalizzate o di rendicontazione ufficiale.";
|
||
//}
|
||
|
||
//************************************** Cecco modifiche dicitura IWBANK***********************************
|
||
switch (dataThread.Rete)
|
||
{
|
||
case "F":
|
||
{
|
||
sVerticalText = sVerticalText + "fornite e/ o disponibili sul mercato, per le quali Fideuram non garantisce la completezza e la veridicità. ";
|
||
sVerticalText = sVerticalText + "La preghiamo di comunicare a Fideuram ogni successiva variazione a tali informazioni, al fine di consentire a Fideuram la correzione e l’aggiornamento dei dati contenuti ";
|
||
sVerticalText = sVerticalText + "nel presente report.Gli investimenti detenuti presso altri intermediari vengono utilizzati da Fideuram con finalità meramente informative e secondo le indicazioni da lei fornite, ";
|
||
sVerticalText = sVerticalText + "in modo da offrire una rappresentazione unitaria degli investimenti, senza con ciò formare oggetto di raccomandazioni personalizzate o di rendicontazione ufficiale.";
|
||
break;
|
||
}
|
||
case "S":
|
||
{
|
||
sVerticalText = sVerticalText + "fornite e/ o disponibili sul mercato, per le quali Fideuram S.p.A. non garantisce la completezza e la veridicità. ";
|
||
sVerticalText = sVerticalText + "La preghiamo di comunicare a Fideuram S.p.A. ogni successiva variazione a tali informazioni, al fine di consentire alla Banca la correzione e l’aggiornamento dei dati contenuti ";
|
||
sVerticalText = sVerticalText + "nel presente report.Gli investimenti detenuti presso altri intermediari vengono utilizzati da Fideuram S.p.A., tramite la ‘‘rete di private banker Sanpaolo Invest’’ con finalità meramente informative e secondo le indicazioni da lei fornite, ";
|
||
sVerticalText = sVerticalText + "in modo da offrire una rappresentazione unitaria degli investimenti, senza con ciò formare oggetto di raccomandazioni personalizzate o di rendicontazione ufficiale.";
|
||
break;
|
||
}
|
||
case "W":
|
||
{
|
||
sVerticalText = sVerticalText + "fornite e/ o disponibili sul mercato, per le quali IW Private Investments non garantisce la completezza e la veridicità. ";
|
||
sVerticalText = sVerticalText + "La preghiamo di comunicare a IW Private Investments ogni successiva variazione a tali informazioni, al fine di consentire a IW Private Investments la correzione e l’aggiornamento dei dati contenuti ";
|
||
sVerticalText = sVerticalText + "nel presente report.Gli investimenti detenuti presso altri intermediari vengono utilizzati da IW Private Investments con finalità meramente informative e secondo le indicazioni da lei fornite, ";
|
||
sVerticalText = sVerticalText + "in modo da offrire una rappresentazione unitaria degli investimenti, senza con ciò formare oggetto di raccomandazioni personalizzate o di rendicontazione ufficiale.";
|
||
break;
|
||
}
|
||
}
|
||
//*********************************************************************************************
|
||
|
||
ceTe.DynamicPDF.PageElements.TextArea testoPaginaVerticale = null;
|
||
testoPaginaVerticale = new ceTe.DynamicPDF.PageElements.TextArea(sVerticalText, document.getMargineLeft() - 30, 750, 620, 100)
|
||
{
|
||
Angle = 270,
|
||
Align = ceTe.DynamicPDF.TextAlign.Justify,
|
||
FontSize = 5
|
||
};
|
||
|
||
ceTe.DynamicPDF.Merger.ImportedPage page = document.getCurrentPage();
|
||
if (sVerticalText != "")
|
||
page.Elements.Add(testoPaginaVerticale);
|
||
|
||
}
|
||
// Fine Modifica per Disclaimer Verticale
|
||
#endregion
|
||
|
||
|
||
base.writeSezione(dataThread);
|
||
|
||
//document.setSezTitolo(dataThread.SezioneReport.Titolo);
|
||
|
||
string nota = "";
|
||
FormatNum formatter = new FormatNum();
|
||
|
||
if (dataThread.TotalNegativeCurrentAccountValue != 0 && dataThread.TotalSelfNegCurrentAccountValue == 0)
|
||
{
|
||
nota = "(*) Il controvalore esclude il saldo negativo del conto corrente ({0} €)";
|
||
nota = string.Format(nota, formatter.ConvertNum(dataThread.TotalNegativeCurrentAccountValue));
|
||
}
|
||
else if (dataThread.TotalNegativeCurrentAccountValue == 0 && dataThread.TotalSelfNegCurrentAccountValue != 0)
|
||
{
|
||
nota = "(*) Il controvalore esclude il saldo negativo della liquidità sottostante le linee “GP Eligo” ({0} €)";
|
||
nota = string.Format(nota, formatter.ConvertNum(dataThread.TotalSelfNegCurrentAccountValue));
|
||
}
|
||
else if (dataThread.TotalNegativeCurrentAccountValue != 0 && dataThread.TotalSelfNegCurrentAccountValue != 0)
|
||
{
|
||
nota = "(*) Il controvalore esclude il saldo negativo del conto corrente ({0} €) e il saldo negativo della liquidità sottostante le linee “GP Eligo” ({1} €)";
|
||
nota = string.Format(nota, formatter.ConvertNum(dataThread.TotalNegativeCurrentAccountValue), formatter.ConvertNum(dataThread.TotalSelfNegCurrentAccountValue));
|
||
}
|
||
|
||
if (!nota.Equals(""))
|
||
{
|
||
//document.setSezFooter(nota, dim + 15, 0, 7);
|
||
document.setSezFooter(nota, dim - 20, 0, 7);
|
||
dim += -20;
|
||
}
|
||
|
||
|
||
//if (dataThread.TotalNegativeCurrentAccountValue != 0)
|
||
//{
|
||
// FormatNum formatter = new FormatNum();
|
||
// string ccneg = formatter.ConvertNum(dataThread.TotalNegativeCurrentAccountValue);
|
||
// document.setSezFooter(string.Format(Resource.S1_DiagnosesFootNote, ccneg), dim, 0, 7);
|
||
// dim += 15;
|
||
//}
|
||
|
||
if (dim > ChartHeigth)
|
||
document.setLastPos(dim);
|
||
else
|
||
document.setLastPos(ChartHeigth);
|
||
|
||
}
|
||
|
||
#endregion
|
||
|
||
private bool isPatrimonioTerzi(string pRete, string pCodiceFiscale, bool pPeriodico)
|
||
{
|
||
var parametri = new List<Parametro>
|
||
{
|
||
new Parametro
|
||
{
|
||
Direction = ParameterDirection.Input,
|
||
DbType = DbType.String,
|
||
ParameterName = "Rete",
|
||
Value = pRete
|
||
},
|
||
new Parametro
|
||
{
|
||
Direction = ParameterDirection.Input,
|
||
DbType = DbType.String,
|
||
ParameterName = "CodiceFiscale",
|
||
Value = pCodiceFiscale
|
||
}
|
||
|
||
};
|
||
|
||
|
||
if (pPeriodico)
|
||
{
|
||
var dsBatch = DataAccess.ExecuteDataSetStoredProcedure(DBProvider.SqlServerStampeC6, "[C6MartPeriodico].[PL_D2_S162DettaglioProdotti]", parametri);
|
||
if (dsBatch.Tables[0].Rows.Count > 0)
|
||
return true;
|
||
else
|
||
return false;
|
||
}
|
||
else
|
||
{
|
||
var dsBatch = DataAccess.ExecuteDataSetStoredProcedure(DBProvider.SqlServerStampeC6, "[C6Mart].[PL_D2_S162DettaglioProdotti]", parametri);
|
||
if (dsBatch.Tables[0].Rows.Count > 0)
|
||
return true;
|
||
else
|
||
return false;
|
||
}
|
||
}
|
||
|
||
}
|
||
}
|