Aggiunto messaggio nel caso di auto-numeriazione

git-svn-id: svn://10.65.10.50/trunk@1337 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1995-05-10 08:57:51 +00:00
parent 71f7a90873
commit 0bc5884a64
2 changed files with 14 additions and 4 deletions

View File

@ -1,4 +1,4 @@
// $Id: relapp.cpp,v 1.54 1995-05-09 13:33:26 guy Exp $
// $Id: relapp.cpp,v 1.55 1995-05-10 08:57:48 alex Exp $
#include <mailbox.h>
#include <sheet.h>
#include <urldefid.h>
@ -329,6 +329,7 @@ bool TRelation_application::autonum(TMask* m, bool rec)
if (!rec && !m->query_mode())
m->reset();
_renum_message = "";
for (const char* n = k.get(0); n && *n; n = k.get())
{
@ -338,6 +339,8 @@ bool TRelation_application::autonum(TMask* m, bool rec)
TMask_field& f = m->field(id);
if (rec || f.get().empty()) f.set(val);
if (rec) f.autosave(get_relation());
if (_renum_message.empty() || f.in_key(1))
_renum_message.format("Il documento e' stato registrato con :\n %s = %s", (const char *) f.prompt(), (const char *) f.get());
}
return k.not_empty();
}
@ -638,7 +641,8 @@ bool TRelation_application::save(bool check_dirty)
begin_wait();
if (mode == MODE_INS)
{
bool changed = TRUE;
bool changed = TRUE;
bool changed_key = FALSE;
while (changed)
{
@ -650,7 +654,10 @@ bool TRelation_application::save(bool check_dirty)
if (!changed)
{
_mask->disable_starting_check();
enable_query(); // Abilita chiave 1 per rinumerazione manuale
enable_query(); // Abilita chiave 1 per rinumerazione manuale
}
else
changed_key = TRUE;
}
}
else
@ -658,6 +665,8 @@ bool TRelation_application::save(bool check_dirty)
}
if (err == NOERR)
{
if (changed_key)
message_box(_renum_message);
get_relation()->save_status();
set_limits();
get_relation()->restore_status();

View File

@ -26,7 +26,8 @@ class TRelation_application : public TApplication
long _recins;
bool _lnflag;
TToken_string _fixed;
TToken_string _fixed;
TString _renum_message;
virtual bool create();
virtual bool destroy();