Patch level :1.7 004
Files correlati :at8.exe Ricompilazione Demo : [ ] Commento :eliminata la dataidoneitá = dataacquisizione da winsit per i soggetti non donatori (avis BO) git-svn-id: svn://10.65.10.50/trunk@10026 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
0f5ea75fc9
commit
a36a5c61a3
@ -23,9 +23,9 @@
|
||||
|
||||
#define ATFILENAME "pippo.txt"
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////
|
||||
// Classe TCtbo2at_file customizzata dalla TFile_text //
|
||||
/////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
class TCtbo2at_file: public TFile_text
|
||||
{
|
||||
@ -68,9 +68,9 @@ int TCtbo2at_file::autosave(TRelation& rel, const TRecord_text& rec)
|
||||
bool vuoto = valore.blank();
|
||||
if (valore[0] == '@') //se trovo il carattere @ -> azzero il campo
|
||||
valore.cut(0);
|
||||
switch(tipo_campo)
|
||||
switch(tipo_campo) //in base al tipo di campo formatta i valori seguendo le specifiche del tracciato
|
||||
{
|
||||
case _datefld:
|
||||
case _datefld: //tipo data...
|
||||
{
|
||||
if (real::is_null(valore))
|
||||
{
|
||||
@ -81,7 +81,7 @@ int TCtbo2at_file::autosave(TRelation& rel, const TRecord_text& rec)
|
||||
format_date(data, fpicture(tc), valore);//formatta la data secondo le specifiche del tracciato
|
||||
}
|
||||
break;
|
||||
case _realfld:
|
||||
case _realfld: //tipi numerici
|
||||
case _intfld:
|
||||
case _longfld:
|
||||
{
|
||||
@ -213,7 +213,7 @@ bool TCtbo2at::test_donation(TRectype& recsog, const char* tipo, const TDate& da
|
||||
rec->put(DON_CODSEZ,recsog.get(SOG_CODSEZ));
|
||||
rec->put(DON_CODSOT,recsog.get(SOG_CODSOT));
|
||||
rec->put(DON_LUOGODON, luogodon);
|
||||
if (r == 0)
|
||||
if (r == 0) //puó essere una prima donazione...
|
||||
rec->put(DON_PRIMADON,"X");
|
||||
|
||||
donazioni.insert_row(rec);
|
||||
@ -271,8 +271,8 @@ bool TCtbo2at::test_inter(TRectype& recsog, const char* tipo, const TDate& datad
|
||||
TRecord_array idoneita(LF_IDONEITA,IDO_PROGIDO);
|
||||
idoneita.read(key);
|
||||
|
||||
const int r = idoneita.last_row(); //se trova una data idoneita >= di quella in esame, quest'ultima
|
||||
if (r > 0) //viene ignorata
|
||||
const int r = idoneita.last_row(); //se trova una data idoneita >= di quella in esame, quest'ultima viene ignorata
|
||||
if (r > 0)
|
||||
{
|
||||
const TRectype& lastido = idoneita[r];
|
||||
if (lastido.get_date(IDO_DATAIDO) >= datadon)
|
||||
@ -282,8 +282,8 @@ bool TCtbo2at::test_inter(TRectype& recsog, const char* tipo, const TDate& datad
|
||||
TRectype* rec = new TRectype(LF_IDONEITA);
|
||||
rec->put(IDO_CODICE, recsog.get(SOG_CODICE));
|
||||
rec->put(IDO_PROGIDO, r+1);
|
||||
rec->put(IDO_DATAIDO, datadon);
|
||||
rec->put(IDO_TIPOIDO, stricmp(tipo, "SI") != 0 ? "AF" : "SI"); // Il mondo è bello perchè c'é l'AVIS
|
||||
rec->put(IDO_DATAIDO, datadon);
|
||||
rec->put(IDO_TIPOIDO, stricmp(tipo, "SI") != 0 ? "AF" : "SI"); // Il mondo è bello perchè c'é l'AVIS (tutte le donaz. non SI sono AF! mah?!)
|
||||
rec->put(IDO_IDO_SOS, "ID");
|
||||
rec->put(IDO_INTERVALLO, inter);
|
||||
idoneita.add_row(rec);
|
||||
@ -340,9 +340,10 @@ void TCtbo2at::transfer()
|
||||
str1.trim();
|
||||
if (str != sogg.get(SOG_CODSEZ) && str != "01" && str1 == "")
|
||||
curr.add("@",1);
|
||||
|
||||
|
||||
//esegue l'effettivo passaggio dati basandosi sulla formattazione del file .ini
|
||||
_trasfile->autosave(rel, curr);
|
||||
//const long codsog = atol(curr.get(2));
|
||||
|
||||
const char* tipo[] = { "SI", "PL", "PI", "PP" };
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
@ -363,11 +364,12 @@ void TCtbo2at::transfer()
|
||||
if (str == "IMOLA")
|
||||
str = "70";
|
||||
update |= test_donation(sogg, tipo[i], datadon, str);
|
||||
}
|
||||
str = curr.get(27+i);
|
||||
if (!real::is_null(str))
|
||||
{
|
||||
update |= test_inter(sogg, tipo[i], datadon, atoi(str));
|
||||
//rimette a posto idoneitá ed intervalli vari...(lo fa solo per chi ha donato perché per gli altri non viene passata
|
||||
//alcuna data... winsit del c...o!)
|
||||
str = curr.get(27+i);
|
||||
if (!real::is_null(str))
|
||||
update |= test_inter(sogg, tipo[i], datadon, atoi(str));
|
||||
|
||||
}
|
||||
if (update)
|
||||
rel.rewrite();
|
||||
|
Loading…
x
Reference in New Issue
Block a user