Patch level : 4.0
Files correlati : cg3.exe Ricompilazione Demo : [ ] Commento : Allineato alla 3.0 git-svn-id: svn://10.65.10.50/trunk@15002 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
f7fb19d8cc
commit
2c139d8b39
@ -77,7 +77,7 @@ void TAllegati_set::add(const TAllegato_info& info)
|
||||
const TRectype& clifo = info.clifo();
|
||||
for (unsigned int i = 0; i < columns(); i++)
|
||||
{
|
||||
const TString& field = TAS400_recordset::column_info(i)._name;
|
||||
const TString& field = column_info(i)._name;
|
||||
if (clifo.type(field) != _nullfld)
|
||||
set(field, TVariant(clifo.get(field)));
|
||||
else
|
||||
@ -272,9 +272,6 @@ void TAlleg_mask::scan_iva_rows(const TRecordset& mov)
|
||||
TToken_string clifo_key;
|
||||
clifo_key << mov.get(MOV_TIPO) << '|' << mov.get(MOV_CODCF);
|
||||
const TRectype& clifo = cache().get(LF_CLIFO, clifo_key);
|
||||
if (clifo.empty())
|
||||
return;
|
||||
|
||||
const long codalleg = clifo.get_long(CLI_CODALLEG);
|
||||
if (codalleg > 0) // Aggiorno codice clifo con allegato
|
||||
clifo_key.add(codalleg,1);
|
||||
@ -321,6 +318,8 @@ TRecordset* TAlleg_mask::new_recordset()
|
||||
query << "\nTO TIPO=#TYPE"; // Inutile dire CODCF=999999
|
||||
TISAM_recordset mov(query);
|
||||
|
||||
_clifi.destroy();
|
||||
|
||||
const TString& tipo = get(F_TIPO);
|
||||
const int anno = get_int(F_ANNO);
|
||||
mov.set_var("#YEAR", TVariant(long(anno)));
|
||||
@ -377,22 +376,18 @@ bool TAlleg_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
case DLG_SELECT:
|
||||
if (e == fe_button)
|
||||
{
|
||||
KEY k = K_ENTER;
|
||||
while (k == K_ENTER)
|
||||
TRecordset* rs = new_recordset();
|
||||
TRecordset_sheet sheet(*rs, TR("Elenco di controllo"), 0x8);
|
||||
while (sheet.run() == K_ENTER)
|
||||
{
|
||||
TRecordset* rs = new_recordset();
|
||||
TRecordset_sheet sheet(*rs, TR("Elenco di controllo"), 0x8);
|
||||
k = sheet.run();
|
||||
if (k == K_ENTER)
|
||||
{
|
||||
const long sel = sheet.selected();
|
||||
TToken_string& row = sheet.row(sel);
|
||||
TRectype clifo(LF_CLIFO);
|
||||
clifo.put(CLI_TIPOCF, row.get(0));
|
||||
clifo.put(CLI_CODCF, row.get(1));
|
||||
}
|
||||
delete rs;
|
||||
const long sel = sheet.selected();
|
||||
TToken_string& row = sheet.row(sel);
|
||||
TRectype clifo(LF_CLIFO);
|
||||
clifo.put(CLI_TIPOCF, row.get(0));
|
||||
clifo.put(CLI_CODCF, row.get(1));
|
||||
clifo.edit();
|
||||
}
|
||||
delete rs;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@ -450,9 +445,9 @@ public:
|
||||
virtual void main_loop();
|
||||
};
|
||||
|
||||
|
||||
void TClifo_alleg_app::main_loop()
|
||||
{
|
||||
open_files(LF_CAUSALI, LF_CLIFO, LF_COMUNI, LF_MOV, LF_RMOVIVA, 0);
|
||||
TAlleg_mask m;
|
||||
m.run();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user