Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : Possibilita' di aggiornare indipendentemente anagrafica, controlli e benemerenze git-svn-id: svn://10.65.10.50/trunk@8999 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
66708b96e5
commit
9fead56850
430
at/at8200.cpp
430
at/at8200.cpp
@ -18,6 +18,7 @@
|
||||
#include "donaz.h"
|
||||
#include "contsan.h"
|
||||
#include "idoneita.h"
|
||||
#include "benem.h"
|
||||
|
||||
class TAggConSan : public TApplication
|
||||
{
|
||||
@ -27,9 +28,11 @@ class TAggConSan : public TApplication
|
||||
TLocalisamfile* _donaz;
|
||||
TLocalisamfile* _contsan;
|
||||
TLocalisamfile* _idoneita;
|
||||
TLocalisamfile* _benem;
|
||||
TRecord_array* _sdonazioni;
|
||||
TRecord_array* _scontrolli;
|
||||
TRecord_array* _sidoneita;
|
||||
TRecord_array* _sbenem;
|
||||
// parametri di sezione
|
||||
int _intsi_f1, _intsi_f2, _intsi_m, _intaf_m, _etadonne;
|
||||
int _numdon1, _numdon2;
|
||||
@ -60,9 +63,11 @@ bool TAggConSan::create()
|
||||
_donaz = new TLocalisamfile(LF_DONAZ);
|
||||
_contsan = new TLocalisamfile(LF_CONTSAN);
|
||||
_idoneita = new TLocalisamfile(LF_IDONEITA);
|
||||
_benem = new TLocalisamfile(LF_BENEM);
|
||||
_sdonazioni = new TRecord_array(LF_DONAZ,DON_PROGDON);
|
||||
_scontrolli = new TRecord_array(LF_CONTSAN,CON_PROGCON);
|
||||
_sidoneita = new TRecord_array(LF_IDONEITA,IDO_PROGIDO);
|
||||
_sbenem = new TRecord_array(LF_BENEM,BEN_PROGBEN);
|
||||
TConfig config(CONFIG_STUDIO);
|
||||
_numdon1 = config.get_int("NumDon1");
|
||||
_numdon2 = config.get_int("NumDon2");
|
||||
@ -84,9 +89,11 @@ bool TAggConSan::create()
|
||||
|
||||
bool TAggConSan::destroy()
|
||||
{
|
||||
delete _sbenem;
|
||||
delete _sidoneita;
|
||||
delete _scontrolli;
|
||||
delete _sdonazioni;
|
||||
delete _benem;
|
||||
delete _idoneita;
|
||||
delete _contsan;
|
||||
delete _donaz;
|
||||
@ -106,7 +113,9 @@ bool TAggConSan::menu(MENU_TAG m)
|
||||
if (!pr.open())
|
||||
return error_box("Errore in apertura stampante.");
|
||||
|
||||
bool anagrafe = _msk->get_bool(F_ANAGRAFE);
|
||||
bool controlli = _msk->get_bool(F_CONTROLLI);
|
||||
bool anagrafica = _msk->get_bool(F_ANAGRAFICA);
|
||||
bool benemerenze = _msk->get_bool(F_BENEMERENZE);
|
||||
_rel->lfile().setkey(2);
|
||||
bool modificato = FALSE;
|
||||
TDate oggi(TODAY);
|
||||
@ -125,184 +134,259 @@ bool TAggConSan::menu(MENU_TAG m)
|
||||
row.put(rigastampa);
|
||||
printer().setheaderline(3, row);
|
||||
TRectype recsog = _rel->curr();
|
||||
TExternisamfile* fc = new TExternisamfile("$portacon");
|
||||
TProgind *pi;
|
||||
pi = new TProgind(fc->eod(),"Aggiornamento controlli sanitari da portatile", FALSE, TRUE, 10);
|
||||
pi->setstatus(1);
|
||||
for(fc->first(); !fc->eof(); fc->next())
|
||||
{
|
||||
pi->addstatus(1);
|
||||
modificato = FALSE;
|
||||
const TString80 cognome = fc->get("COGNOME");
|
||||
const TString80 nome = fc->get("NOME");
|
||||
const TDate datanasc = fc->get_date("DATANASC");
|
||||
recsog.zero();
|
||||
recsog.put(SOG_COGNOME, cognome);
|
||||
recsog.put(SOG_NOME, nome);
|
||||
recsog.put(SOG_DATANASC, datanasc);
|
||||
if (recsog.read(_rel->lfile())==NOERR)
|
||||
{
|
||||
TDate datacon = fc->get_date("DATACON");
|
||||
bool esiste = FALSE;
|
||||
TRectype* key = new TRectype(LF_CONTSAN);
|
||||
key->put(CON_CODICE, recsog.get(SOG_CODICE));
|
||||
_scontrolli->read(key);
|
||||
for (int r=1; r<=_scontrolli->rows(); r++)
|
||||
{
|
||||
const TRectype& riga = _scontrolli->row(r);
|
||||
TDate datacon1 = riga.get(CON_DATACON);
|
||||
if (datacon==datacon1)
|
||||
esiste = TRUE;
|
||||
}
|
||||
if (!esiste)
|
||||
{
|
||||
int progcon = _scontrolli->rows()+1;
|
||||
TRectype& reccon = _contsan->curr();
|
||||
reccon.zero();
|
||||
reccon.put(CON_CODICE, recsog.get(SOG_CODICE));
|
||||
reccon.put(CON_PROGCON, progcon);
|
||||
reccon.put(CON_DATACON, datacon);
|
||||
reccon.put(CON_TIPOCON, fc->get("TIPOCON"));
|
||||
reccon.put(CON_IDON1, fc->get("IDON1"));
|
||||
reccon.put(CON_IDON2, fc->get("IDON2"));
|
||||
reccon.put(CON_IDON3, fc->get("IDON3"));
|
||||
reccon.put(CON_IDON4, fc->get("IDON4"));
|
||||
reccon.put(CON_INTSI, fc->get("INTSI"));
|
||||
reccon.put(CON_INTAF, fc->get("INTAF"));
|
||||
reccon.put(CON_PROSSTIPO, fc->get("PROSSTIPO"));
|
||||
reccon.put(CON_PROSSDATA, fc->get("PROSSDATA"));
|
||||
reccon.put(CON_MOTIVO, fc->get("MOTIVO"));
|
||||
TString80 resp = "port.-" ;
|
||||
resp << fc->get("RESPONSAB");
|
||||
reccon.put(CON_RESPONSAB, resp);
|
||||
modificato = TRUE;
|
||||
_scontrolli->insert_row(reccon);
|
||||
_scontrolli->write(TRUE);
|
||||
}
|
||||
if (modificato)
|
||||
{
|
||||
TRectype* key = new TRectype(LF_IDONEITA);
|
||||
key->put(IDO_CODICE, recsog.get(SOG_CODICE));
|
||||
_sidoneita->read(key);
|
||||
con_reord(recsog,_scontrolli,_sidoneita);
|
||||
//Verifico se la categoria del donatore è aggiornata al numero di donazioni dello stesso
|
||||
//se non lo è eseguo tutti i controlli per il salto automatico di categoria
|
||||
TString16 catdon = recsog.get(SOG_CATDON);
|
||||
const int totdon = recsog.get_int(SOG_TOTDON);
|
||||
if ((catdon == _catini1 || _catini1.empty()) && (totdon>=_numdon1) && _catfin1.not_empty())
|
||||
recsog.put(SOG_CATDON, _catfin1);
|
||||
const bool tstampata = recsog.get_bool(SOG_T_STAMPATA);
|
||||
if ((catdon == _catini2 || _catini2.empty()) && (totdon>=_numdon2) && _catfin2.not_empty() && (!_sttess2 || tstampata))
|
||||
recsog.put(SOG_CATDON, _catfin2);
|
||||
recsog.put(SOG_DATAULTAGG, oggi);
|
||||
recsog.put(SOG_UTENULTAGG, "PORT.");
|
||||
recsog.rewrite(_rel->lfile());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rigastampa = "";
|
||||
rigastampa << cognome;
|
||||
rigastampa << " " << nome;
|
||||
rigastampa << " " << datanasc.string();
|
||||
row.reset();
|
||||
row.put(rigastampa);
|
||||
printer().print(row);
|
||||
}
|
||||
}
|
||||
delete pi;
|
||||
delete fc;
|
||||
TExternisamfile* fi = new TExternisamfile("$portaido");
|
||||
TProgind *pi1;
|
||||
pi1 = new TProgind(fi->eod(),"Aggiornamento controlli sanitari da portatile", FALSE, TRUE, 10);
|
||||
pi1->setstatus(1);
|
||||
for(fi->first(); !fi->eof(); fi->next())
|
||||
{
|
||||
pi1->addstatus(1);
|
||||
modificato = FALSE;
|
||||
const TString80 cognome = fi->get("COGNOME");
|
||||
const TString80 nome = fi->get("NOME");
|
||||
const TDate datanasc = fi->get_date("DATANASC");
|
||||
recsog.zero();
|
||||
recsog.put(SOG_COGNOME, cognome);
|
||||
recsog.put(SOG_NOME, nome);
|
||||
recsog.put(SOG_DATANASC, datanasc);
|
||||
if (recsog.read(_rel->lfile())==NOERR)
|
||||
{
|
||||
TDate dataido = fi->get_date("DATAIDO");
|
||||
bool esiste = FALSE;
|
||||
TRectype* key = new TRectype(LF_IDONEITA);
|
||||
key->put(IDO_CODICE, recsog.get(SOG_CODICE));
|
||||
_sidoneita->read(key);
|
||||
for (int r=1; r<=_sidoneita->rows(); r++)
|
||||
{
|
||||
const TRectype& riga = _sidoneita->row(r);
|
||||
TDate dataido1 = riga.get(IDO_DATAIDO);
|
||||
if (dataido==dataido1)
|
||||
esiste = TRUE;
|
||||
}
|
||||
if (!esiste)
|
||||
{
|
||||
int progido = _sidoneita->rows()+1;
|
||||
TRectype& recido = _idoneita->curr();
|
||||
recido.zero();
|
||||
recido.put(IDO_CODICE, recsog.get(SOG_CODICE));
|
||||
recido.put(IDO_PROGIDO, progido);
|
||||
recido.put(IDO_DATAIDO, dataido);
|
||||
recido.put(IDO_TIPOIDO, fi->get("TIPOIDO"));
|
||||
recido.put(IDO_IDO_SOS, fi->get("IDO_SOS"));
|
||||
recido.put(IDO_INTERVALLO, fi->get("INTERVALLO"));
|
||||
recido.put(IDO_FINESOS, fi->get("FINESOS"));
|
||||
recido.put(IDO_MOTIVO, fi->get("MOTIVO"));
|
||||
TString80 resp = "port.-" ;
|
||||
resp << fi->get("RESPONSAB");
|
||||
recido.put(IDO_RESPONSAB, resp);
|
||||
modificato = TRUE;
|
||||
_sidoneita->insert_row(recido);
|
||||
_sidoneita->write(TRUE);
|
||||
}
|
||||
if (modificato)
|
||||
{
|
||||
if (controlli)
|
||||
{
|
||||
TExternisamfile* fc = new TExternisamfile("$portacon");
|
||||
TProgind *pi;
|
||||
pi = new TProgind(fc->eod(),"Aggiornamento controlli sanitari", FALSE, TRUE, 10);
|
||||
pi->setstatus(1);
|
||||
for(fc->first(); !fc->eof(); fc->next())
|
||||
{
|
||||
pi->addstatus(1);
|
||||
modificato = FALSE;
|
||||
const TString80 cognome = fc->get("COGNOME");
|
||||
const TString80 nome = fc->get("NOME");
|
||||
const TDate datanasc = fc->get_date("DATANASC");
|
||||
recsog.zero();
|
||||
recsog.put(SOG_COGNOME, cognome);
|
||||
recsog.put(SOG_NOME, nome);
|
||||
recsog.put(SOG_DATANASC, datanasc);
|
||||
if (recsog.read(_rel->lfile())==NOERR)
|
||||
{
|
||||
TDate datacon = fc->get_date("DATACON");
|
||||
bool esiste = FALSE;
|
||||
TRectype* key = new TRectype(LF_CONTSAN);
|
||||
key->put(CON_CODICE, recsog.get(SOG_CODICE));
|
||||
_scontrolli->read(key);
|
||||
con_reord(recsog,_scontrolli,_sidoneita);
|
||||
//Verifico se la categoria del donatore è aggiornata al numero di donazioni dello stesso
|
||||
//se non lo è eseguo tutti i controlli per il salto automatico di categoria
|
||||
TString16 catdon = recsog.get(SOG_CATDON);
|
||||
const int totdon = recsog.get_int(SOG_TOTDON);
|
||||
if ((catdon == _catini1 || _catini1.empty()) && (totdon>=_numdon1) && _catfin1.not_empty())
|
||||
recsog.put(SOG_CATDON, _catfin1);
|
||||
const bool tstampata = recsog.get_bool(SOG_T_STAMPATA);
|
||||
if ((catdon == _catini2 || _catini2.empty()) && (totdon>=_numdon2) && _catfin2.not_empty() && (!_sttess2 || tstampata))
|
||||
recsog.put(SOG_CATDON, _catfin2);
|
||||
recsog.put(SOG_DATAULTAGG, oggi);
|
||||
recsog.put(SOG_UTENULTAGG, "PORT.");
|
||||
recsog.rewrite(_rel->lfile());
|
||||
}
|
||||
for (int r=1; r<=_scontrolli->rows(); r++)
|
||||
{
|
||||
const TRectype& riga = _scontrolli->row(r);
|
||||
TDate datacon1 = riga.get(CON_DATACON);
|
||||
if (datacon==datacon1)
|
||||
esiste = TRUE;
|
||||
}
|
||||
if (!esiste)
|
||||
{
|
||||
int progcon = _scontrolli->rows()+1;
|
||||
TRectype& reccon = _contsan->curr();
|
||||
reccon.zero();
|
||||
reccon.put(CON_CODICE, recsog.get(SOG_CODICE));
|
||||
reccon.put(CON_PROGCON, progcon);
|
||||
reccon.put(CON_DATACON, datacon);
|
||||
reccon.put(CON_TIPOCON, fc->get("TIPOCON"));
|
||||
reccon.put(CON_IDON1, fc->get("IDON1"));
|
||||
reccon.put(CON_IDON2, fc->get("IDON2"));
|
||||
reccon.put(CON_IDON3, fc->get("IDON3"));
|
||||
reccon.put(CON_IDON4, fc->get("IDON4"));
|
||||
reccon.put(CON_INTSI, fc->get("INTSI"));
|
||||
reccon.put(CON_INTAF, fc->get("INTAF"));
|
||||
reccon.put(CON_PROSSTIPO, fc->get("PROSSTIPO"));
|
||||
reccon.put(CON_PROSSDATA, fc->get("PROSSDATA"));
|
||||
reccon.put(CON_MOTIVO, fc->get("MOTIVO"));
|
||||
TString80 resp = "port.-" ;
|
||||
resp << fc->get("RESPONSAB");
|
||||
reccon.put(CON_RESPONSAB, resp);
|
||||
modificato = TRUE;
|
||||
_scontrolli->insert_row(reccon);
|
||||
_scontrolli->write(TRUE);
|
||||
}
|
||||
if (modificato)
|
||||
{
|
||||
TRectype* key = new TRectype(LF_IDONEITA);
|
||||
key->put(IDO_CODICE, recsog.get(SOG_CODICE));
|
||||
_sidoneita->read(key);
|
||||
con_reord(recsog,_scontrolli,_sidoneita);
|
||||
//Verifico se la categoria del donatore è aggiornata al numero di donazioni dello stesso
|
||||
//se non lo è eseguo tutti i controlli per il salto automatico di categoria
|
||||
TString16 catdon = recsog.get(SOG_CATDON);
|
||||
const int totdon = recsog.get_int(SOG_TOTDON);
|
||||
if ((catdon == _catini1 || _catini1.empty()) && (totdon>=_numdon1) && _catfin1.not_empty())
|
||||
recsog.put(SOG_CATDON, _catfin1);
|
||||
const bool tstampata = recsog.get_bool(SOG_T_STAMPATA);
|
||||
if ((catdon == _catini2 || _catini2.empty()) && (totdon>=_numdon2) && _catfin2.not_empty() && (!_sttess2 || tstampata))
|
||||
recsog.put(SOG_CATDON, _catfin2);
|
||||
recsog.put(SOG_DATAULTAGG, oggi);
|
||||
recsog.put(SOG_UTENULTAGG, "PORT.");
|
||||
recsog.rewrite(_rel->lfile());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rigastampa = "";
|
||||
rigastampa << cognome;
|
||||
rigastampa << " " << nome;
|
||||
rigastampa << " " << datanasc.string();
|
||||
row.reset();
|
||||
row.put(rigastampa);
|
||||
printer().print(row);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rigastampa = "";
|
||||
rigastampa << cognome;
|
||||
rigastampa << " " << nome;
|
||||
rigastampa << " " << datanasc.string();
|
||||
row.reset();
|
||||
row.put(rigastampa);
|
||||
printer().print(row);
|
||||
delete pi;
|
||||
delete fc;
|
||||
TExternisamfile* fi = new TExternisamfile("$portaido");
|
||||
TProgind *pi1;
|
||||
pi1 = new TProgind(fi->eod(),"Aggiornamento idoneita'", FALSE, TRUE, 10);
|
||||
pi1->setstatus(1);
|
||||
for(fi->first(); !fi->eof(); fi->next())
|
||||
{
|
||||
pi1->addstatus(1);
|
||||
modificato = FALSE;
|
||||
const TString80 cognome = fi->get("COGNOME");
|
||||
const TString80 nome = fi->get("NOME");
|
||||
const TDate datanasc = fi->get_date("DATANASC");
|
||||
recsog.zero();
|
||||
recsog.put(SOG_COGNOME, cognome);
|
||||
recsog.put(SOG_NOME, nome);
|
||||
recsog.put(SOG_DATANASC, datanasc);
|
||||
if (recsog.read(_rel->lfile())==NOERR)
|
||||
{
|
||||
TDate dataido = fi->get_date("DATAIDO");
|
||||
bool esiste = FALSE;
|
||||
TRectype* key = new TRectype(LF_IDONEITA);
|
||||
key->put(IDO_CODICE, recsog.get(SOG_CODICE));
|
||||
_sidoneita->read(key);
|
||||
for (int r=1; r<=_sidoneita->rows(); r++)
|
||||
{
|
||||
const TRectype& riga = _sidoneita->row(r);
|
||||
TDate dataido1 = riga.get(IDO_DATAIDO);
|
||||
if (dataido==dataido1)
|
||||
esiste = TRUE;
|
||||
}
|
||||
if (!esiste)
|
||||
{
|
||||
int progido = _sidoneita->rows()+1;
|
||||
TRectype& recido = _idoneita->curr();
|
||||
recido.zero();
|
||||
recido.put(IDO_CODICE, recsog.get(SOG_CODICE));
|
||||
recido.put(IDO_PROGIDO, progido);
|
||||
recido.put(IDO_DATAIDO, dataido);
|
||||
recido.put(IDO_TIPOIDO, fi->get("TIPOIDO"));
|
||||
recido.put(IDO_IDO_SOS, fi->get("IDO_SOS"));
|
||||
recido.put(IDO_INTERVALLO, fi->get("INTERVALLO"));
|
||||
recido.put(IDO_FINESOS, fi->get("FINESOS"));
|
||||
recido.put(IDO_MOTIVO, fi->get("MOTIVO"));
|
||||
TString80 resp = "port.-" ;
|
||||
resp << fi->get("RESPONSAB");
|
||||
recido.put(IDO_RESPONSAB, resp);
|
||||
modificato = TRUE;
|
||||
_sidoneita->insert_row(recido);
|
||||
_sidoneita->write(TRUE);
|
||||
}
|
||||
if (modificato)
|
||||
{
|
||||
TRectype* key = new TRectype(LF_CONTSAN);
|
||||
key->put(CON_CODICE, recsog.get(SOG_CODICE));
|
||||
_scontrolli->read(key);
|
||||
con_reord(recsog,_scontrolli,_sidoneita);
|
||||
//Verifico se la categoria del donatore è aggiornata al numero di donazioni dello stesso
|
||||
//se non lo è eseguo tutti i controlli per il salto automatico di categoria
|
||||
TString16 catdon = recsog.get(SOG_CATDON);
|
||||
const int totdon = recsog.get_int(SOG_TOTDON);
|
||||
if ((catdon == _catini1 || _catini1.empty()) && (totdon>=_numdon1) && _catfin1.not_empty())
|
||||
recsog.put(SOG_CATDON, _catfin1);
|
||||
const bool tstampata = recsog.get_bool(SOG_T_STAMPATA);
|
||||
if ((catdon == _catini2 || _catini2.empty()) && (totdon>=_numdon2) && _catfin2.not_empty() && (!_sttess2 || tstampata))
|
||||
recsog.put(SOG_CATDON, _catfin2);
|
||||
recsog.put(SOG_DATAULTAGG, oggi);
|
||||
recsog.put(SOG_UTENULTAGG, "PORT.");
|
||||
recsog.rewrite(_rel->lfile());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rigastampa = "";
|
||||
rigastampa << cognome;
|
||||
rigastampa << " " << nome;
|
||||
rigastampa << " " << datanasc.string();
|
||||
row.reset();
|
||||
row.put(rigastampa);
|
||||
printer().print(row);
|
||||
}
|
||||
}
|
||||
}
|
||||
delete pi1;
|
||||
delete fi;
|
||||
if (anagrafe)
|
||||
delete pi1;
|
||||
delete fi;
|
||||
}
|
||||
if (benemerenze)
|
||||
{
|
||||
TExternisamfile* fc = new TExternisamfile("$portaben");
|
||||
TProgind *pi;
|
||||
pi = new TProgind(fc->eod(),"Aggiornamento benemerenze", FALSE, TRUE, 10);
|
||||
pi->setstatus(1);
|
||||
for(fc->first(); !fc->eof(); fc->next())
|
||||
{
|
||||
pi->addstatus(1);
|
||||
modificato = FALSE;
|
||||
const TString80 cognome = fc->get("COGNOME");
|
||||
const TString80 nome = fc->get("NOME");
|
||||
const TDate datanasc = fc->get_date("DATANASC");
|
||||
recsog.zero();
|
||||
recsog.put(SOG_COGNOME, cognome);
|
||||
recsog.put(SOG_NOME, nome);
|
||||
recsog.put(SOG_DATANASC, datanasc);
|
||||
if (recsog.read(_rel->lfile())==NOERR)
|
||||
{
|
||||
TString16 tipoben = fc->get("TIPOBEN");
|
||||
bool esiste = FALSE;
|
||||
TRectype* key = new TRectype(LF_BENEM);
|
||||
key->put(BEN_CODICE, recsog.get(SOG_CODICE));
|
||||
_sbenem->read(key);
|
||||
for (int r=1; r<=_sbenem->rows(); r++)
|
||||
{
|
||||
const TRectype& riga = _sbenem->row(r);
|
||||
TString16 tipoben1 = riga.get(BEN_TIPOBEN);
|
||||
if (tipoben==tipoben1)
|
||||
esiste = TRUE;
|
||||
}
|
||||
if (!esiste)
|
||||
{
|
||||
int progben = _sbenem->rows()+1;
|
||||
TRectype& recben = _benem->curr();
|
||||
recben.zero();
|
||||
recben.put(BEN_CODICE, recsog.get(SOG_CODICE));
|
||||
recben.put(BEN_PROGBEN, progben);
|
||||
recben.put(BEN_TIPOBEN, fc->get("TIPOBEN"));
|
||||
recben.put(BEN_DATAMAT, fc->get("DATAMAT"));
|
||||
recben.put(BEN_BONUS, fc->get("BONUS"));
|
||||
recben.put(BEN_DATABEN, fc->get("DATABEN"));
|
||||
recben.put(BEN_DATACON, fc->get("DATACON"));
|
||||
recben.put(BEN_RITIRATA, fc->get("RITIRATA"));
|
||||
recben.put(BEN_CODSEZ, fc->get("CODSEZ"));
|
||||
recben.put(BEN_CODSOT, fc->get(",CODSOT"));
|
||||
recben.put(BEN_GRUPPOAZIE, fc->get("GRUPPOAZIE"));
|
||||
modificato = TRUE;
|
||||
_sbenem->insert_row(recben);
|
||||
_sbenem->write(TRUE);
|
||||
}
|
||||
if (modificato)
|
||||
{
|
||||
recsog.put(SOG_DATAULTAGG, oggi);
|
||||
recsog.put(SOG_UTENULTAGG, "PORT.");
|
||||
recsog.rewrite(_rel->lfile());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rigastampa = "";
|
||||
rigastampa << cognome;
|
||||
rigastampa << " " << nome;
|
||||
rigastampa << " " << datanasc.string();
|
||||
row.reset();
|
||||
row.put(rigastampa);
|
||||
printer().print(row);
|
||||
}
|
||||
}
|
||||
delete pi;
|
||||
delete fc;
|
||||
}
|
||||
if (anagrafica)
|
||||
{
|
||||
TExternisamfile* fs = new TExternisamfile("$portasog");
|
||||
TProgind *pi2;
|
||||
pi2 = new TProgind(fs->eod(),"Aggiornamento dati anagrafici da portatile", FALSE, TRUE, 10);
|
||||
pi2->setstatus(1);
|
||||
TProgind *pi;
|
||||
pi = new TProgind(fs->eod(),"Aggiornamento dati anagrafici", FALSE, TRUE, 10);
|
||||
pi->setstatus(1);
|
||||
for(fs->first(); !fs->eof(); fs->next())
|
||||
{
|
||||
pi2->addstatus(1);
|
||||
pi->addstatus(1);
|
||||
modificato = FALSE;
|
||||
const TString80 cognome = fs->get("COGNOME");
|
||||
const TString80 nome = fs->get("NOME");
|
||||
@ -313,6 +397,8 @@ bool TAggConSan::menu(MENU_TAG m)
|
||||
recsog.put(SOG_DATANASC, datanasc);
|
||||
if (recsog.read(_rel->lfile())==NOERR)
|
||||
{
|
||||
if (fs->get("DATAISC").not_empty())
|
||||
recsog.put(SOG_DATAISC, fs->get("DATAISC"));
|
||||
recsog.put(SOG_TESSAVIS, fs->get("TESSAVIS"));
|
||||
recsog.put(SOG_COGNOME_SP, fs->get("COGNOME_SP"));
|
||||
recsog.put(SOG_DOM_INDIR, fs->get("DOM_INDIR"));
|
||||
@ -364,7 +450,7 @@ bool TAggConSan::menu(MENU_TAG m)
|
||||
printer().print(row);
|
||||
}
|
||||
}
|
||||
delete pi2;
|
||||
delete pi;
|
||||
delete fs;
|
||||
}
|
||||
pr.formfeed();
|
||||
@ -381,6 +467,6 @@ int TAggConSan::write(TSheet_field& s)
|
||||
int at8200(int argc, char* argv[])
|
||||
{
|
||||
TAggConSan a;
|
||||
a.run(argc, argv, "Aggiornamento archivio da portatile");
|
||||
a.run(argc, argv, "Aggiornamento archivio da altra sezione");
|
||||
return 0;
|
||||
}
|
@ -1,4 +1,6 @@
|
||||
// aggiornamento archivio da portatili
|
||||
// definizione campi per maschera di selezione
|
||||
|
||||
#define F_ANAGRAFE 101
|
||||
#define F_CONTROLLI 101
|
||||
#define F_ANAGRAFICA 102
|
||||
#define F_BENEMERENZE 103
|
||||
|
@ -1,8 +1,19 @@
|
||||
#include "at8200a.h"
|
||||
PAGE "Aggiornamento archivio da portatili" -1 -1 78 20
|
||||
BOOLEAN F_ANAGRAFE
|
||||
|
||||
BOOLEAN F_CONTROLLI
|
||||
BEGIN
|
||||
PROMPT 2 5 "Aggiorna anche dati anagrafici"
|
||||
PROMPT 2 5 "Aggiorna controlli sanitari e idoneita'"
|
||||
END
|
||||
|
||||
BOOLEAN F_ANAGRAFICA
|
||||
BEGIN
|
||||
PROMPT 2 6 "Aggiorna dati anagrafici"
|
||||
END
|
||||
|
||||
BOOLEAN F_BENEMERENZE
|
||||
BEGIN
|
||||
PROMPT 2 7 "Aggiorna benemerenze"
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 9 2
|
||||
|
Loading…
x
Reference in New Issue
Block a user