55 lines
2.8 KiB
C#
55 lines
2.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Configuration;
|
|
using ceTe.DynamicPDF;
|
|
using ceTe.DynamicPDF.PageElements;
|
|
using ceTe.DynamicPDF.Merger;
|
|
using ceTe.DynamicPDF.Text;
|
|
|
|
namespace Consulenza.PDFLettera
|
|
{
|
|
class LetteraRistampa : LetteraBenvenuto {
|
|
|
|
//private FormattedTextArea saluti;
|
|
|
|
|
|
public LetteraRistampa (string rete, int id, string testo, string nome, string cognome, string indirizzo, string appellativo,string obj,string firma)
|
|
: base(rete,id, testo, nome, cognome,indirizzo,true,appellativo,obj,firma) {
|
|
|
|
string[] valoriTextArea = ConfigurationManager.AppSettings["OffSetLetteraRistampaCliente"].Split(',');
|
|
this.cliente.Height = this.cliente.Height + Convert.ToInt32(valoriTextArea[3]);
|
|
valoriTextArea = ConfigurationManager.AppSettings["OffSetLetteraRistampaOggetto"].Split(',');
|
|
this.oggetto.Width = this.cliente.Width + Convert.ToInt32(valoriTextArea[2]);
|
|
this.oggetto.Y = this.oggetto.Y + Convert.ToInt32(valoriTextArea[1]);
|
|
valoriTextArea = ConfigurationManager.AppSettings["OffSetLetteraRistampaLuogo"].Split(',');
|
|
this.luogo.Y = this.luogo.Y + Convert.ToInt32(valoriTextArea[1]);
|
|
valoriTextArea = ConfigurationManager.AppSettings["OffSetLetteraRistampaCorpo"].Split(',');
|
|
this.corpo.Height = this.corpo.Height + Convert.ToInt32(valoriTextArea[1]);;
|
|
this.corpo.Width = this.corpo.Width + Convert.ToInt32(valoriTextArea[2]);
|
|
this.corpo.Y = this.corpo.Y + Convert.ToInt32(valoriTextArea[1]);
|
|
|
|
valoriTextArea = ConfigurationManager.AppSettings["OffsetLetteraRistampaSaluti"].Split(',');
|
|
this.saluti.X += Convert.ToSingle(valoriTextArea[0]);
|
|
this.saluti.Y += Convert.ToSingle(valoriTextArea[1]);
|
|
this.saluti.Width += Convert.ToSingle(valoriTextArea[2]);
|
|
//this.saluti.Height += Convert.ToSingle(valoriTextArea[0]);
|
|
|
|
this.settaCampi();
|
|
|
|
this.nomeLettera = "LetteraRistampa" + id;
|
|
}
|
|
|
|
protected override void settaCampi() {
|
|
|
|
this.cliente.Text = this.appellativo + "\r\n" + nome + " " + cognome + "\r\n" + indirizzo;
|
|
this.luogo.Text = "<B>Relazione Clientela</B>\r\nRoma, " + dataGenerazione.ToString("dd/MM/yyyy");
|
|
this.oggetto.Text = this.testoOggetto; //"<B>Oggetto: contratto n. " + codiceContratto + " intestato a: " + nome + " " + cognome+"</B>";
|
|
this.corpo.Text = testo;
|
|
this.saluti.Text = this.testoSaluti;
|
|
string[] valoriTextArea = ConfigurationManager.AppSettings["OffsetFirmaRistampa"].Split(',');
|
|
this.firma.X += Convert.ToSingle(valoriTextArea[0]);
|
|
this.firma.Y += Convert.ToSingle(valoriTextArea[1]);
|
|
}
|
|
}
|
|
} |