62 lines
3.5 KiB
C#
62 lines
3.5 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Text;
|
||
using ceTe.DynamicPDF;
|
||
using ceTe.DynamicPDF.PageElements;
|
||
using ceTe.DynamicPDF.Merger;
|
||
using ceTe.DynamicPDF.Text;
|
||
using System.Configuration;
|
||
using System.Globalization;
|
||
|
||
|
||
class LetteraAccettazioneAttivazioneSeiPosticipata : LetteraBenvenuto{
|
||
|
||
|
||
public LetteraAccettazioneAttivazioneSeiPosticipata (string rete, int id, string testo, string nome, string cognome, string indirizzo, string appellativo,string obj,string firma, TipoContratto contract,int idReportDiagnosi)
|
||
: base(rete, id, testo, nome, cognome,indirizzo,false,appellativo,obj,firma, contract, idReportDiagnosi) {
|
||
this.settaCampi();
|
||
this.nomeLettera = "LetteraAccettazioneAttivazioneSeiPosticipata"+id;
|
||
}
|
||
|
||
protected override void settaCampi() {
|
||
|
||
/*string[] split = this.indirizzo.Split(new string[1] { "\n" }, StringSplitOptions.None);
|
||
string ind = "";
|
||
foreach (string s in split)
|
||
{
|
||
if (s.Length > ind.Length)
|
||
ind = s;
|
||
}*/
|
||
|
||
this.cliente.Text = this.appellativo.Trim() + "\r\n" + nome.Trim() + " " + cognome.Trim() + "\r\n" + this.indirizzo;
|
||
int fontLenght = Convert.ToInt32(ConfigurationManager.AppSettings["fontSize"]);
|
||
float lenght = ceTe.DynamicPDF.Font.TimesRoman.GetTextWidth(this.appellativo.Trim(), fontLenght) > ceTe.DynamicPDF.Font.TimesRoman.GetTextWidth(this.nome.Trim(), fontLenght) ? ceTe.DynamicPDF.Font.TimesRoman.GetTextWidth(this.appellativo.Trim(), fontLenght) : ceTe.DynamicPDF.Font.TimesRoman.GetTextWidth(this.nome.Trim(), fontLenght);
|
||
lenght = lenght > ceTe.DynamicPDF.Font.TimesRoman.GetTextWidth(this.cognome.Trim(), fontLenght) ? lenght : ceTe.DynamicPDF.Font.TimesRoman.GetTextWidth(this.cognome.Trim(), fontLenght);
|
||
lenght = lenght > ceTe.DynamicPDF.Font.TimesRoman.GetTextWidth(this.indirizzo.Trim(), fontLenght) ? lenght : ceTe.DynamicPDF.Font.TimesRoman.GetTextWidth(this.indirizzo, fontLenght);
|
||
// lenght = lenght + 40;
|
||
//float end_pos = this.cliente.Width + this.cliente.X;
|
||
//this.cliente.X = end_pos - lenght;// * (float)(5)-63;
|
||
//this.cliente.Width = lenght;// * (float)(5)+63;
|
||
DateTimeFormatInfo dfi = new CultureInfo("it-IT", false).DateTimeFormat;
|
||
this.luogo.Text = "Torino, " + dataGenerazione.ToString("dd MMMM yyyy", new CultureInfo("it-IT", false).DateTimeFormat);
|
||
// *** Modififca Andrea per Impatti IWBank sui report Trimestrali CB e SEI: adeguamento lettera accompagnatorie **********//
|
||
if (rete.ToUpper() == "W")
|
||
this.luogo.Text = "Milano, " + dataGenerazione.ToString("dd MMMM yyyy", new CultureInfo("it-IT", false).DateTimeFormat);
|
||
//********************************************************************************************************************//
|
||
this.oggetto.Text = this.testoOggetto;
|
||
this.corpo.Text = testo;
|
||
string[] valoriTextArea = ConfigurationManager.AppSettings["OffsetFirmaPostSei"].Split(',');
|
||
this.saluti.Text = this.testoSaluti;
|
||
//if (rete.ToUpper() == "F")
|
||
// this.saluti.Text = "<P align=\"center\"><B>Banca Fideuram S.p.A.</B>\r\nL<6E>Amministratore Delegato e Direttore Generale\r\nMatteo Colafrancesco </P>";
|
||
//else
|
||
// this.saluti.Text = "<P align=\"center\"><B>Sanpaolo Invest S.p.A.</B>\r\nL<6E>Amministratore Delegato e Direttore Generale\r\nMatteo Colafrancesco </P>";
|
||
|
||
|
||
}
|
||
}
|
||
|
||
|
||
|
||
|