Patch level : 1.7 at

Files correlati     : at0.exe at2.exe at2600a.msk
Ricompilazione Demo : [ ]
Commento            : In sblocco sospesi sistemato stampa *, in stampa iscritti/dimessi aggiunta possibilità di stampare su file dbf


git-svn-id: svn://10.65.10.50/trunk@11688 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
cris 2004-01-07 10:10:41 +00:00
parent 54e3d963a8
commit e53ba72deb
4 changed files with 59 additions and 13 deletions

View File

@ -370,7 +370,7 @@ void TSbloccoSospesi::set_page(int file, int cnt)
set_row(1,"@56g@S", FLD(LF_SOGGETTI,SOG_CODSEZ));
set_row(1,"@59g@S", FLD(LF_SOGGETTI,SOG_CODSOT));
set_row(1,"@62g#a", &_operazione);
set_row(1,"@100g@ld", FLD(LF_SOGGETTI,SOG_DATAPROSSI));
set_row(1,"@105g@ld", FLD(LF_SOGGETTI,SOG_DATAPROSSI));
}
bool TSbloccoSospesi::filter_func_sbloccosospesi(const TRelation* rel)
@ -416,7 +416,7 @@ void TSbloccoSospesi::header_sezione(const TString16 codsez, const TString16 cod
{
const TString80 densez = current_cursor()->curr(LF_SEZIONI).get(SEZ_DENSEZ);
const TString80 densot = current_cursor()->curr(LF_SEZIONI).get(SEZ_DENSOT);
TString intestazione(100);
TString intestazione(115);
intestazione = "Sezione: ";
intestazione << codsez;
intestazione << "/";
@ -480,7 +480,7 @@ void TSbloccoSospesi::crea_intestazione()
{
reset_header();
TString sep(100);
TString sep(115);
if (_definitiva)
sep = "SBLOCCO DEFINITIVO SOSPESI ";
else
@ -500,8 +500,8 @@ void TSbloccoSospesi::crea_intestazione()
sep = "";
sep.fill('-');
set_header(3, (const char *) sep);
set_header(4,"@0gCod.@9gC.@12gCognome e nome@38gNato il@49gTess.@56gSe/So@62gData sosp.@73gScadenza@84gDo Da A Sogg.@100gData pr.SI");
set_header(5,"@0g------@9g--@12g-------------------------@38g----------@49g------@56g-- --@62g----------@73g----------@84g---------------@100g----------");
set_header(4,"@0gCod.@9gC.@12gCognome e nome@38gNato il@49gTess.@56gSe/So@62gData sosp.@73gScadenza@84gDo Da A Sogg.@105gData pr.SI");
set_header(5,"@0g------@9g--@12g-------------------------@38g----------@49g------@56g-- --@62g----------@73g----------@84g---------------------@105g----------");
printer().footerlen(3);
}

View File

@ -9,12 +9,13 @@
#include "at2.h"
#include "at2600a.h"
#include "atlib.h"
#include <comuni.h>
#define ALIAS_LCP 100 // localita' postali
#define ALIAS_CTD 700 // categoria donatori
#define ISCRITTI 'I'
enum ts { undefined = 0, elenco = 1, etichette = 2 };
enum ts { undefined = 0, elenco = 1, etichette = 2, stampasufile = 3 };
// definizione form per etichette
class TEti_iscritti_form : public TForm
@ -35,6 +36,7 @@ class TStampaIscritti : public TPrintapp
TRelation* _rel;
TMask* _msk;
TEti_iscritti_form* _form_eti;
TExternisamfile* _fileiscr;
TAssoc_array _categorie;
TParagraph_string _cognome_nome;
TDate _data_stampa;
@ -177,9 +179,9 @@ bool TStampaIscritti::filter_func_iscritti(const TRelation * rel)
bool TStampaIscritti::preprocess_page(int file, int counter)
{
TRectype& recsog = current_cursor()->curr();
if (_tipostampa == elenco)
{
TRectype& recsog = current_cursor()->curr();
TString80 nome = recsog.get(SOG_COGNOME);
nome << " ";
nome << recsog.get(SOG_NOME);
@ -200,6 +202,31 @@ bool TStampaIscritti::preprocess_page(int file, int counter)
if (_tipostampa==etichette)
if (printer().rows_left() < _form_eti->get_body().height())
printer().formfeed();
if (_tipostampa==stampasufile)
{
_fileiscr->zero();
_fileiscr->put("COGNOME",recsog.get(SOG_COGNOME));
_fileiscr->put("NOME",recsog.get(SOG_NOME));
_fileiscr->put("INDIRIZZO",recsog.get(SOG_DOM_INDIR));
TString80 localita = "";
localita << recsog.get(SOG_DOM_CAP);
localita << ' ';
if (recsog.get(SOG_DOM_CODLOC).not_empty())
localita << current_cursor()->curr(-ALIAS_LCP).get("S0");
else
localita << current_cursor()->curr(LF_COMUNI).get(COM_DENCOM);
localita << ' ' << current_cursor()->curr(LF_COMUNI).get(COM_PROVCOM);
localita.trim();
_fileiscr->put("LOCALITA",localita);
_fileiscr->put("TELABI",recsog.get(SOG_TELABI));
_fileiscr->put("TELLAV",recsog.get(SOG_TELLAV));
_fileiscr->put("TELALT",recsog.get(SOG_TELALT));
_fileiscr->put("DATAULTDON",recsog.get(SOG_DATAULTDON));
_fileiscr->put("TOTDON",recsog.get(SOG_TOTDON));
_fileiscr->put("CATDON",recsog.get(SOG_CATDON));
_fileiscr->write();
do_events();
}
_contatore++;
_totale++;
return TRUE;
@ -288,7 +315,13 @@ bool TStampaIscritti::set_print(int m)
case F_ETICHETTE:
_tipostampa = (configura_stampante(p, "AT_ETICHETTE", "etichette")) ? etichette : undefined;
break;
case F_FILE:
{
_tipostampa = stampasufile;
_fileiscr->zap();
}
break;
}
if (_tipostampa != undefined)
{
reset_files();
@ -382,11 +415,17 @@ bool TStampaIscritti::user_create()
_etlarghezza = config.get_int("EtLarghezza");
_etcolonne = config.get_int("EtColonne");
_form_eti = new TEti_iscritti_form(etformato);
TFilename iscrname = "iscritti";
iscrname.ext("dbf");
TFilename iscrtrr = "iscritti";
iscrtrr.ext("trr");
_fileiscr = new TExternisamfile(iscrname, iscrtrr);
return TRUE;
}
bool TStampaIscritti::user_destroy()
{
delete _fileiscr;
delete _form_eti;
delete _msk;
delete _rel;

View File

@ -31,3 +31,4 @@
#define F_ELENCO 401
#define F_ETICHETTE 402
#define F_FILE 403

View File

@ -2,21 +2,27 @@
TOOLBAR "" 0 20 0 2
BUTTON F_ELENCO 9 2
BUTTON F_ELENCO 10 2
BEGIN
PROMPT -13 -11 "E~lenco"
PROMPT -14 -11 "E~lenco"
MESSAGE EXIT,F_ELENCO
END
BUTTON F_ETICHETTE 9 2
BUTTON F_ETICHETTE 10 2
BEGIN
PROMPT -23 -11 "~Etichette"
PROMPT -24 -11 "~Etichette"
MESSAGE EXIT,F_ETICHETTE
END
BUTTON DLG_QUIT 9 2
BUTTON F_FILE 10 2
BEGIN
PROMPT -33 -11 ""
PROMPT -34 -11 "~File"
MESSAGE EXIT,F_FILE
END
BUTTON DLG_QUIT 10 2
BEGIN
PROMPT -44 -11 ""
END
ENDPAGE