63 lines
2.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Consulenza.ReportWriter.Business;
using Consulenza.ReportWriter.Business.OBJ_PDF;
using Consulenza.ReportWriter.Manager.Integration;
using System.Data;
using DataAccessLayer;
namespace Consulenza.ReportWriter.Manager.Chapter.Immobiliare.MappaturaPreliminare
{ /// <summary>
/// Scheda di dettaglio dellabitazione (id 136)
/// </summary>
public class S7 : Entity.Chapter
{
public S7(EnvironmentFacade environmentFacade, int idChapter)
: base(environmentFacade, idChapter)
{
Draw();
}
public S7(EnvironmentFacade environmentFacade, int idChapter, bool repeatoneachpage, IntegrationLayout integrationlayout)
: base(environmentFacade, idChapter)
{
RepeatOnEachPage = repeatoneachpage;
IntegrationLayout = integrationlayout;
Draw();
}
/// <summary>
/// Disegno il capitolo S7
/// </summary>
protected override sealed void Draw()
{
//// Integrazione Layout
//var integrationlayout = ((DuplicazioneIdImmobileCatasto)base.IntegrationLayout);
// Aggiungo la pagina
AddElement(new PagePDF(PagePDF.PagePDFType.Generic));
// Evolutiva 201805
DataTable table = new DataTable();
string ImmobileCatasto = IntegrationLayout.ReportStructure.Rows[IntegrationLayout.iRow][18].ToString();
string testoRecord = "Select codtipologia from PatrimonioTerzi pt inner join dbo.DettImmobiliare dett ON dett.chiaveProdottoTerzi = pt.chiaveProdottoTerzi where pt.dtfinevalidita > getdate() and pt.idImmobileCatasto = '" + ImmobileCatasto +"'";
table = DataAccess.ExecuteDataTableSqlStatement(DBProvider.SqlServerConsulenzaUnica, testoRecord, null);
string codTipologia = table.Rows[0][0].ToString();
// Evolutiva 201805
// Modifica ES 20181012 per Estero-Negozi-Uffici
//string testoCapitolo = "Scheda di dettaglio dell'abitazione";
string testoCapitolo = "Scheda di dettaglio abitazioni";
if (codTipologia == "A10")
testoCapitolo = "Scheda di dettaglio uffici e studi privati";
else
{
if (codTipologia == "C1")
testoCapitolo = "Scheda di dettaglio negozi e botteghe";
}
// Fine Evolutiva
// Aggiungo gli elementi
AddElement(new ImagePDF(EnvironmentFacade.RendererFacade.XLeftLimit, 0.20F, "Focus.png") { AutoIncrementYWritable = false });// Icona
AddElement(new FormattedTextAreaPDF(testoCapitolo, EnvironmentFacade.RendererFacade.XLeftLimit + 30) { FontSize = 16, FontColor = ColorPDF.Immobiliare_Marrone, AutoIncrementYWritable = true, FontBold = true }); // Intestazione
}
}
}