Patch level : 10.0 900

Files correlati     : cg3.exe
Ricompilazione Demo : [ ]
Commento            :

Bug 0001760: Visualizzazione Mastrini (cg3)

Quando si seleziona il conto da visualizzare, se sono presenti 2 conti clienti o fornitori anche se viene selezionato il secondo il programma rimettere il primo.
(Dinamica)


git-svn-id: svn://10.65.10.50/branches/R_10_00@21527 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2011-01-27 14:09:29 +00:00
parent bd87d1d1d0
commit 83c0eeef07

View File

@ -2318,6 +2318,7 @@ long TGrid_mask::handler(WINDOW win, EVENT* ep)
class TQuery_mask : public TAutomask class TQuery_mask : public TAutomask
{ {
TGrid_mask* _gm; TGrid_mask* _gm;
TString4 _last_tipo;
protected: protected:
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly); virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
@ -2337,18 +2338,23 @@ bool TQuery_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
if (e == fe_modify) if (e == fe_modify)
{ {
const TString& tipo = o.get(); const TString& tipo = o.get();
if (tipo.full())
{ if (tipo != _last_tipo)
TWait_cursor hourglass; {
TString query; _last_tipo = tipo;
query << "USE " << LF_PCON << " SELECT " << PCN_TMCF << "=\"" << tipo << "\""; if (tipo.full())
TISAM_recordset conti(query); {
if (conti.move_first()) TWait_cursor hourglass;
{ TString query;
set(F_GRUPPO, conti.get(PCN_GRUPPO).as_int(), 0x2); query << "USE " << LF_PCON << " SELECT " << PCN_TMCF << "=\"" << tipo << "\"";
set(F_CONTO, conti.get(PCN_CONTO).as_int(), 0x2); TISAM_recordset conti(query);
} if (conti.move_first())
} {
set(F_GRUPPO, conti.get(PCN_GRUPPO).as_int(), 0x2);
set(F_CONTO, conti.get(PCN_CONTO).as_int(), 0x2);
}
}
}
} }
break; break;
case F_CLIENTE: case F_CLIENTE:
@ -2445,7 +2451,7 @@ bool TQuery_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
return true; return true;
} }
TQuery_mask::TQuery_mask(TGrid_mask* gm) : TAutomask("cg3600a"), _gm(gm) TQuery_mask::TQuery_mask(TGrid_mask* gm) : TAutomask("cg3600a"), _gm(gm), _last_tipo("")
{ } { }
void TQuery_mask::do_query() void TQuery_mask::do_query()