Patch level : 12.0 nopatch

Files correlati     :
Commento:
sistemazione progetti e programmi che non si compilavano
This commit is contained in:
Alessandro Bonazzi 2023-03-05 16:33:11 +01:00
parent ca6a056e86
commit 4315b485ec
23 changed files with 79 additions and 78 deletions

View File

@ -15,19 +15,19 @@
#include "mrplib.h"
///////////////////////////////////////////////////////////
// TElabora_mask
// TElabora_mask_mr
///////////////////////////////////////////////////////////
class TElabora_mask : public TAutomask
class TElabora_mask_mr : public TAutomask
{
protected:
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
public:
TElabora_mask() : TAutomask("mr0500c") { }
TElabora_mask_mr() : TAutomask("mr0500c") { }
};
bool TElabora_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
bool TElabora_mask_mr::on_field_event(TOperable_field& o, TField_event e, long jolly)
{
return true;
}
@ -90,7 +90,7 @@ bool TLoadfile_mask::on_field_event(TOperable_field& o, TField_event e, long jol
///////////////////////////////////////////////////////////
// TRilprod_mask
///////////////////////////////////////////////////////////
typedef enum TTipo_rec { _no_type = 0, _start = 1, _end = 2, _rett = 3};
enum TTipo_rec { _no_type = 0, _start = 1, _end = 2, _rett = 3};
class TRilprod_mask : public TAutomask
{
@ -199,7 +199,7 @@ bool TRilprod_mask::on_field_event(TOperable_field& o, TField_event e, long joll
case DLG_ELABORA :
if (e == fe_button)
{
TElabora_mask m;
TElabora_mask_mr m;
if (m.run() == K_ENTER)
{
@ -271,7 +271,7 @@ void TRilprod_mask::display_error(TViswin & v, const char * msg, TTracciato_reco
void TRilprod_mask::print_record(TViswin & v, TTipo_rec t , TProduzione & r)
{
TString riga;
const int nfields = r.rec_des().NFields;
const int nfields = r.rec_des().nfields();
v.add_line("");
if (t == _start)
@ -688,7 +688,7 @@ class TRilprod_app : public TRelation_application
virtual bool remove();
protected:
virtual TMask* get_mask(int) { return _msk; }
virtual TMask* _get_mask(int) { return _msk; }
virtual TRelation* get_relation() const { return _rel; }
virtual bool user_create();
virtual bool user_destroy();

View File

@ -3076,7 +3076,7 @@ int TPlanning_mask::salva_documenti(TExceptions_array &excepts, TSheet_field & s
if (row->get_long(F_BUCKET0+b-FIRST_FIELD)!=0L && !error_on_row.is_key(key))
{
error_box(FR("Riga %d: manca l'indicazione del codice %s"),r+1,get(F_TIPOCF)[0] == 'F' ? "fornitore" : "cliente");
error_on_row.add(key,NULL);
error_on_row.add(key);
}
}
if (ordiniXarticolo)
@ -3110,7 +3110,7 @@ int TPlanning_mask::salva_documenti(TExceptions_array &excepts, TSheet_field & s
if (row->get_long(F_BUCKET0+b-FIRST_FIELD)!=0L && !error_on_row.is_key(key))
{
error_box(FR("Riga %d: manca l'indicazione del codice %s"),r+1,get(F_TIPOCF)[0] == 'F' ? "fornitore" : "cliente");
error_on_row.add(key,NULL);
error_on_row.add(key);
}
}
}

View File

@ -8,8 +8,8 @@
#include "np0.h"
#include "np0200.h"
#include "..\cg\cg2101.h"
#include "..\cg\cglib02.h"
#include "..\cg\cglib.h"
#include <pconti.h>
#include <mov.h>
@ -564,7 +564,7 @@ bool TApertura_chiusura::set()
(*_cur) = 0L;
_sld->set_anno_es(_annoesch);
_sld->set_movprovv(FALSE);
_sld->set_tipo_saldo(chiusura);
_sld->set_tipo_saldo(saldo_chiusura);
_sld->set_movimentato(TRUE);
costi();
@ -582,7 +582,7 @@ bool TApertura_chiusura::set()
_totale_saldo = ZERO;
_sld->set_anno_es(_annoesap);
_sld->set_tipo_saldo(apertura);
_sld->set_tipo_saldo(saldo_apertura);
_sld->set_movimentato(TRUE);
*_cur = 0l;
@ -597,7 +597,7 @@ bool TApertura_chiusura::set()
(*_cur) = 0L;
_sld->set_anno_es(_annoesch);
_sld->set_movprovv(FALSE);
_sld->set_tipo_saldo(chiusura);
_sld->set_tipo_saldo(saldo_chiusura);
_sld->set_movimentato(TRUE);
costi();
@ -615,7 +615,7 @@ bool TApertura_chiusura::set()
_totale_saldo = ZERO;
_sld->set_anno_es(_annoesap);
_sld->set_tipo_saldo(apertura);
_sld->set_tipo_saldo(saldo_apertura);
_sld->set_movimentato(TRUE);
*_cur = 0l;
@ -767,9 +767,8 @@ void TApertura_chiusura::costi()
compila_testata(_annoesch,_dataregch,_codcausch,_datacompch); //Reg. 1 Chiusura Costi
compila_mov = FALSE;
}
s = saldi.get_long(SLD_SOTTOCONTO);
sale.saldo_cont_sep(g, c, s, _annoesch, botime, indbil, _cod_cont_sep, 0, _cod_cont_sep.blank());
sale.saldo_cont_sep(Registrazione, g, c, s, _annoesch, botime, indbil, _cod_cont_sep, 0, _cod_cont_sep.blank()); // verificare
_saldo = sale.saldo();
if (_saldo.is_zero())
@ -915,7 +914,7 @@ void TApertura_chiusura::ricavi()
//numrig++;
s = saldi.get_long(SLD_SOTTOCONTO);
sale.saldo_cont_sep(g, c, s, _annoesch, botime, indbil, _cod_cont_sep, 0, _cod_cont_sep.blank());
sale.saldo_cont_sep(Registrazione, g, c, s, _annoesch, botime, indbil, _cod_cont_sep, 0, _cod_cont_sep.blank()); // verificare
_saldo = sale.saldo();
if (_saldo.is_zero()) continue;
@ -1154,7 +1153,7 @@ void TApertura_chiusura::chiudi_attivita()
}
s = saldi.get_long(SLD_SOTTOCONTO);
sale.saldo_cont_sep(g, c, s, _annoesch, botime, indbil, _cod_cont_sep, 0, _cod_cont_sep.blank());
sale.saldo_cont_sep(Registrazione, g, c, s, _annoesch, botime, indbil, _cod_cont_sep, 0, _cod_cont_sep.blank()); // verificare
_saldo = sale.saldo();
const int dbkey = saldi.getkey();
saldi.setkey(1);
@ -1304,7 +1303,7 @@ void TApertura_chiusura::chiudi_passivita()
//numrig++;
s = saldi.get_long(SLD_SOTTOCONTO);
//sale.calcola_ultima_immissione(_annoesch,0,g,c,s,indbil);
sale.saldo_cont_sep(g, c, s, _annoesch, botime, indbil, _cod_cont_sep, 0, _cod_cont_sep.blank());
sale.saldo_cont_sep(Registrazione, g, c, s, _annoesch, botime, indbil, _cod_cont_sep, 0, _cod_cont_sep.blank()); // verificare
_saldo = sale.saldo();
if (_saldo.is_zero()) continue;
@ -1449,7 +1448,7 @@ void TApertura_chiusura::chiudi_conti_ordine()
}
s = saldi.get_long(SLD_SOTTOCONTO);
sale.saldo_cont_sep(g, c, s, _annoesch, botime, indbil, _cod_cont_sep, 0, _cod_cont_sep.blank());
sale.saldo_cont_sep(Registrazione, g, c, s, _annoesch, botime, indbil, _cod_cont_sep, 0, _cod_cont_sep.blank()); // verificare
_saldo = sale.saldo();
const int dbkey = saldi.getkey();
saldi.setkey(1);
@ -1646,7 +1645,7 @@ void TApertura_chiusura::apri_attivita()
//numrig++;
s = saldi.get_long(SLD_SOTTOCONTO);
sale.saldo_cont_sep(g, c, s, _annoesch, botime, indbil, _cod_cont_sep, 0, _cod_cont_sep.blank());
sale.saldo_cont_sep(Registrazione, g, c, s, _annoesch, botime, indbil, _cod_cont_sep, 0, _cod_cont_sep.blank()); // verificare
_saldo = sale.saldo();
if (_saldo == ZERO) continue;
@ -1792,7 +1791,7 @@ void TApertura_chiusura::apri_passivita()
//numrig++;
s = saldi.get_long(SLD_SOTTOCONTO);
sale.saldo_cont_sep(g, c, s, _annoesch, botime, indbil, _cod_cont_sep, 0, _cod_cont_sep.blank());
sale.saldo_cont_sep(Registrazione, g, c, s, _annoesch, botime, indbil, _cod_cont_sep, 0, _cod_cont_sep.blank()); // verificare
_saldo = sale.saldo();
if (_saldo.is_zero()) continue;
@ -1938,7 +1937,7 @@ void TApertura_chiusura::apri_conti_ordine()
//numrig++;
s = saldi.get_long(SLD_SOTTOCONTO);
sale.saldo_cont_sep(g, c, s, _annoesch, botime, indbil, _cod_cont_sep, 0, _cod_cont_sep.blank());
sale.saldo_cont_sep(Registrazione, g, c, s, _annoesch, botime, indbil, _cod_cont_sep, 0, _cod_cont_sep.blank()); // verificare
_saldo = sale.saldo();
if (_saldo == ZERO) continue;

View File

@ -9,7 +9,7 @@
#include "orlib.h"
#include "or1200a.h"
#include "../cg/cglib01.h"
#include "../cg/cglib.h"
#include "../ve/velib.h"

View File

@ -13,7 +13,7 @@
#include "orlib.h"
#include "or1400a.h"
#include "../cg/cglib01.h"
#include "../cg/cglib.h"
#include "../mg/anamag.h"
#include "../ve/velib07.h"

View File

@ -2,7 +2,7 @@
#include "orlib.h"
#include "or1100a.h"
#include "../cg/cglib01.h"
#include "../cg/cglib.h"
#include "../ve/velib.h"
// Prima colonna quantita' nel form per stampa disponibilita'
@ -380,7 +380,7 @@ bool TOrdine_form::validate(TForm_item &cf, TToken_string &s)
TDocumento& documento = (TDocumento&)cf.form().cursor()->curr(LF_DOC);
TCli_for& cli_for = documento.clifor();
TOccasionale& cli_occ = documento.occas();
const bool occasionale = cli_for.occasionale();
const bool occasionale = cli_for.is_occasionale();
if (print_cod)
ws << cli_for.get("CODCF") << " ";
if (occasionale)

View File

@ -16,6 +16,7 @@
#include "pa0100a.h"
#include "../fe/felib.h"
#include "../fp/fplib.h"
#include <anagiu.h>
#include <comuni.h>
@ -179,6 +180,7 @@ struct TAncestor : public TObject
TAncestor(const TRectype& rdoc);
};
/*
TAncestor::TAncestor(const TRectype& rdoc)
{
const int anno = rdoc.get_int(RDOC_ANNO);
@ -198,7 +200,6 @@ TAncestor::TAncestor(const TRectype& rdoc)
_datadoc = doc.get_date(DOC_DATADOC);
}
/////////////////////////////////////////////////////////////////////////////////////
// TPaf_record
/////////////////////////////////////////////////////////////////////////////////////
@ -452,6 +453,7 @@ TPaf_record::TPaf_record(const char* table) : _table(table), _key(15, ',')
}
CHECKS(!_key.empty_items(), "Invalid primary key for table ", table);
}
*/
/////////////////////////////////////////////////////////////////////////////////////
// TPa_mask

View File

@ -57,7 +57,7 @@ bool TTablePR_app::user_create()
{
Tab_application::user_create();
const TString& name = get_tabname();
TMask& mask = *get_mask();
TMask& mask = *get_mask(MODE_QUERY);
if (name == "APR")
{
mask.set_handler(F_SEQRIC1,gmc_handler);

View File

@ -15,7 +15,7 @@ class TGestione_agenti_app:public TRelation_application
protected:
virtual bool user_create();
virtual bool user_destroy();
virtual TMask* get_mask(int mode) { return _msk; }
virtual TMask* _get_mask(int mode) { return _msk; }
virtual bool changing_mask(int mode) { return FALSE; }
virtual TRelation* get_relation() const { return _rel; }
static bool percfat_handler(TMask_field& f, KEY k);

View File

@ -18,7 +18,7 @@ class TGestione_percprovv_app:public TRelation_application
protected:
virtual bool user_create();
virtual bool user_destroy();
virtual TMask* get_mask(int mode) {return _msk;}
virtual TMask* _get_mask(int mode) {return _msk;}
virtual bool changing_mask(int mode) {return FALSE;}
virtual TRelation* get_relation() const {return _rel;}
virtual void init_query_mode(TMask& m);

View File

@ -24,7 +24,7 @@ bool Tabriclass_application::user_create()
{
Tab_application::user_create();
_msk = get_mask();
_msk = get_mask(MODE_QUERY);
_tabname = get_tabname();
return true;

View File

@ -85,7 +85,7 @@ class TTSRiclass_application : public TRelation_application
// @access Protected Member
protected:
virtual TMask* get_mask(int mode = MODE_QUERY) { CHECK(_msk, "Null mask"); return _msk; }
virtual TMask* _get_mask(int mode) { CHECK(_msk, "Null mask"); return _msk; }
// @cmember Indica se la futura <mf Tab_application::get_mask> ritornera' una maschera diversa
// dalla corrente.
virtual bool changing_mask(int mode) { return false; }

View File

@ -338,7 +338,7 @@ void TEC_row::print_on(TPrint_section& body)
TForm_item& descr = body.find_field(PEC_DESCR);
// Riga di partita vera e propria (non totale parziale)
if (rata() < RIGA_PAGAMENTO)
if (rata() < RIGA_PART_PAGAMENTO)
{
TString256 s = descr.prompt();
TEC_form::_form->change_magic_body(*this, s);
@ -718,7 +718,7 @@ void TEC_array::add_row(const TRiga_partite& row)
{
const TDate data_pag(row.get(PART_DATAPAG));
const TImporto imp(row.importo(in_valuta, 0x1)); // Importo pulito senza nient'altro
TEC_row& riga = new_row(row, data_pag, imp, RIGA_PAGAMENTO);
TEC_row& riga = new_row(row, data_pag, imp, RIGA_PART_PAGAMENTO);
if (row.in_valuta())
{
@ -764,7 +764,7 @@ void TEC_array::add_row(const TRiga_partite& row)
const TImporto abbuoni(row.importo(in_valuta, 0x2));
if (!abbuoni.is_zero())
{
TEC_row& rec = new_row(row, data_pag, abbuoni, RIGA_ABBUONI);
TEC_row& rec = new_row(row, data_pag, abbuoni, RIGA_PART_ABBUONI);
rec.descrizione(form().describe(PEC_ABBUONI));
if (in_valuta)
{
@ -795,7 +795,7 @@ void TEC_array::add_row(const TRiga_partite& row)
TImporto ritenute(row.importo(false, 0x8));
if (!ritenute.is_zero())
{
TEC_row& rec = new_row(row, data_pag, TImporto('D', ZERO), RIGA_RITENUTE);
TEC_row& rec = new_row(row, data_pag, TImporto('D', ZERO), RIGA_PART_RITENUTE);
rec.descrizione(form().describe(PEC_RITENUTE));
if (in_valuta)
{
@ -869,7 +869,7 @@ TEC_array::TEC_array(const TPartita& game, const TEC_form* f)
for (r = items()-1; r >= 0; r--)
{
TEC_row& s = row(r);
if (s.rata() == RIGA_PAGAMENTO)
if (s.rata() == RIGA_PART_PAGAMENTO)
{
TImporto* imp = importo_riga_scaduto_ptr(s.riga());
if (imp != NULL)
@ -1827,7 +1827,7 @@ bool TStampaEC_application::print_agents()
TCursor& c = *s.cursor();
const char who = mask().get_who();
const int key = mask().get_key();
const int key = mask().get_selected_key();
// Filtra il cursore del form in modo che diventi uguale al cursor_sheet corrente
// Qui sarebbe bello copiarsi l'indice dell'altro cursore

View File

@ -51,9 +51,9 @@
#define PEC_PICTURE 500
#define RIGA_PAGAMENTO 10001
#define RIGA_ABBUONI 10002
#define RIGA_DIFFCAM 10003
#define RIGA_RITENUTE 10004
#define RIGA_PART_PAGAMENTO 10001
#define RIGA_PART_ABBUONI 10002
#define RIGA_PART_DIFFCAM 10003
#define RIGA_PART_RITENUTE 10004
#endif

View File

@ -978,7 +978,7 @@ bool TStampaScadenzario::set_print(int)
if (_m->get_who() == 'P') _tipost = altri;
else if (_m->get_who() == 'C') _tipost = clienti;
else _tipost = fornitori;
_ordcod = _m->get_key() == 1; // Stampa ordinata per codice?
_ordcod = _m->get_selected_key() == 1; // Stampa ordinata per codice?
_group_ban = _m->get_bool(F_SORTBAN); // Raggruppamento per banca di presentazione
_codag = _m->get(F_CODAG); // codice agente selezionato
_tipopag = _m->get_int(F_TIPOPAG); // tipo pagamento selezionato

View File

@ -46,7 +46,7 @@ TSelection_ext_mask::~TSelection_ext_mask()
TCursor_sheet& TSelection_ext_mask::cur_sheet()
{
TCursor_sheet* cs;
if (get_key() == 1) cs = get_who() == 'P' ? _pcon_sh_k1 : NULL;
if (get_selected_key() == 1) cs = get_who() == 'P' ? _pcon_sh_k1 : NULL;
else cs = get_who() == 'P' ? _pcon_sh_k2 : NULL;
if (get_who() != 'P')
@ -74,7 +74,7 @@ void TSelection_ext_mask::select_des_pcon_range(const TString& from, const TStri
{
TCursor_sheet& c = cur_sheet();
const long items = c.items();
const int key = get_key();
const int key = get_selected_key();
CHECK(key == 2, "La chiave deve essere la 2");
TString s_from(from), s_to(to);
@ -131,7 +131,7 @@ void TSelection_ext_mask::set_des_pcon_limits()
TString from,to;
TCursor_sheet& c = cur_sheet();
const long items = c.items();
const int key = get_key();
const int key = get_selected_key();
CHECK(key == 2, "La chiave deve essere la 2");
for (long i = 0; i < items; i++)
@ -170,7 +170,7 @@ void TSelection_ext_mask::select_pcon_range(int grf, int cof,long sof,int grt,in
{
TCursor_sheet& c = cur_sheet();
const long items = c.items();
const int key = get_key();
const int key = get_selected_key();
TCursor* crs = c.cursor();
if (grt==0 && cot==0 && sot==0 && items)
@ -230,7 +230,7 @@ void TSelection_ext_mask::set_pcon_limits()
TCursor_sheet& c = cur_sheet();
const long items = c.items();
const int key = get_key();
const int key = get_selected_key();
long first = -1, last = -1;
// Ricerca veloce di estremi (vale solo su GR/CO/SO)
@ -282,7 +282,7 @@ bool TSelection_ext_mask::ffrompcon_handler(TMask_field& f, KEY k)
{
TSelection_ext_mask& m = (TSelection_ext_mask&)f.mask();
TCursor_sheet& c = m.cur_sheet();
const int key = m.get_key();
const int key = m.get_selected_key();
c.disable_check();
c.disable(DLG_USER);
if (c.run() == K_ENTER)
@ -327,7 +327,7 @@ bool TSelection_ext_mask::ftopcon_handler(TMask_field& f, KEY k)
{
TSelection_ext_mask& m = (TSelection_ext_mask&)f.mask();
TCursor_sheet& c = m.cur_sheet();
const int key = m.get_key();
const int key = m.get_selected_key();
c.disable_check();
c.disable(DLG_USER);
if (c.run() == K_ENTER)
@ -378,7 +378,7 @@ bool TSelection_ext_mask::fdfrompcon_handler(TMask_field& f, KEY k)
if (c.run() == K_ENTER)
{
TToken_string& t = c.row(c.selected());
const TString des1(t.get(3 - m.get_key()));
const TString des1(t.get(3 - m.get_selected_key()));
const TString des2 = m.get(SC_PCONDESTO);
m.set(SC_PCONDESFR, des1);
m.select_des_pcon_range(des1, des2);
@ -410,7 +410,7 @@ bool TSelection_ext_mask::fdtopcon_handler(TMask_field& f, KEY k)
{
TToken_string& t = c.row(c.selected());
const TString des1(m.get(SC_PCONDESFR));
const TString des2(t.get(3 - m.get_key()));
const TString des2(t.get(3 - m.get_selected_key()));
m.set(SC_PCONDESTO, des2);
m.select_des_pcon_range(des1, des2);
}
@ -445,7 +445,7 @@ bool TSelection_ext_mask::bselectpcon_handler(TMask_field& f, KEY k)
c.enable_check();
c.run();
char who = m.get_who();
int key = m.get_key();
int key = m.get_selected_key();
if (who =='P')
if (key == 2)
m.set_des_pcon_limits();

View File

@ -630,7 +630,7 @@ bool TStampaScaduto::set_print(int)
_tipost = altri;
else
_tipost = _m->get_who() == 'C' ? clienti : fornitori;
_ordcod = _m->get_key() == 1;
_ordcod = _m->get_selected_key() == 1;
_end_printed = _pending_clifo = false;
_gcr = _m->get_int(F_GIORNI);
_stvaluta = _m->get_bool(F_VALUTA);

View File

@ -59,7 +59,7 @@ bool TStampaSol_application::print_selected()
TCursor &c = *s.cursor();
const char who = mask().get_who();
const int key = mask().get_key();
const int key = mask().get_selected_key();
// Attiva la stampa del saldo partita
form().stampa_saldo(mask().stampa_saldo());
@ -414,7 +414,7 @@ bool TStampaSol_application::mail_selected()
TCursor &c = *s.cursor();
const char who = mask().get_who();
const int key = mask().get_key();
const int key = mask().get_selected_key();
// Attiva la stampa del saldo partita
form().stampa_saldo(mask().stampa_saldo());

View File

@ -498,7 +498,7 @@ void TESSL_array::add_row(const TRiga_partite& row)
{
const TDate data_pag(row.get(PART_DATAPAG));
const TImporto imp(row.importo(in_valuta, 0x1)); // Importo pulito senza nient'altro
TESSL_row& riga = new_row(row, data_pag, imp, RIGA_PAGAMENTO);
TESSL_row& riga = new_row(row, data_pag, imp, RIGA_PART_PAGAMENTO);
if (in_valuta)
{
TImporto i(row.importo(FALSE, 0x1));
@ -533,7 +533,7 @@ void TESSL_array::add_row(const TRiga_partite& row)
TImporto ritenute(row.importo(FALSE, 0x8));
if (!ritenute.is_zero())
{
TESSL_row& r = new_row(row, data_pag, TImporto('D', ZERO), RIGA_RITENUTE);
TESSL_row& r = new_row(row, data_pag, TImporto('D', ZERO), RIGA_PART_RITENUTE);
r.descrizione(form().describe(PEC_RITENUTE));
if (in_valuta)
{
@ -548,7 +548,7 @@ void TESSL_array::add_row(const TRiga_partite& row)
const TImporto abbuoni(row.importo(in_valuta, 0x2));
if (!abbuoni.is_zero())
{
TESSL_row& r = new_row(row, data_pag, abbuoni, RIGA_ABBUONI);
TESSL_row& r = new_row(row, data_pag, abbuoni, RIGA_PART_ABBUONI);
r.descrizione(form().describe(PEC_ABBUONI));
if (in_valuta)
{
@ -620,7 +620,7 @@ TESSL_array::TESSL_array(const TPartita& game, const TESSL_form* f)
for (r = items()-1; r >= 0; r--)
{
TESSL_row& s = row(r);
if (s.rata() == RIGA_PAGAMENTO)
if (s.rata() == RIGA_PART_PAGAMENTO)
{
TImporto* imp = importo_riga_scaduto_ptr(s.riga());
if (imp != NULL)

View File

@ -503,7 +503,7 @@ bool TProspettoScadenze::open_print()
else
_tipost = fornitori;
riempi_conti_mastro(_m->get_who());
if (_m->get_key() == 1)
if (_m->get_selected_key() == 1)
_ordcod = true;
else
_ordcod = false;

View File

@ -168,9 +168,9 @@ TCursor_sheet& TSelection_mask::cur_sheet() const
TCursor_sheet* cs = NULL;
switch (get_who())
{
case 'C': cs = get_key() == 1 ? _cli_sh_k1 : _cli_sh_k2; break;
case 'F': cs = get_key() == 1 ? _for_sh_k1 : _for_sh_k2; break;
default : cs = get_key() == 1 ? _pdc_sh_k1 : _pdc_sh_k2; break;
case 'C': cs = get_selected_key() == 1 ? _cli_sh_k1 : _cli_sh_k2; break;
case 'F': cs = get_selected_key() == 1 ? _for_sh_k1 : _for_sh_k2; break;
default : cs = get_selected_key() == 1 ? _pdc_sh_k1 : _pdc_sh_k2; break;
}
CHECK(cs, "Can't use a NULL TCursor_sheet");
return *cs;
@ -204,7 +204,7 @@ void TSelection_mask::select_clifo_range(long from, long to)
TWait_cursor hourglass;
TCursor_sheet& c = cur_sheet();
const long items = c.items();
const int key = get_key();
const int key = get_selected_key();
TCursor* crs = c.cursor();
if (to == 0 && items)
@ -253,7 +253,7 @@ void TSelection_mask::select_des_clifo_range(const TString& from, const TString
TWait_cursor hourglass;
TCursor_sheet& c = cur_sheet();
const long items = c.items();
const int key = get_key();
const int key = get_selected_key();
CHECK(key == 2, "La chiave deve essere la 2");
TString s_from(from), s_to(to);
@ -328,7 +328,7 @@ void TSelection_mask::set_clifo_limits()
TCursor_sheet& c = cur_sheet();
const long items = c.items();
const int key = get_key();
const int key = get_selected_key();
long first = -1, last = -1;
for (long i = 0; i < items; i++)
@ -370,7 +370,7 @@ void TSelection_mask::set_des_clifo_limits()
TString from,to;
TCursor_sheet& c = cur_sheet();
const long items = c.items();
const int key = get_key();
const int key = get_selected_key();
CHECK(key == 2, "La chiave deve essere la 2");
for (long i = 0; i < items; i++)
@ -428,7 +428,7 @@ bool TSelection_mask::ffrom_handler(TMask_field& f, KEY k)
if (c.run() == K_ENTER)
{
TToken_string& t = c.row(c.selected());
const long cod1 = t.get_long(m.get_key());
const long cod1 = t.get_long(m.get_selected_key());
const long cod2 = m.get_long(SC_CFCODTO);
m.set(SC_CFCODFR, cod1);
m.select_clifo_range(cod1, cod2);
@ -463,7 +463,7 @@ bool TSelection_mask::fto_handler(TMask_field& f, KEY k)
if (c.run() == K_ENTER)
{
TToken_string& t = c.row(c.selected());
const long cod2 = t.get_long(m.get_key());
const long cod2 = t.get_long(m.get_selected_key());
const long cod1 = m.get_long(SC_CFCODFR);
m.set(SC_CFCODTO, cod2);
m.select_clifo_range(cod1, cod2);
@ -565,7 +565,7 @@ bool TSelection_mask::bselect_handler(TMask_field& f, KEY k)
TCursor_sheet& c = m.cur_sheet();
c.enable_check();
c.run();
if (m.get_key() == 2)
if (m.get_selected_key() == 2)
m.set_des_clifo_limits();
else
m.set_clifo_limits();
@ -606,7 +606,7 @@ void TSelection_mask::update_assoc()
_all_selected =true;
else
{
const int first = get_key();
const int first = get_selected_key();
const char who = get_who();
TString16 key;

View File

@ -86,7 +86,7 @@ public:
TCursor_sheet& cur_sheet() const;
char get_who() const { return _who; }
int get_key() const { return _key; }
int get_selected_key() const { return _key; }
bool selected(const TBill& c) const;
bool selected(int g, int c, long s) const;

View File

@ -37,7 +37,7 @@ public:
virtual bool user_create();
virtual bool user_destroy();
virtual bool changing_mask(int mode) { return true; }
virtual TMask* get_mask(int mode) { return mode == MODE_QUERY ? _qmsk : _emsk; }
virtual TMask* _get_mask(int mode) { return mode == MODE_QUERY ? _qmsk : _emsk; }
virtual TRelation* get_relation() const { return _rel; }
virtual bool has_filtered_cursor() const { return true; }
virtual TCursor * get_filtered_cursor() const;