Patch level : AT
Files correlati : at3.exe Ricompilazione Demo : [ ] Commento : useo della cache() git-svn-id: svn://10.65.10.50/trunk@10567 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
c5c2dc9d82
commit
cd0d4f6b8b
@ -4,6 +4,7 @@
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <real.h>
|
||||
#include <recarray.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
@ -246,12 +247,7 @@ void TStatSogxEta::crea_intestazione()
|
||||
if (_catdon.not_empty())
|
||||
{
|
||||
sep << "Categoria " << _catdon << ' ';
|
||||
TTable ctd("CTD");
|
||||
ctd.zero();
|
||||
ctd.put("CODTAB", _catdon);
|
||||
ctd.read();
|
||||
if (ctd.good())
|
||||
sep << ctd.get("S0");
|
||||
sep << cache().get("CTD", _catdon).get("S0");
|
||||
}
|
||||
else
|
||||
sep << "Tutte le categorie non dimessi";
|
||||
@ -566,10 +562,7 @@ bool TStatSogxEta::riepilogo()
|
||||
bool catdim, ok;
|
||||
const TDate oggi(TODAY);
|
||||
const int anno = oggi.year();
|
||||
TTable ctd("CTD");
|
||||
ctd.put("CODTAB", _catdon);
|
||||
if (ctd.read() == NOERR)
|
||||
catdim = ctd.get_bool("B0");
|
||||
catdim = cache().get("CTD", _catdon).get_bool("B0");
|
||||
TRectype& recsog = _cur->curr();
|
||||
long last = _cur->items();
|
||||
TProgind prg (last, "Elaborazione in corso... Prego attendere", FALSE, TRUE, 30);
|
||||
@ -596,29 +589,21 @@ bool TStatSogxEta::riepilogo()
|
||||
ok = ((catdon == _catdon) && (dataisc <= _data));
|
||||
if (!ok)
|
||||
{
|
||||
ctd.put("CODTAB", catdon);
|
||||
if (ctd.read() == NOERR)
|
||||
{
|
||||
catcoll = ctd.get("S6");
|
||||
datadim = recsog.get_date(SOG_DATADIM);
|
||||
ok = ((catcoll == _catdon) && (dataisc <= _data) && (datadim > _data));
|
||||
}
|
||||
catcoll = cache().get("CTD", catdon).get("S6");
|
||||
datadim = recsog.get_date(SOG_DATADIM);
|
||||
ok = ((catcoll == _catdon) && (dataisc <= _data) && (datadim > _data));
|
||||
// se la categoria collegata è vuota occorre esaminare lo storico
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ctd.put("CODTAB", catdon);
|
||||
dataisc = recsog.get_date(SOG_DATAISC);
|
||||
datadim = recsog.get_date(SOG_DATADIM);
|
||||
if (ctd.read() == NOERR)
|
||||
{
|
||||
if (ctd.get_bool("B0"))
|
||||
ok = ((dataisc <= _data) && (datadim > _data));
|
||||
else
|
||||
ok = (dataisc <= _data);
|
||||
}
|
||||
if (cache().get("CTD", catdon).get_bool("B0"))
|
||||
ok = ((dataisc <= _data) && (datadim > _data));
|
||||
else
|
||||
ok = (dataisc <= _data);
|
||||
}
|
||||
}
|
||||
if (ok)
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <real.h>
|
||||
#include <recarray.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
@ -258,12 +259,7 @@ void TStatisticaSog::crea_intestazione()
|
||||
if (_catdon.not_empty())
|
||||
{
|
||||
sep << "Categoria " << _catdon << ' ';
|
||||
TTable ctd("CTD");
|
||||
ctd.zero();
|
||||
ctd.put("CODTAB", _catdon);
|
||||
ctd.read();
|
||||
if (ctd.good())
|
||||
sep << ctd.get("S0");
|
||||
sep << cache().get("CTD", _catdon).get("S0");
|
||||
}
|
||||
else
|
||||
sep << "Tutte le categorie non dimessi";
|
||||
@ -565,10 +561,7 @@ bool TStatisticaSog::riepilogo()
|
||||
TString16 gruppo, rh, sesso;
|
||||
TDate dataisc, datadim;
|
||||
bool catdim, ok;
|
||||
TTable ctd("CTD");
|
||||
ctd.put("CODTAB", _catdon);
|
||||
if (ctd.read() == NOERR)
|
||||
catdim = ctd.get_bool("B0");
|
||||
catdim = cache().get("CTD", _catdon).get_bool("B0");
|
||||
TRectype& recsog = _cur->curr();
|
||||
long last = _cur->items();
|
||||
TProgind prg (last, "Elaborazione in corso... Prego attendere", FALSE, TRUE, 30);
|
||||
@ -595,29 +588,21 @@ bool TStatisticaSog::riepilogo()
|
||||
ok = ((catdon == _catdon) && (dataisc <= _data));
|
||||
if (!ok)
|
||||
{
|
||||
ctd.put("CODTAB", catdon);
|
||||
if (ctd.read() == NOERR)
|
||||
{
|
||||
catcoll = ctd.get("S6");
|
||||
catcoll = cache().get("CTD", catdon).get("S6");
|
||||
datadim = recsog.get_date(SOG_DATADIM);
|
||||
ok = ((catcoll == _catdon) && (dataisc <= _data) && (datadim > _data));
|
||||
}
|
||||
// se la categoria collegata è vuota occorre esaminare lo storico
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ctd.put("CODTAB", catdon);
|
||||
dataisc = recsog.get_date(SOG_DATAISC);
|
||||
datadim = recsog.get_date(SOG_DATADIM);
|
||||
if (ctd.read() == NOERR)
|
||||
{
|
||||
if (ctd.get_bool("B0"))
|
||||
ok = ((dataisc <= _data) && (datadim > _data));
|
||||
else
|
||||
ok = (dataisc <= _data);
|
||||
}
|
||||
if (cache().get("CTD", catdon).get_bool("B0"))
|
||||
ok = ((dataisc <= _data) && (datadim > _data));
|
||||
else
|
||||
ok = (dataisc <= _data);
|
||||
}
|
||||
}
|
||||
if (ok)
|
||||
|
Loading…
x
Reference in New Issue
Block a user