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 <printer.h>
|
||||||
#include <progind.h>
|
#include <progind.h>
|
||||||
#include <real.h>
|
#include <real.h>
|
||||||
|
#include <recarray.h>
|
||||||
#include <relation.h>
|
#include <relation.h>
|
||||||
#include <tabutil.h>
|
#include <tabutil.h>
|
||||||
#include <urldefid.h>
|
#include <urldefid.h>
|
||||||
@ -246,12 +247,7 @@ void TStatSogxEta::crea_intestazione()
|
|||||||
if (_catdon.not_empty())
|
if (_catdon.not_empty())
|
||||||
{
|
{
|
||||||
sep << "Categoria " << _catdon << ' ';
|
sep << "Categoria " << _catdon << ' ';
|
||||||
TTable ctd("CTD");
|
sep << cache().get("CTD", _catdon).get("S0");
|
||||||
ctd.zero();
|
|
||||||
ctd.put("CODTAB", _catdon);
|
|
||||||
ctd.read();
|
|
||||||
if (ctd.good())
|
|
||||||
sep << ctd.get("S0");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
sep << "Tutte le categorie non dimessi";
|
sep << "Tutte le categorie non dimessi";
|
||||||
@ -566,10 +562,7 @@ bool TStatSogxEta::riepilogo()
|
|||||||
bool catdim, ok;
|
bool catdim, ok;
|
||||||
const TDate oggi(TODAY);
|
const TDate oggi(TODAY);
|
||||||
const int anno = oggi.year();
|
const int anno = oggi.year();
|
||||||
TTable ctd("CTD");
|
catdim = cache().get("CTD", _catdon).get_bool("B0");
|
||||||
ctd.put("CODTAB", _catdon);
|
|
||||||
if (ctd.read() == NOERR)
|
|
||||||
catdim = ctd.get_bool("B0");
|
|
||||||
TRectype& recsog = _cur->curr();
|
TRectype& recsog = _cur->curr();
|
||||||
long last = _cur->items();
|
long last = _cur->items();
|
||||||
TProgind prg (last, "Elaborazione in corso... Prego attendere", FALSE, TRUE, 30);
|
TProgind prg (last, "Elaborazione in corso... Prego attendere", FALSE, TRUE, 30);
|
||||||
@ -596,29 +589,21 @@ bool TStatSogxEta::riepilogo()
|
|||||||
ok = ((catdon == _catdon) && (dataisc <= _data));
|
ok = ((catdon == _catdon) && (dataisc <= _data));
|
||||||
if (!ok)
|
if (!ok)
|
||||||
{
|
{
|
||||||
ctd.put("CODTAB", catdon);
|
catcoll = cache().get("CTD", catdon).get("S6");
|
||||||
if (ctd.read() == NOERR)
|
datadim = recsog.get_date(SOG_DATADIM);
|
||||||
{
|
ok = ((catcoll == _catdon) && (dataisc <= _data) && (datadim > _data));
|
||||||
catcoll = ctd.get("S6");
|
|
||||||
datadim = recsog.get_date(SOG_DATADIM);
|
|
||||||
ok = ((catcoll == _catdon) && (dataisc <= _data) && (datadim > _data));
|
|
||||||
}
|
|
||||||
// se la categoria collegata è vuota occorre esaminare lo storico
|
// se la categoria collegata è vuota occorre esaminare lo storico
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ctd.put("CODTAB", catdon);
|
|
||||||
dataisc = recsog.get_date(SOG_DATAISC);
|
dataisc = recsog.get_date(SOG_DATAISC);
|
||||||
datadim = recsog.get_date(SOG_DATADIM);
|
datadim = recsog.get_date(SOG_DATADIM);
|
||||||
if (ctd.read() == NOERR)
|
if (cache().get("CTD", catdon).get_bool("B0"))
|
||||||
{
|
ok = ((dataisc <= _data) && (datadim > _data));
|
||||||
if (ctd.get_bool("B0"))
|
else
|
||||||
ok = ((dataisc <= _data) && (datadim > _data));
|
ok = (dataisc <= _data);
|
||||||
else
|
|
||||||
ok = (dataisc <= _data);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ok)
|
if (ok)
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include <printer.h>
|
#include <printer.h>
|
||||||
#include <progind.h>
|
#include <progind.h>
|
||||||
#include <real.h>
|
#include <real.h>
|
||||||
|
#include <recarray.h>
|
||||||
#include <relation.h>
|
#include <relation.h>
|
||||||
#include <tabutil.h>
|
#include <tabutil.h>
|
||||||
#include <urldefid.h>
|
#include <urldefid.h>
|
||||||
@ -258,12 +259,7 @@ void TStatisticaSog::crea_intestazione()
|
|||||||
if (_catdon.not_empty())
|
if (_catdon.not_empty())
|
||||||
{
|
{
|
||||||
sep << "Categoria " << _catdon << ' ';
|
sep << "Categoria " << _catdon << ' ';
|
||||||
TTable ctd("CTD");
|
sep << cache().get("CTD", _catdon).get("S0");
|
||||||
ctd.zero();
|
|
||||||
ctd.put("CODTAB", _catdon);
|
|
||||||
ctd.read();
|
|
||||||
if (ctd.good())
|
|
||||||
sep << ctd.get("S0");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
sep << "Tutte le categorie non dimessi";
|
sep << "Tutte le categorie non dimessi";
|
||||||
@ -565,10 +561,7 @@ bool TStatisticaSog::riepilogo()
|
|||||||
TString16 gruppo, rh, sesso;
|
TString16 gruppo, rh, sesso;
|
||||||
TDate dataisc, datadim;
|
TDate dataisc, datadim;
|
||||||
bool catdim, ok;
|
bool catdim, ok;
|
||||||
TTable ctd("CTD");
|
catdim = cache().get("CTD", _catdon).get_bool("B0");
|
||||||
ctd.put("CODTAB", _catdon);
|
|
||||||
if (ctd.read() == NOERR)
|
|
||||||
catdim = ctd.get_bool("B0");
|
|
||||||
TRectype& recsog = _cur->curr();
|
TRectype& recsog = _cur->curr();
|
||||||
long last = _cur->items();
|
long last = _cur->items();
|
||||||
TProgind prg (last, "Elaborazione in corso... Prego attendere", FALSE, TRUE, 30);
|
TProgind prg (last, "Elaborazione in corso... Prego attendere", FALSE, TRUE, 30);
|
||||||
@ -595,29 +588,21 @@ bool TStatisticaSog::riepilogo()
|
|||||||
ok = ((catdon == _catdon) && (dataisc <= _data));
|
ok = ((catdon == _catdon) && (dataisc <= _data));
|
||||||
if (!ok)
|
if (!ok)
|
||||||
{
|
{
|
||||||
ctd.put("CODTAB", catdon);
|
catcoll = cache().get("CTD", catdon).get("S6");
|
||||||
if (ctd.read() == NOERR)
|
|
||||||
{
|
|
||||||
catcoll = ctd.get("S6");
|
|
||||||
datadim = recsog.get_date(SOG_DATADIM);
|
datadim = recsog.get_date(SOG_DATADIM);
|
||||||
ok = ((catcoll == _catdon) && (dataisc <= _data) && (datadim > _data));
|
ok = ((catcoll == _catdon) && (dataisc <= _data) && (datadim > _data));
|
||||||
}
|
|
||||||
// se la categoria collegata è vuota occorre esaminare lo storico
|
// se la categoria collegata è vuota occorre esaminare lo storico
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ctd.put("CODTAB", catdon);
|
|
||||||
dataisc = recsog.get_date(SOG_DATAISC);
|
dataisc = recsog.get_date(SOG_DATAISC);
|
||||||
datadim = recsog.get_date(SOG_DATADIM);
|
datadim = recsog.get_date(SOG_DATADIM);
|
||||||
if (ctd.read() == NOERR)
|
if (cache().get("CTD", catdon).get_bool("B0"))
|
||||||
{
|
ok = ((dataisc <= _data) && (datadim > _data));
|
||||||
if (ctd.get_bool("B0"))
|
else
|
||||||
ok = ((dataisc <= _data) && (datadim > _data));
|
ok = (dataisc <= _data);
|
||||||
else
|
|
||||||
ok = (dataisc <= _data);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ok)
|
if (ok)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user