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:
parent
bd87d1d1d0
commit
83c0eeef07
@ -2318,6 +2318,7 @@ long TGrid_mask::handler(WINDOW win, EVENT* ep)
|
||||
class TQuery_mask : public TAutomask
|
||||
{
|
||||
TGrid_mask* _gm;
|
||||
TString4 _last_tipo;
|
||||
|
||||
protected:
|
||||
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)
|
||||
{
|
||||
const TString& tipo = o.get();
|
||||
if (tipo.full())
|
||||
{
|
||||
TWait_cursor hourglass;
|
||||
TString query;
|
||||
query << "USE " << LF_PCON << " SELECT " << PCN_TMCF << "=\"" << tipo << "\"";
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
if (tipo != _last_tipo)
|
||||
{
|
||||
_last_tipo = tipo;
|
||||
if (tipo.full())
|
||||
{
|
||||
TWait_cursor hourglass;
|
||||
TString query;
|
||||
query << "USE " << LF_PCON << " SELECT " << PCN_TMCF << "=\"" << tipo << "\"";
|
||||
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;
|
||||
case F_CLIENTE:
|
||||
@ -2445,7 +2451,7 @@ bool TQuery_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||
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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user