Corretta gestione modifymode nelle transazioni singole o multiple
git-svn-id: svn://10.65.10.50/trunk@6612 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
26a901a6ff
commit
e153f64143
@ -164,7 +164,9 @@ void TRelation_application::set_toolbar(bool all)
|
|||||||
if (all)
|
if (all)
|
||||||
{
|
{
|
||||||
pos = _mask->id2pos(DLG_SAVEREC);
|
pos = _mask->id2pos(DLG_SAVEREC);
|
||||||
if (pos >= 0) _mask->fld(pos).enable(mode != MODE_QUERY);
|
if (pos >= 0)
|
||||||
|
_mask->fld(pos).enable(mode != MODE_QUERY);
|
||||||
|
|
||||||
pos = _mask->id2pos(DLG_DELREC);
|
pos = _mask->id2pos(DLG_DELREC);
|
||||||
if (pos >= 0)
|
if (pos >= 0)
|
||||||
{
|
{
|
||||||
@ -179,6 +181,14 @@ void TRelation_application::set_toolbar(bool all)
|
|||||||
}
|
}
|
||||||
_mask->fld(pos).enable(enabdel);
|
_mask->fld(pos).enable(enabdel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pos = _mask->id2pos(DLG_FINDREC);
|
||||||
|
if (pos >= 0)
|
||||||
|
_mask->fld(pos).enable(_lnflag == 0);
|
||||||
|
|
||||||
|
pos = _mask->id2pos(DLG_NEWREC);
|
||||||
|
if (pos >= 0)
|
||||||
|
_mask->fld(pos).enable(mode == MODE_QUERY || _lnflag == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
enable_query();
|
enable_query();
|
||||||
@ -384,6 +394,10 @@ bool TRelation_application::modify_mode()
|
|||||||
|
|
||||||
get_relation()->save_status();
|
get_relation()->save_status();
|
||||||
init_modify_mode(*_mask);
|
init_modify_mode(*_mask);
|
||||||
|
|
||||||
|
if (_curr_transaction == TRANSACTION_MODIFY)
|
||||||
|
ini2insert_mask();
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -841,15 +855,11 @@ bool TRelation_application::firm_change_enabled() const
|
|||||||
|
|
||||||
void TRelation_application::main_loop()
|
void TRelation_application::main_loop()
|
||||||
{
|
{
|
||||||
|
|
||||||
KEY k;
|
KEY k;
|
||||||
do {
|
do {
|
||||||
// ciclo delle transazioni
|
// ciclo delle transazioni
|
||||||
_recins = -1;
|
_recins = -1;
|
||||||
|
|
||||||
query_mode();
|
|
||||||
_mask->open_modal();
|
|
||||||
|
|
||||||
// Provoca l'autopremimento per il messaggio di LINK
|
// Provoca l'autopremimento per il messaggio di LINK
|
||||||
if (_lnflag)
|
if (_lnflag)
|
||||||
{
|
{
|
||||||
@ -865,7 +875,11 @@ void TRelation_application::main_loop()
|
|||||||
_mask->send_key(K_AUTO_ENTER, 0);
|
_mask->send_key(K_AUTO_ENTER, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query_mode();
|
||||||
|
_mask->open_modal();
|
||||||
|
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
const bool change = firm_change_enabled();
|
const bool change = firm_change_enabled();
|
||||||
@ -1245,7 +1259,7 @@ bool TRelation_application::parse_command_line()
|
|||||||
_ntransactions= _trans_ini.items();
|
_ntransactions= _trans_ini.items();
|
||||||
|
|
||||||
_lnflag = _ntransactions>0;
|
_lnflag = _ntransactions>0;
|
||||||
return _lnflag;
|
return _lnflag != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TRelation_application::load_transaction()
|
bool TRelation_application::load_transaction()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user