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,16 +863,17 @@ void TRelation_application::main_loop()
|
||||
// Provoca l'autopremimento per il messaggio di LINK
|
||||
if (_lnflag)
|
||||
{
|
||||
load_transaction();
|
||||
|
||||
if (_curr_transaction == TRANSACTION_INSERT )
|
||||
if (load_transaction())
|
||||
{
|
||||
_mask->send_key(K_CTRL+'N', 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
_autodelete = _curr_transaction == TRANSACTION_DELETE;
|
||||
_mask->send_key(K_AUTO_ENTER, 0);
|
||||
if (_curr_transaction == TRANSACTION_INSERT )
|
||||
{
|
||||
_mask->send_key(K_CTRL+'N', 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
_autodelete = _curr_transaction == TRANSACTION_DELETE;
|
||||
_mask->send_key(K_AUTO_ENTER, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -916,7 +917,7 @@ void TRelation_application::main_loop()
|
||||
k = K_ENTER;
|
||||
break;
|
||||
case K_ENTER:
|
||||
if (_lnflag)
|
||||
if (_lnflag && _curr_transaction != TRANSACTION_RUN)
|
||||
{
|
||||
for (k = 1; k <= MAX_KEYS && !test_key(k, FALSE); k++);
|
||||
if (k <= MAX_KEYS && find(k))
|
||||
@ -1044,6 +1045,7 @@ void TRelation_application::main_loop()
|
||||
if (_curr_transaction.not_empty())
|
||||
{
|
||||
TConfig ini(_trans_ini.row(_trans_counter), "Transaction");
|
||||
ini.set("Record", _recins);
|
||||
if (_recins >= 0)
|
||||
{
|
||||
ini.set("Result", "OK");
|
||||
@ -1264,7 +1266,7 @@ bool TRelation_application::parse_command_line()
|
||||
|
||||
bool TRelation_application::load_transaction()
|
||||
{
|
||||
bool retv=0;
|
||||
bool retv = FALSE;
|
||||
if (_trans_counter < _ntransactions)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
if (_curr_transaction == "RUN")
|
||||
retv= 0; // Ho gia' finito qui: basta il cambio ditta
|
||||
if (_curr_transaction == TRANSACTION_RUN)
|
||||
retv= FALSE; // Ho gia' finito qui: basta il cambio ditta
|
||||
else
|
||||
retv = 1; // Attiva automagia
|
||||
retv = TRUE; // Attiva automagia
|
||||
}
|
||||
return retv;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user