campo-sirio/at/chkdon.cpp
alex 9e87d4da39 Prima versione di AT Win
git-svn-id: svn://10.65.10.50/trunk@3294 c028cbd2-c16b-5b4b-a496-9718f37d4682
1996-07-30 14:46:52 +00:00

21 lines
463 B
C++
Executable File

bool TDonaz_app::check_don(const long codsog, const TDate datadon)
{
bool ok = TRUE;
TRectype* key = new TRectype(LF_DONAZ);
key->put(DON_CODICE, codsog);
TRecord_array adon = TRecord_array(LF_DONAZ, DON_PROGDON);
int err = adon.read(key);
if (err == NOERR)
{
for (int r=1; r<=adon.rows(); r++)
{
const TRectype& riga = adon.row(r);
const TDate dataact = riga.get(DON_DATADON);
if (dataact == datadon)
ok = FALSE;
}
}
return ok;
}