67 lines
2.1 KiB
C#
67 lines
2.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using PDFGenerator.BusinessLayer;
|
|
using PDFGenerator.BusinessLayer.DataSection;
|
|
using PDFGenerator.Presentation.Section.Tables;
|
|
using System.Data;
|
|
|
|
namespace PDFGenerator.Presentation.Section
|
|
{
|
|
class S94 : SProfiloDiRischio, ISezione
|
|
{
|
|
string Titolo = string.Empty;
|
|
private string _testoIntroduttivo;
|
|
|
|
public string TestoIntroduttivo
|
|
{
|
|
get { return _testoIntroduttivo; }
|
|
set { _testoIntroduttivo = value; }
|
|
}
|
|
|
|
public S94()
|
|
{
|
|
//
|
|
// TODO: Add constructor logic here
|
|
//
|
|
}
|
|
|
|
public void writeSezione(DataThread dataThread)
|
|
{
|
|
DocumentPDF document = dataThread.DocumentPDF;
|
|
DatiTabella datitab = new DatiTabella();
|
|
DataSetS94 set = (DataSetS94)dataThread.Data.DatiSezione;
|
|
|
|
DataTable dtDatiS94 = set.ProfiloFinanziario;
|
|
|
|
int idProfiloFinanziario = Convert.ToInt32(dtDatiS94.Rows[0]["Profilo"]);
|
|
DateTime dataAggiornamento = Convert.ToDateTime(dtDatiS94.Rows[0]["DataAggiornamento"]);
|
|
decimal varRisorseFinanziarie = Convert.ToDecimal(dtDatiS94.Rows[0]["VaRRisorseFinanziarie"]);
|
|
decimal gradoCopertura = Convert.ToDecimal(dtDatiS94.Rows[0]["GradoCopertura"]);
|
|
|
|
|
|
//calcola se entra nella pagina altrimenti aggiunge una nuova pagina.
|
|
if (document.checkMargin(150))
|
|
document.addPage();
|
|
|
|
document.setSezTitolo(Titolo);
|
|
document.setSezHeader(_testoIntroduttivo);
|
|
//V Cambiato da 5 a 2 per inserire il testo sulle note delle nuove soglie di VaR
|
|
document.setHeaderSpace(2);
|
|
|
|
//Disegno la S94.
|
|
dsParam = dataThread;
|
|
base.disegnaS94(document, idProfiloFinanziario, dataAggiornamento, varRisorseFinanziarie, gradoCopertura);
|
|
|
|
document.setLastPos(150);
|
|
|
|
}
|
|
|
|
public void setTitolo(string label)
|
|
{
|
|
Titolo = label;
|
|
}
|
|
|
|
}
|
|
}
|