Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : Sostituito message_box con error_box e corretto handler sul codice soggetto (to_check e K_TAB) git-svn-id: svn://10.65.10.50/trunk@6813 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
82d0205341
commit
4bb6ba0509
@ -180,7 +180,7 @@ bool TGiornalieroDC::menu(MENU_TAG m)
|
||||
TGiornalieroDC::read(s);
|
||||
}
|
||||
else
|
||||
message_box("Inserire almeno la data donazione per effettuare la ricerca");
|
||||
error_box("Inserire almeno la data donazione per effettuare la ricerca");
|
||||
}
|
||||
break;
|
||||
|
||||
@ -308,10 +308,10 @@ int TGiornalieroDC::write(TSheet_field& s)
|
||||
pi->setstatus(1);
|
||||
TLocalisamfile& sog = get_relation()->lfile();
|
||||
TLocalisamfile rconv(LF_RCONVOC);
|
||||
for (int r=1; r<=s.items(); r++)
|
||||
for (int rigasog=1; rigasog<=s.items(); rigasog++)
|
||||
{
|
||||
pi->addstatus(1);
|
||||
TToken_string& row = s.row(r-1);
|
||||
TToken_string& row = s.row(rigasog-1);
|
||||
const long codsog = row.get_long(0);
|
||||
if (codsog != 0)
|
||||
{
|
||||
@ -442,11 +442,16 @@ int TGiornalieroDC::write(TSheet_field& s)
|
||||
_sdonazioni->insert_row(rec);
|
||||
}
|
||||
if (!exist)
|
||||
{
|
||||
_sdonazioni->write(TRUE);
|
||||
{
|
||||
if (insert)
|
||||
{
|
||||
err = _sdonazioni->row(_sdonazioni->rows()).write(*_donaz);
|
||||
}
|
||||
else
|
||||
err = _sdonazioni->write(TRUE);
|
||||
|
||||
// controllo se è idoneo
|
||||
|
||||
|
||||
int totdon = sog.get_int(SOG_TOTDON);
|
||||
TDate dataultdon = sog.get_date(SOG_DATAULTDON);
|
||||
sog.put(SOG_TOTDON,totdon+1);
|
||||
@ -601,8 +606,13 @@ int TGiornalieroDC::write(TSheet_field& s)
|
||||
const TDate oggi(TODAY);
|
||||
sog.put(SOG_DATAULTAGG,oggi);
|
||||
sog.put(SOG_UTENULTAGG,user());
|
||||
|
||||
sog.rewrite();
|
||||
if (err == NOERR)
|
||||
sog.rewrite();
|
||||
else
|
||||
{
|
||||
error_box("Errore %d durante la scrittura della riga %d", err, rigasog);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -631,8 +641,8 @@ bool TGiornalieroDC::soggetti_notify(TSheet_field& s, int r, KEY k)
|
||||
// richiesta inserimento riga
|
||||
if (app()._ricerca)
|
||||
{
|
||||
s.message_box("Fase di ricerca: impossibile inserire donazioni");
|
||||
ok = FALSE;
|
||||
ok = s.error_box("Fase di ricerca: impossibile inserire donazioni");
|
||||
//ok = FALSE;
|
||||
}
|
||||
break;
|
||||
case K_DEL:
|
||||
@ -731,7 +741,7 @@ bool TGiornalieroDC::nome_handler(TMask_field& f, KEY k)
|
||||
bool TGiornalieroDC::codice_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
bool ok = TRUE;
|
||||
if (f.to_check(k))
|
||||
if ((k==K_TAB) && (f.to_check(k)))
|
||||
{
|
||||
TString256 messaggio = "";
|
||||
TMask& m = f.mask();
|
||||
@ -795,9 +805,10 @@ bool TGiornalieroDC::codice_handler(TMask_field& f, KEY k)
|
||||
}
|
||||
else
|
||||
ok = FALSE; // codice non esistente
|
||||
}
|
||||
if (messaggio.not_empty() && !app()._ricerca && !app()._nomessage)
|
||||
f.message_box(messaggio);
|
||||
if (messaggio.not_empty() && !app()._ricerca && !app()._nomessage)
|
||||
//f.message_box(messaggio);
|
||||
warning_box(messaggio);
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
@ -383,7 +383,7 @@ bool TGiornalieroC::nome_handler(TMask_field& f, KEY k)
|
||||
bool TGiornalieroC::codice_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
bool ok = TRUE;
|
||||
if (f.to_check(k))
|
||||
if ((k==K_TAB) && (f.to_check(k)))
|
||||
{
|
||||
TMask& m = f.mask();
|
||||
long codsog = m.get_long(F_S_CODICE);
|
||||
|
Loading…
x
Reference in New Issue
Block a user