Corretta gestione transazione RUN
git-svn-id: svn://10.65.10.50/trunk@6619 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
233593b7fb
commit
77f3e31229
@ -863,8 +863,8 @@ void TRelation_application::main_loop()
|
|||||||
// Provoca l'autopremimento per il messaggio di LINK
|
// Provoca l'autopremimento per il messaggio di LINK
|
||||||
if (_lnflag)
|
if (_lnflag)
|
||||||
{
|
{
|
||||||
load_transaction();
|
if (load_transaction())
|
||||||
|
{
|
||||||
if (_curr_transaction == TRANSACTION_INSERT )
|
if (_curr_transaction == TRANSACTION_INSERT )
|
||||||
{
|
{
|
||||||
_mask->send_key(K_CTRL+'N', 0);
|
_mask->send_key(K_CTRL+'N', 0);
|
||||||
@ -875,6 +875,7 @@ void TRelation_application::main_loop()
|
|||||||
_mask->send_key(K_AUTO_ENTER, 0);
|
_mask->send_key(K_AUTO_ENTER, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
query_mode();
|
query_mode();
|
||||||
_mask->open_modal();
|
_mask->open_modal();
|
||||||
@ -916,7 +917,7 @@ void TRelation_application::main_loop()
|
|||||||
k = K_ENTER;
|
k = K_ENTER;
|
||||||
break;
|
break;
|
||||||
case K_ENTER:
|
case K_ENTER:
|
||||||
if (_lnflag)
|
if (_lnflag && _curr_transaction != TRANSACTION_RUN)
|
||||||
{
|
{
|
||||||
for (k = 1; k <= MAX_KEYS && !test_key(k, FALSE); k++);
|
for (k = 1; k <= MAX_KEYS && !test_key(k, FALSE); k++);
|
||||||
if (k <= MAX_KEYS && find(k))
|
if (k <= MAX_KEYS && find(k))
|
||||||
@ -1044,6 +1045,7 @@ void TRelation_application::main_loop()
|
|||||||
if (_curr_transaction.not_empty())
|
if (_curr_transaction.not_empty())
|
||||||
{
|
{
|
||||||
TConfig ini(_trans_ini.row(_trans_counter), "Transaction");
|
TConfig ini(_trans_ini.row(_trans_counter), "Transaction");
|
||||||
|
ini.set("Record", _recins);
|
||||||
if (_recins >= 0)
|
if (_recins >= 0)
|
||||||
{
|
{
|
||||||
ini.set("Result", "OK");
|
ini.set("Result", "OK");
|
||||||
@ -1264,7 +1266,7 @@ bool TRelation_application::parse_command_line()
|
|||||||
|
|
||||||
bool TRelation_application::load_transaction()
|
bool TRelation_application::load_transaction()
|
||||||
{
|
{
|
||||||
bool retv=0;
|
bool retv = FALSE;
|
||||||
if (_trans_counter < _ntransactions)
|
if (_trans_counter < _ntransactions)
|
||||||
{
|
{
|
||||||
TConfig cnf(_trans_ini.row(_trans_counter), "Transaction");
|
TConfig cnf(_trans_ini.row(_trans_counter), "Transaction");
|
||||||
@ -1282,10 +1284,10 @@ bool TRelation_application::load_transaction()
|
|||||||
error_box("La ditta %ld non esiste", firm);
|
error_box("La ditta %ld non esiste", firm);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_curr_transaction == "RUN")
|
if (_curr_transaction == TRANSACTION_RUN)
|
||||||
retv= 0; // Ho gia' finito qui: basta il cambio ditta
|
retv= FALSE; // Ho gia' finito qui: basta il cambio ditta
|
||||||
else
|
else
|
||||||
retv = 1; // Attiva automagia
|
retv = TRUE; // Attiva automagia
|
||||||
}
|
}
|
||||||
return retv;
|
return retv;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user