Patch level : AT

Files correlati     :
Ricompilazione Demo : [ ]
Commento            : modifiche varie AVIS


git-svn-id: svn://10.65.10.50/trunk@10559 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
cris 2002-10-24 08:58:42 +00:00
parent d2816f518e
commit 32a0e3ac3f
3 changed files with 38 additions and 6 deletions

View File

@ -1,6 +1,8 @@
#include <recarray.h>
#include <printer.h>
#include "soggetti.h"
#define IDON_SI "SI"
#define IDON_AF "AF"
#define IDON_PL "PL"
@ -10,9 +12,27 @@
bool is_idon_one(TString16 idon, const char* tipo);
bool is_idon(TString16 id1, TString16 id2, TString16 id3, TString16 id4, const char* tipo);
bool is_donaz(TString16 don, const char* tipo);
char modstato_tcs(TString16 tipo);
char modstato_tcs(const TString16 tipo);
void con_reord(TRectype& soggetto, TRecord_array* controlli, TRecord_array* idoneita);
void ido_reord(TRectype& soggetto, TRecord_array* idoneita);
void don_datepross(TRectype& soggetto);
void calcola_donazioni_lib(TRectype& soggetto, TRecord_array* donazioni);
bool configura_stampante(TPrinter& p, const TString16& configurazione, const TString16& tipostampa);
class TSoggetto : public TRectype
{
protected:
int read(const long codice);
virtual TSoggetto & copy(const TSoggetto & a) { return (TSoggetto &) TRectype::operator=((TRectype &)a);}
public:
TObject* dup() const { return new TSoggetto(*this); }
const long codice() const { return get_long(SOG_CODICE);}
const TString& cognome() const { return get(SOG_COGNOME); }
const TString& nome() const { return get(SOG_NOME); }
TSoggetto(const long codice = 0);
TSoggetto(const TSoggetto & a);
TSoggetto(const TRectype& rec);
virtual ~TSoggetto() {}
};

View File

@ -4,12 +4,24 @@
#include "atlib.h"
#include "soggetti.h"
#include "contsan.h"
#include "donaz.h"
#include "idoneita.h"
#include "rconvoc.h"
static int compare_date(const TObject** o1, const TObject** o2)
{
TRectype* s1 = (TRectype*)*o1;
TRectype* s2 = (TRectype*)*o2;
const TDate d1(s1->get(DON_DATADON));
const TDate d2(s2->get(DON_DATADON));
int d=0;
if (d1>d2) d=+1;
else
if (d1<d2) d=-1;
return d;
}
bool is_idon_one(TString16 idon, const char* tipo)
// verifica che l'idoneità "idon" sia del tipo "tipo"
// esempio: se passo PL, AF restituisce TRUE
@ -49,7 +61,7 @@ bool is_donaz(TString16 don, const char* tipo)
return is_don;
}
char modstato_tcs(TString16 tipo)
char modstato_tcs(const TString16 tipo)
// verifica se il controllo sanitario "tipo" e' un controllo che modifica
// lo stato del soggetto
{
@ -442,9 +454,9 @@ void calcola_donazioni_lib(TRectype& soggetto, TRecord_array* donazioni)
soggetto.put(SOG_TOTDON,donprecsi+donprecaf);
}
else
{
{
donazioni->sort(compare_date);
const TRectype& row = donazioni->row(i);
ultdata = row.get_date(DON_DATADON);
ulttipo = row.get(DON_TIPODON);
soggetto.put(SOG_DATAULTDON,ultdata);

View File

@ -11,4 +11,4 @@
#define F_TABLDN_ORARIO 110
#define F_TABLDN_NOTE1 111
#define F_TABLDN_NOTE2 112
#define DLG_DEL 113
#define DLG_DEL 115