Modifiche riguardanti la dimensione degli sheet di selezione e

l'handler del bottone per aprire tale sheet. In particolare ora,.
grazie al flag "*" dei campi, e' stato possibile "inglobare" tal
controllo come se fosse parte del campo e non piu' un pulsante
separato.


git-svn-id: svn://10.65.10.50/trunk@3006 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
angelo 1996-06-18 08:47:26 +00:00
parent 63d6217a48
commit a10725c9f7
10 changed files with 49 additions and 114 deletions

View File

@ -65,7 +65,7 @@ bool TLiquidazione_app::user_create()
_nditte_r = &(_nditte->curr());
_att_r = &(_nditte->curr(LF_ATTIV));
_ditte = new TArray_sheet(-1, -1, 0, 16, "Selezione Ditte",
_ditte = new TArray_sheet(-1, -1, -4, -4, "Selezione Ditte",
"@1|Cod.@5R|Ragione Sociale@50|Vers.");
_n_ditte = 0l;
@ -523,7 +523,16 @@ bool TLiquidazione_app::to_ditt_handler(TMask_field& f, KEY key)
TMask& m = f.mask();
if (key == K_F9)
{
app().to_butt_handler(m.field(CG43_BUT_DTO), K_SPACE);
TArray_sheet* sh = app().get_ditte_sheet();
TMask& m = f.mask();
sh->disable_check();
if (sh->run() == K_ENTER)
{
app().select_firm_range(m.get_long(CG43_FLD_DFR),sh->row(sh->selected()).get_long(1),
(wht)m.get_int(CG43_RDB_VERS));
app().set_choice_limits(m);
}
}
if (key == K_TAB && f.focusdirty())
{
@ -540,42 +549,6 @@ bool TLiquidazione_app::fr_ditt_handler(TMask_field& f, KEY key)
{
TMask& m = f.mask();
if (key == K_F9)
{
app().fr_butt_handler(m.field(CG43_BUT_DFR), K_SPACE);
}
else if (key == K_TAB && f.focusdirty())
{
const long l = app().select_firm_range(m.get_long(CG43_FLD_DFR),
m.get_long(CG43_FLD_DTO),
(wht)m.get_int(CG43_RDB_VERS));
app().set_choice_limits(m);
m.set(CG43_FLD_SELECTED, l);
}
return TRUE;
}
bool TLiquidazione_app::to_butt_handler(TMask_field& f, KEY key)
{
if (key == K_SPACE)
{
TArray_sheet* sh = app().get_ditte_sheet();
TMask& m = f.mask();
sh->disable_check();
if (sh->run() == K_ENTER)
{
app().select_firm_range(m.get_long(CG43_FLD_DFR),sh->row(sh->selected()).get_long(1),
(wht)m.get_int(CG43_RDB_VERS));
app().set_choice_limits(m);
}
}
return TRUE;
}
bool TLiquidazione_app::fr_butt_handler(TMask_field& f, KEY key)
{
if (key == K_SPACE)
{
TMask& m = f.mask();
TArray_sheet* sh = ((TLiquidazione_app&)main_app()).get_ditte_sheet();
@ -588,6 +561,15 @@ bool TLiquidazione_app::fr_butt_handler(TMask_field& f, KEY key)
app().set_choice_limits(m);
}
}
else if (key == K_TAB && f.focusdirty())
{
const long l = app().select_firm_range(m.get_long(CG43_FLD_DFR),
m.get_long(CG43_FLD_DTO),
(wht)m.get_int(CG43_RDB_VERS));
app().set_choice_limits(m);
m.set(CG43_FLD_SELECTED, l);
}
return TRUE;
}
@ -671,8 +653,6 @@ bool TLiquidazione_app::set_liquidazione()
m.set_handler(CG43_FLD_DTO, to_ditt_handler);
m.set_handler(CG43_FLD_DFR, fr_ditt_handler);
m.set_handler(CG43_BUT_DTO, to_butt_handler);
m.set_handler(CG43_BUT_DFR, fr_butt_handler);
m.set_handler(CG43_RDB_VERS, what_freq_handler);
m.set_handler(CG43_FLD_ANNO, ch_year_handler);

View File

@ -333,8 +333,6 @@ protected:
static bool ch_year_handler(TMask_field& f, KEY key);
static bool to_ditt_handler(TMask_field& f, KEY key);
static bool fr_ditt_handler(TMask_field& f, KEY key);
static bool to_butt_handler(TMask_field& f, KEY key);
static bool fr_butt_handler(TMask_field& f, KEY key);
static bool what_freq_handler(TMask_field& f, KEY key);
static TLiquidazione_app& app() { return (TLiquidazione_app&)main_app(); }

View File

@ -13,5 +13,4 @@
#define CG43_FLD_DTO 114
#define CG43_LST_CALC 115
#define CG43_CHK_FINAL 116
#define CG43_BUT_DFR 117
#define CG43_BUT_DTO 118

View File

@ -1,7 +1,7 @@
#include "cg4300a.h"
PAGE "Calcolo Liquidazioni" -1 -1 68 15
RADIOBUTTON CG43_RDB_VERS 15
RADIOBUTTON CG43_RDB_VERS 16
BEGIN
PROMPT 4 1 "Versamenti"
HELP "Indicare di quali versamenti procedere con la liquidazione"
@ -20,26 +20,14 @@ NUMBER CG43_FLD_DFR 5
BEGIN
PROMPT 24 2 "Da codice "
HELP "Codice ditta di partenza per la selezione"
FLAGS "R"
END
BUTTON CG43_BUT_DFR 2 1
BEGIN
PROMPT 40 2 "*"
PICTURE 109
FLAGS "B"
END
NUMBER CG43_FLD_DTO 5
BEGIN
PROMPT 24 3 "A codice "
HELP "Codice ditta di fine selezione"
FLAGS "R"
END
BUTTON CG43_BUT_DTO 2 1
BEGIN
PROMPT 40 3 "*"
PICTURE 109
FLAGS "B"
END
STRING CG43_FLD_SELECTED 5
@ -69,7 +57,7 @@ BEGIN
CHECKTYPE REQUIRED
END
LIST CG43_LST_MESE 14
LIST CG43_LST_MESE 15
BEGIN
PROMPT 4 7 "Periodo "
HELP "Mese per cui effettuare il calcolo liquidazione"
@ -77,7 +65,7 @@ BEGIN
FLAGS "AM"
END
LIST CG43_LST_TRIM 14
LIST CG43_LST_TRIM 15
BEGIN
PROMPT 4 7 "Periodo "
HELP "Trimestre di cui effettuare il calcolo liquidazione"
@ -88,7 +76,7 @@ BEGIN
ITEM "13|13a liquid."
END
LIST CG43_LST_CALC 14
LIST CG43_LST_CALC 15
BEGIN
PROMPT 4 8 "Ricalcola "
HELP "Indicare se rifare il calcolo durante la stampa"

View File

@ -869,7 +869,17 @@ bool CG4400_application::to_ditt_handler(TMask_field& f, KEY key)
{
TMask& m = f.mask();
if (key == K_F9)
app().to_butt_handler(m.field(BUT_DTO), K_SPACE);
{
TArray_sheet* sh = app().get_ditte_sheet();
TMask& m = f.mask();
sh->disable_check();
if (sh->run() == K_ENTER)
{
app().select_firm_range(m.get_long(DA_CODICE),sh->row(sh->selected()).get_long(1));
app().set_choice_limits(m);
}
}
if (key == K_TAB && f.focusdirty())
{
const long l = app().select_firm_range(m.get_long(DA_CODICE), m.get_long(A_CODICE));
@ -883,36 +893,6 @@ bool CG4400_application::fr_ditt_handler(TMask_field& f, KEY key)
{
TMask& m = f.mask();
if (key == K_F9)
app().fr_butt_handler(m.field(BUT_DFR), K_SPACE);
else if (key == K_TAB && f.focusdirty())
{
const long l = app().select_firm_range(m.get_long(DA_CODICE), m.get_long(A_CODICE));
app().set_choice_limits(m);
m.field(F_SELECT).set(format("%ld", l));
}
return TRUE;
}
bool CG4400_application::to_butt_handler(TMask_field& f, KEY key)
{
if (key == K_SPACE)
{
TArray_sheet* sh = app().get_ditte_sheet();
TMask& m = f.mask();
sh->disable_check();
if (sh->run() == K_ENTER)
{
app().select_firm_range(m.get_long(DA_CODICE),sh->row(sh->selected()).get_long(1));
app().set_choice_limits(m);
}
}
return TRUE;
}
bool CG4400_application::fr_butt_handler(TMask_field& f, KEY key)
{
if (key == K_SPACE)
{
TMask& m = f.mask();
TArray_sheet* sh = app().get_ditte_sheet();
@ -924,6 +904,12 @@ bool CG4400_application::fr_butt_handler(TMask_field& f, KEY key)
app().set_choice_limits(m);
}
}
else if (key == K_TAB && f.focusdirty())
{
const long l = app().select_firm_range(m.get_long(DA_CODICE), m.get_long(A_CODICE));
app().set_choice_limits(m);
m.field(F_SELECT).set(format("%ld", l));
}
return TRUE;
}
@ -1060,7 +1046,7 @@ bool CG4400_application::user_create()
_cur = new TSorted_cursor(_rel, "DATAREG|PROTIVA|NUMREG","", 2);
_ditte = new TArray_sheet(-1, -1, 0, 0, "Selezione Ditte",
_ditte = new TArray_sheet(-1, -1, -4, -4, "Selezione Ditte",
"@1|Cod.@5R|Ragione Sociale@50|Vers.");
//if (pnd) pnd->addstatus(1);
@ -3259,8 +3245,6 @@ bool CG4400_application::set_print(int n)
m.set_handler (F_ANNULLA, mask_azzera);
m.set_handler (A_CODICE, to_ditt_handler);
m.set_handler (DA_CODICE, fr_ditt_handler);
m.set_handler (BUT_DTO, to_butt_handler);
m.set_handler (BUT_DFR, fr_butt_handler);
m.set_handler (ANNO, year_handler);
m.field(F_SELECT).set(format("%ld",_selected.ones()));

View File

@ -78,8 +78,6 @@ protected:
static bool mask_tipo_stampa (TMask_field&, KEY);
static bool to_ditt_handler (TMask_field&, KEY);
static bool fr_ditt_handler (TMask_field&, KEY);
static bool to_butt_handler (TMask_field&, KEY);
static bool fr_butt_handler (TMask_field&, KEY);
static bool mask_cod (TMask_field&, KEY);
static bool mask_libun (TMask_field&, KEY);
static bool mask_data (TMask_field&, KEY);

View File

@ -13,8 +13,6 @@
#define ANNO 111
#define DA_CODICE 112
#define A_CODICE 113
#define BUT_DFR 114
#define BUT_DTO 115
#define F_SELECT 116
#define F_ANNULLA 117
#define F_VERIFICA 118

View File

@ -38,24 +38,14 @@ NUMBER DA_CODICE 5
BEGIN
PROMPT 17 3 "Da codice "
HELP "Codice ditta di inizio selezione"
END
BUTTON BUT_DFR 2 1
BEGIN
PROMPT 33 3 "*"
PICTURE 109
FLAGS "B"
END
NUMBER A_CODICE 5
BEGIN
PROMPT 17 4 "A codice "
HELP "Codice ditta di fine selezione"
END
BUTTON BUT_DTO 2 1
BEGIN
PROMPT 33 4 "*"
PICTURE 109
FLAGS "B"
END
STRING F_SELECT 5

View File

@ -100,7 +100,7 @@ bool VersAcc_app::create()
_nditte->add(LF_ANAG, "TIPOA=TIPOA|CODANAGR=CODANAGR");
_nditte->add(LF_COMUNI, "COM=COMRF(COMRES)", 1, LF_ANAG);
_ditte = new TArray_sheet(-1, -1, 0, 0, "Selezione Ditte",
_ditte = new TArray_sheet(-1, -1, -4, -4, "Selezione Ditte",
"@1|Cod.@5R|Ragione Sociale@50|Vers.");
_ver = new TInteressi_IVA_table();

View File

@ -61,7 +61,7 @@ bool LiqAcc_app::create()
TDate oggi(TODAY);
_year = oggi.year();
_nditte = new TRelation(LF_NDITTE);
_ditte = new TArray_sheet(-1, -1, 0, 0, "Selezione Ditte",
_ditte = new TArray_sheet(-1, -1, -4, -4, "Selezione Ditte",
"Cod.@5|Ragione Sociale@50|Vers.");
_lia = new TTable("%LIA");