Patch level : at
Files correlati : at4.exe e maschere Ricompilazione Demo : [ ] Commento : aggiunto supperto per creare file SMS per vodafone (manca solo la scelta in at43) git-svn-id: svn://10.65.10.50/trunk@11272 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
8b7a226994
commit
9fc2426c75
@ -31,7 +31,7 @@
|
||||
#define IDON_SI "SI"
|
||||
#define IDON_AF "AF"
|
||||
|
||||
enum ts { undefined = 0, elenco = 1, completo = 2, etichette = 3, cartoline = 4, personale = 5 };
|
||||
enum ts { undefined = 0, elenco = 1, completo = 2, etichette = 3, cartoline = 4, sms = 5, personale = 6 };
|
||||
|
||||
// definizione form per etichette
|
||||
class TScadenze_form : public TForm
|
||||
@ -58,7 +58,7 @@ class TStampaScadenze : public TPrintapp
|
||||
TScadenze_form* _form_car;
|
||||
TScadenze_form* _form_per;
|
||||
TAssoc_array _categorie;
|
||||
TParagraph_string _cognome_nome, _dencom, _giopredon;
|
||||
TParagraph_string _cognome_nome, _dencom, _giopredon, _telefono, _dataconv;
|
||||
TDate _data_stampa;
|
||||
TDate _dataini, _datafin, _dataultid;
|
||||
int _intminconv;
|
||||
@ -91,7 +91,7 @@ public:
|
||||
void header_sezione(const TString16 codsez, const TString16 codsot);
|
||||
void dati_sezione(const TString16 codsez, const TString16 codsot);
|
||||
TMask& app_mask() { return *_msk; }
|
||||
TStampaScadenze() : _data_stampa(TODAY), _cognome_nome("",25), _dencom("",25), _giopredon("",10) {}
|
||||
TStampaScadenze() : _data_stampa(TODAY), _cognome_nome("",25), _dencom("",25), _giopredon("",10), _telefono("",20), _dataconv("",10) {}
|
||||
};
|
||||
|
||||
HIDDEN inline TStampaScadenze& app() { return (TStampaScadenze&) main_app(); }
|
||||
@ -373,6 +373,13 @@ void TStampaScadenze::set_page(int file, int cnt)
|
||||
//corpo.update_and_print(TRUE);
|
||||
}
|
||||
break;
|
||||
case sms:
|
||||
{
|
||||
set_row(1,"@0g#a,", &_cognome_nome);
|
||||
set_row(1,"@50g#a,", &_telefono);
|
||||
set_row(1,"@70g#a", &_dataconv);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -494,17 +501,35 @@ bool TStampaScadenze::filter_func_scadenze(const TRelation* rel)
|
||||
bool TStampaScadenze::preprocess_page(int file, int counter)
|
||||
{
|
||||
TRectype& recsog = current_cursor()->curr();
|
||||
TString80 nome = recsog.get(SOG_COGNOME);
|
||||
nome << " ";
|
||||
nome << recsog.get(SOG_NOME);
|
||||
nome << " ";
|
||||
nome << recsog.get(SOG_COGNOME_SP);
|
||||
_cognome_nome = nome;
|
||||
if (_tipostampa==sms)
|
||||
{
|
||||
TString& telalt = (TString&) recsog.get(SOG_TELALT);
|
||||
telalt.trim();
|
||||
if (telalt.empty() || telalt[0] == '0' || telalt.len() < 9)
|
||||
{
|
||||
telalt = (TString&) recsog.get(SOG_TELLAV);
|
||||
telalt.trim();
|
||||
if (telalt.empty() || telalt[0] == '0' || telalt.len() < 9)
|
||||
{
|
||||
telalt = (TString&) recsog.get(SOG_TELABI);
|
||||
telalt.trim();
|
||||
if (telalt.empty() || telalt[0] == '0' || telalt.len() < 9)
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
_dataconv = _datafin.string();
|
||||
_telefono = telalt;
|
||||
}
|
||||
if (_tipostampa==elenco || _tipostampa==completo || _tipostampa==personale)
|
||||
{
|
||||
TRectype& recsog = current_cursor()->curr();
|
||||
const TString16 codsez = recsog.get(SOG_CODSEZ);
|
||||
const TString16 codsot = recsog.get(SOG_CODSOT);
|
||||
TString80 nome = recsog.get(SOG_COGNOME);
|
||||
nome << " ";
|
||||
nome << recsog.get(SOG_NOME);
|
||||
nome << " ";
|
||||
nome << recsog.get(SOG_COGNOME_SP);
|
||||
_cognome_nome = nome;
|
||||
TString256 localita = "";
|
||||
localita = recsog.get(SOG_DOM_CAP);
|
||||
localita << ' ';
|
||||
@ -637,6 +662,9 @@ bool TStampaScadenze::set_print(int m)
|
||||
case F_CARTOLINE:
|
||||
_tipostampa = (configura_stampante(p, "AT_CARTOLINE", "cartoline")) ? dati_cartoline() : undefined;
|
||||
break;
|
||||
case F_SMS:
|
||||
_tipostampa = (configura_stampante(p, "AT_SMS", "invio SMS")) ? sms : undefined;
|
||||
break;
|
||||
}
|
||||
if (_tipostampa != undefined)
|
||||
{
|
||||
|
@ -53,3 +53,4 @@
|
||||
#define F_PERSONALE 403
|
||||
#define F_ETICHETTE 404
|
||||
#define F_CARTOLINE 405
|
||||
#define F_SMS 406
|
||||
|
@ -4,38 +4,44 @@ TOOLBAR "" 0 -2 0 -2
|
||||
|
||||
BUTTON F_ELENCO 9 2
|
||||
BEGIN
|
||||
PROMPT -16 -11 "E~lenco"
|
||||
PROMPT -17 -11 "E~lenco"
|
||||
MESSAGE EXIT,F_ELENCO
|
||||
END
|
||||
|
||||
BUTTON F_COMPLETO 9 2
|
||||
BEGIN
|
||||
PROMPT -26 -11 "~Completo"
|
||||
PROMPT -27 -11 "~Completo"
|
||||
MESSAGE EXIT,F_COMPLETO
|
||||
END
|
||||
|
||||
BUTTON F_PERSONALE 9 2
|
||||
BEGIN
|
||||
PROMPT -36 -11 "~Personale"
|
||||
PROMPT -37 -11 "~Personale"
|
||||
MESSAGE EXIT,F_PERSONALE
|
||||
END
|
||||
|
||||
|
||||
BUTTON F_ETICHETTE 9 2
|
||||
BEGIN
|
||||
PROMPT -46 -11 "~Etichette"
|
||||
PROMPT -47 -11 "~Etichette"
|
||||
MESSAGE EXIT,F_ETICHETTE
|
||||
END
|
||||
|
||||
BUTTON F_CARTOLINE 9 2
|
||||
BEGIN
|
||||
PROMPT -56 -11 "C~artoline"
|
||||
PROMPT -57 -11 "C~artoline"
|
||||
MESSAGE EXIT,F_CARTOLINE
|
||||
END
|
||||
|
||||
BUTTON F_SMS 9 2
|
||||
BEGIN
|
||||
PROMPT -67 -11 "~SMS"
|
||||
MESSAGE EXIT,F_SMS
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 9 2
|
||||
BEGIN
|
||||
PROMPT -66 -11 ""
|
||||
PROMPT -77 -11 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
@ -14,7 +14,7 @@
|
||||
#define ALIAS_TCS 200
|
||||
#define IDON_SI "SI"
|
||||
|
||||
enum ts { undefined = 0, elenco = 1, etichette = 2 };
|
||||
enum ts { undefined = 0, elenco = 1, etichette = 2, sms = 3 };
|
||||
|
||||
// definizione form per etichette
|
||||
class TUrgenze_form : public TForm
|
||||
@ -151,6 +151,14 @@ void TStampaUrgenze::set_page(int file, int cnt)
|
||||
set_row(3,"");
|
||||
}
|
||||
break;
|
||||
case sms:
|
||||
{
|
||||
set_row(1,"@0g@S,", FLD(LF_SOGGETTI,SOG_TELALT));
|
||||
set_row(1,"@16g@S,", FLD(LF_SOGGETTI,SOG_COGNOME));
|
||||
set_row(1,"@43g@S,", FLD(LF_SOGGETTI,SOG_NOME));
|
||||
set_row(1,"@70g@ld", FLD(LF_SOGGETTI,SOG_DATANASC));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -227,10 +235,16 @@ bool TStampaUrgenze::filter_func_urgenze(const TRelation* rel)
|
||||
}
|
||||
|
||||
bool TStampaUrgenze::preprocess_page(int file, int counter)
|
||||
{
|
||||
{
|
||||
TRectype& recsog = current_cursor()->curr();
|
||||
if (_tipostampa==sms)
|
||||
{
|
||||
TString& telalt = (TString&) recsog.get(SOG_TELALT);
|
||||
if (telalt.empty())
|
||||
return FALSE;
|
||||
}
|
||||
if (_tipostampa == elenco)
|
||||
{
|
||||
TRectype& recsog = current_cursor()->curr();
|
||||
TString80 nome = recsog.get(SOG_COGNOME);
|
||||
nome << " ";
|
||||
nome << recsog.get(SOG_NOME);
|
||||
@ -352,7 +366,10 @@ bool TStampaUrgenze::set_print(int)
|
||||
break;
|
||||
case F_ETICHETTE:
|
||||
_tipostampa = (configura_stampante(p, "AT_ETICHETTE", "etichette")) ? etichette : undefined;
|
||||
break;
|
||||
break;
|
||||
case F_SMS:
|
||||
_tipostampa = (configura_stampante(p, "AT_SMS", "invio SMS")) ? sms : undefined;
|
||||
break;
|
||||
}
|
||||
if (_tipostampa != undefined)
|
||||
{
|
||||
|
@ -37,3 +37,4 @@
|
||||
|
||||
#define F_ELENCO 401
|
||||
#define F_ETICHETTE 402
|
||||
#define F_SMS 403
|
||||
|
@ -4,19 +4,25 @@ TOOLBAR "" 0 20 0 2
|
||||
|
||||
BUTTON F_ELENCO 9 2
|
||||
BEGIN
|
||||
PROMPT -13 -11 "E~lenco"
|
||||
PROMPT -14 -11 "E~lenco"
|
||||
MESSAGE EXIT,F_ELENCO
|
||||
END
|
||||
|
||||
BUTTON F_ETICHETTE 9 2
|
||||
BEGIN
|
||||
PROMPT -23 -11 "~Etichette"
|
||||
PROMPT -24 -11 "~Etichette"
|
||||
MESSAGE EXIT,F_ETICHETTE
|
||||
END
|
||||
|
||||
BUTTON F_SMS 9 2
|
||||
BEGIN
|
||||
PROMPT -34 -11 "~SMS"
|
||||
MESSAGE EXIT,F_SMS
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 9 2
|
||||
BEGIN
|
||||
PROMPT -33 -11 ""
|
||||
PROMPT -44 -11 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
@ -19,7 +19,7 @@
|
||||
#define STATO_IDONEO 'I' // IDONEITA'
|
||||
#define STATO_FINESO 'F' // FINE SOSPENSIONE
|
||||
// tpi di stampa
|
||||
enum ts { undefined = 0, elencocon = 1, elencorit = 2, etichette = 3, cartoline = 4 };
|
||||
enum ts { undefined = 0, elencocon = 1, elencorit = 2, etichette = 3, cartoline = 4, sms = 5 };
|
||||
|
||||
// definizione form per etichette e cartoline
|
||||
class TConv_form : public TForm
|
||||
@ -106,8 +106,11 @@ ts TStampaConvocazioni::dati_cartoline()
|
||||
}
|
||||
|
||||
void TStampaConvocazioni::set_page(int file, int cnt)
|
||||
{
|
||||
if (_tipostampa==elencocon || _tipostampa==elencorit)
|
||||
{
|
||||
switch (_tipostampa)
|
||||
{
|
||||
case elencocon:
|
||||
case elencorit:
|
||||
{
|
||||
reset_row(1);
|
||||
reset_row(2);
|
||||
@ -135,7 +138,8 @@ void TStampaConvocazioni::set_page(int file, int cnt)
|
||||
set_row(2,"@96g@S", FLD(LF_SOGGETTI,SOG_TELLAV));
|
||||
set_row(3,"");
|
||||
}
|
||||
if (_tipostampa==etichette)
|
||||
break;
|
||||
case etichette:
|
||||
{
|
||||
TPrint_section& corpo = _form_eti->get_body();
|
||||
for (int r=1;r<=_etcolonne;r++)
|
||||
@ -159,8 +163,9 @@ void TStampaConvocazioni::set_page(int file, int cnt)
|
||||
++(*current_cursor());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (_tipostampa==cartoline)
|
||||
}
|
||||
break;
|
||||
case cartoline:
|
||||
{
|
||||
TPrint_section& corpo = _form_car->get_body();
|
||||
const TString16 codsez = current_cursor()->curr().get(SOG_CODSEZ);
|
||||
@ -207,6 +212,16 @@ void TStampaConvocazioni::set_page(int file, int cnt)
|
||||
force_setpage(TRUE); // serve perchè alla prossima etichetta rifaccia la setpage
|
||||
// altrimenti stampa sempre la stessa etichetta
|
||||
}
|
||||
break;
|
||||
case sms:
|
||||
{
|
||||
set_row(1,"@0g@S,", FLD(LF_SOGGETTI,SOG_TELALT));
|
||||
set_row(1,"@16g@S,", FLD(LF_SOGGETTI,SOG_COGNOME));
|
||||
set_row(1,"@43g@S,", FLD(LF_SOGGETTI,SOG_NOME));
|
||||
set_row(1,"@70g@ld", FLD(LF_SOGGETTI,SOG_DATANASC));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void TStampaConvocazioni::header_sezione(const TString16 codsez, const TString16 codsot)
|
||||
@ -334,9 +349,15 @@ print_action TStampaConvocazioni::postprocess_print(int file, int counter)
|
||||
|
||||
bool TStampaConvocazioni::preprocess_page(int file, int counter)
|
||||
{
|
||||
TRectype& recsog = current_cursor()->curr();
|
||||
if (_tipostampa==sms)
|
||||
{
|
||||
TString& telalt = (TString&) recsog.get(SOG_TELALT);
|
||||
if (telalt.empty())
|
||||
return FALSE;
|
||||
}
|
||||
if (_tipostampa==elencocon || _tipostampa==elencorit)
|
||||
{
|
||||
TRectype& recsog = current_cursor()->curr();
|
||||
const TString16 codsez = recsog.get(SOG_CODSEZ);
|
||||
const TString16 codsot = recsog.get(SOG_CODSOT);
|
||||
TString80 nome = recsog.get(SOG_COGNOME);
|
||||
@ -360,7 +381,6 @@ bool TStampaConvocazioni::preprocess_page(int file, int counter)
|
||||
if (_tipostampa==etichette)
|
||||
if (printer().rows_left() < _form_eti->get_body().height())
|
||||
printer().formfeed();
|
||||
TRectype& recsog = current_cursor()->curr();
|
||||
TString80 nome = recsog.get(SOG_COGNOME);
|
||||
nome << " ";
|
||||
nome << recsog.get(SOG_NOME);
|
||||
@ -457,6 +477,9 @@ bool TStampaConvocazioni::set_print(int)
|
||||
case F_CARTOLINE:
|
||||
_tipostampa = (configura_stampante(p, "AT_CARTOLINE", "cartoline")) ? dati_cartoline() : undefined;
|
||||
break;
|
||||
case F_SMS:
|
||||
_tipostampa = (configura_stampante(p, "AT_SMS", "invio SMS")) ? sms : undefined;
|
||||
break;
|
||||
}
|
||||
if (_tipostampa != undefined)
|
||||
{
|
||||
|
@ -17,3 +17,4 @@
|
||||
#define F_ELENCORIT 402
|
||||
#define F_ETICHETTE 403
|
||||
#define F_CARTOLINE 404
|
||||
#define F_SMS 405
|
||||
|
Loading…
x
Reference in New Issue
Block a user