180 lines
7.3 KiB
C#
180 lines
7.3 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 ceTe.DynamicPDF;
|
|
using ceTe.DynamicPDF.Text;
|
|
using PDFGenerator.Presentation.Section.Tables;
|
|
using PDFGenerator.BusinessLayer.DataSection;
|
|
using PDFGenerator.BusinessLayer;
|
|
using System.Resources;
|
|
using System.Reflection;
|
|
|
|
namespace PDFGenerator.Presentation.Section
|
|
{
|
|
class S129 : ISezione
|
|
{
|
|
private string _header = "";
|
|
|
|
public string Header
|
|
{
|
|
get { return _header; }
|
|
set { _header = value; }
|
|
}
|
|
|
|
private TipoReport _tipologiaReport;
|
|
public TipoReport TipologiaReport
|
|
{
|
|
get { return _tipologiaReport; }
|
|
set { _tipologiaReport = value; }
|
|
}
|
|
|
|
private string _testoIntroduttivo = string.Empty;
|
|
public string TestoIntroduttivo
|
|
{
|
|
get { return _testoIntroduttivo; }
|
|
set { _testoIntroduttivo = value; }
|
|
}
|
|
|
|
private string _testoChiusura = string.Empty;
|
|
public string TestoChiusura
|
|
{
|
|
get { return _testoChiusura; }
|
|
set { _testoChiusura = value; }
|
|
}
|
|
|
|
|
|
public S129()
|
|
{
|
|
//
|
|
// TODO: Add constructor logic here
|
|
//
|
|
}
|
|
|
|
#region ISezione Members
|
|
|
|
public void writeSezione(DataThread dataThread)
|
|
{
|
|
|
|
DocumentPDF document = dataThread.DocumentPDF;
|
|
DataSetS129 set = (DataSetS129)dataThread.Data.DatiSezione;
|
|
ceTe.DynamicPDF.Merger.ImportedPage page = document.getCurrentPage();
|
|
|
|
document.setSezTitolo(dataThread.SezioneReport.Titolo);
|
|
document.setChapterHeader(dataThread.SezioneReport.TestoIntroduttivo.Replace("/$Banca$/", dataThread.NomeRete), 0, 520, 8);
|
|
|
|
float YTable = document.getLastPos();
|
|
float XTable = document.getMargineLeft();
|
|
|
|
#region TOTALE PATRIMONIO
|
|
string intestazioneColonnaTabella = "Patrimonio " + dataThread.NomeRete;
|
|
string intestazioneColonnaData = "Situazione al " + dataThread.DataFineTrimestreCorrente.ToShortDateString();
|
|
DatiTabella totalitab = new DatiTabella();
|
|
totalitab.table = set.Tables["Totali"];
|
|
totalitab.SetRowDim(15);
|
|
Tabella tabellaTotale = new Tabella(XTable, YTable);
|
|
tabellaTotale.LineaFineTabella = true;
|
|
tabellaTotale.AltezzaCella = 15;
|
|
tabellaTotale.SaltoPagina = false;
|
|
tabellaTotale.Header = true;
|
|
tabellaTotale.Colonne.Add(new Colonna("Descrizione", intestazioneColonnaTabella, 312, TipoAllineamento.SINISTRA, true, 9, false));
|
|
tabellaTotale.Colonne.Add(new Colonna("Controvalore", intestazioneColonnaData, 200, TipoAllineamento.DESTRA, true, 9, false));
|
|
tabellaTotale.Draw(totalitab, document);
|
|
#endregion
|
|
|
|
document.setLastPos(((totalitab.getNumRow() + 1) * totalitab.GetRowDim()) - 30);
|
|
|
|
# region controvalore trimestre precedente
|
|
DatiTabella controvaloreTrimPrecDatiTab = new DatiTabella();
|
|
controvaloreTrimPrecDatiTab.table = set.Tables["ControvaloreTrimPrec"];
|
|
controvaloreTrimPrecDatiTab.SetRowDim(15);
|
|
controvaloreTrimPrecDatiTab.setIsLinee(1);
|
|
controvaloreTrimPrecDatiTab.setCell(312, ceTe.DynamicPDF.TextAlign.Left, Globals.OpenTypeFontVerdana, false);
|
|
controvaloreTrimPrecDatiTab.setCell(200, ceTe.DynamicPDF.TextAlign.Right, Globals.OpenTypeFontVerdana, false);
|
|
controvaloreTrimPrecDatiTab.setX(XTable);
|
|
Tabella patrimonioControvTab = new Tabella();
|
|
|
|
# endregion
|
|
|
|
# region movimenti ultimo trimestre
|
|
DatiTabella movimentiUltTrimDatiTab = new DatiTabella();
|
|
movimentiUltTrimDatiTab.table = set.Tables["MovimentiUltTrim"];
|
|
movimentiUltTrimDatiTab.SetRowDim(15);
|
|
movimentiUltTrimDatiTab.setIsLinee(1);
|
|
movimentiUltTrimDatiTab.setCell(312, ceTe.DynamicPDF.TextAlign.Left, Globals.OpenTypeFontVerdana, false);
|
|
movimentiUltTrimDatiTab.setCell(200, ceTe.DynamicPDF.TextAlign.Right, Globals.OpenTypeFontVerdana, false);
|
|
movimentiUltTrimDatiTab.setX(XTable);
|
|
Tabella patrimonioMovimentiTab = new Tabella();
|
|
patrimonioMovimentiTab.AltezzaCella = 15;
|
|
|
|
# endregion
|
|
|
|
# region utile / perdita
|
|
DatiTabella utilePerditaDatiTab = new DatiTabella();
|
|
utilePerditaDatiTab.table = set.Tables["UtilePerdita"];
|
|
utilePerditaDatiTab.SetRowDim(15);
|
|
utilePerditaDatiTab.setIsLinee(1);
|
|
//utilePerditaDatiTab.setCell(312, ceTe.DynamicPDF.TextAlign.Left, Globals.OpenTypeFontVerdana, false);
|
|
//utilePerditaDatiTab.setCell(200, ceTe.DynamicPDF.TextAlign.Right, Globals.OpenTypeFontVerdana, false);
|
|
//utilePerditaDatiTab.setX(document.getMargineLeft());
|
|
Tabella utilePerditaTab = new Tabella();
|
|
utilePerditaTab.X = XTable;
|
|
utilePerditaTab.AltezzaCella = 15;
|
|
utilePerditaTab.LineaFineTabella = true;
|
|
utilePerditaTab.Colonne.Add(new Colonna("Descrizione", "Descrizione", 312, TipoAllineamento.SINISTRA, true, 9, false));
|
|
utilePerditaTab.Colonne.Add(new Colonna("valore", "valore", 200, TipoAllineamento.DESTRA, true, 9, false));
|
|
|
|
|
|
# endregion
|
|
|
|
|
|
|
|
if (!dataThread.NoMonitoraggio)
|
|
{
|
|
YTable = document.getLastPos();
|
|
controvaloreTrimPrecDatiTab.setY(YTable);
|
|
document.InsertTable(patrimonioControvTab.getTabella(controvaloreTrimPrecDatiTab));
|
|
|
|
YTable += controvaloreTrimPrecDatiTab.GetRowDim();
|
|
|
|
movimentiUltTrimDatiTab.setY(YTable);
|
|
document.InsertTable(patrimonioMovimentiTab.getTabella(movimentiUltTrimDatiTab));
|
|
|
|
YTable += movimentiUltTrimDatiTab.GetRowDim();
|
|
|
|
ceTe.DynamicPDF.PageElements.Line line = new ceTe.DynamicPDF.PageElements.Line(document.getMargineLeft(), YTable, 555, YTable, new RgbColor(235, 235, 236));
|
|
page.Elements.Add(line);
|
|
|
|
YTable += 2;
|
|
|
|
line = new ceTe.DynamicPDF.PageElements.Line(document.getMargineLeft(), YTable, 555, YTable, new RgbColor(235, 235, 236));
|
|
page.Elements.Add(line);
|
|
|
|
YTable += 34;
|
|
|
|
utilePerditaTab.Y = YTable;
|
|
utilePerditaTab.Draw(utilePerditaDatiTab, document);
|
|
|
|
document.setLastPos(
|
|
(controvaloreTrimPrecDatiTab.GetRowDim()) +
|
|
(movimentiUltTrimDatiTab.GetRowDim()) +
|
|
(2 + 34 - 23));
|
|
|
|
}
|
|
else document.setLastPos(0);
|
|
|
|
|
|
}
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
|
}
|