#define XIDON_SI "SI" #define XIDON_AF "AF" bool xis_idon_one(TString idon, const char* tipo) // verifica che l'idoneità "idon" sia del tipo "tipo" // esempio: se passo PL, AF restituisce TRUE { bool is_idon = FALSE; TTable ido("IDO"); ido.put("CODTAB",idon); if (ido.read() == NOERR) { TString tipol(2); tipol = ido.get("S6"); if (tipol == tipo) is_idon = TRUE; } return is_idon; } bool xis_idon(TString id1, TString id2, TString id3, TString id4, const char* tipo) //verifica che almeno una delle "id" sia del tipo "tipo" { return (xis_idon_one(id1,tipo) || xis_idon_one(id2,tipo) || xis_idon_one(id3,tipo) || xis_idon_one(id4,tipo)); } bool xis_donaz(TString don, const char* tipo) // verifica che il tipo di donazione "don" sia del tipo "tipo" { bool is_don = FALSE; TTable tdn("TDN"); tdn.put("CODTAB",don); if (tdn.read() == NOERR) { TString tipol(2); tipol = tdn.get("S6"); if (tipol == tipo) is_don = TRUE; } return is_don; } char xmodstato_tcs(TString tipo) //verifica se il controllo sanitario "tipo" è un controllo che modifica lo stato del soggetto { char modstato = ' '; TTable tcs("TCS"); tcs.put("CODTAB",tipo); if (tcs.read() == NOERR) modstato = tcs.get_char("S6"); return modstato; }