From adafc99483b733e92b48dbb5cf0ec5e1602cd5f6 Mon Sep 17 00:00:00 2001 From: luca Date: Mon, 28 Apr 2003 14:03:55 +0000 Subject: [PATCH] Patch level :2.0 nopatch Files correlati :dl0.exe,dl0500a.msk,dl0500a.frm Ricompilazione Demo : [ ] Commento :aggiunta la possibilita' di visualizzare l'etichetta sul form della interrogazione avanzata (unico parametro che mancava) git-svn-id: svn://10.65.10.50/trunk@11067 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- dl/discolat.ini | 1 + dl/dl0500.cpp | 10 +++++-- dl/dl0500.h | 1 + dl/dl0500a.frm | 26 ++++++++++++------ dl/dl0500a.h | 1 + dl/dl0500a.uml | 11 ++++++-- dl/dl0800.cpp | 73 ------------------------------------------------- 7 files changed, 37 insertions(+), 86 deletions(-) diff --git a/dl/discolat.ini b/dl/discolat.ini index 492eeec10..7e57adf70 100755 --- a/dl/discolat.ini +++ b/dl/discolat.ini @@ -15,6 +15,7 @@ USER = ARTISTA = 1 BARCODE = 1 COMPOSITORE = 1 +ETICHETTA = 1 GENERE = 1 GIAC = 1 PREZZO = 1 diff --git a/dl/dl0500.cpp b/dl/dl0500.cpp index ff3d70b0a..9fc153d0a 100755 --- a/dl/dl0500.cpp +++ b/dl/dl0500.cpp @@ -66,12 +66,13 @@ bool TRicerca_mask::on_field_event(TOperable_field& o, TField_event e, long joll case F_P_TITOLO: case F_P_ARTISTA: case F_P_COMPOSITORE: + case F_P_ETICHETTA: case F_P_PREZZO: case F_P_GENERE: case F_P_TIPOSUPPORTO: if (e == fe_close) { - for (int i = 7; i >= 0; i--) //attenzione! e' necessario che gli ID dei bools siano contigui + for (int i = 8; i >= 0; i--) //attenzione! e' necessario che gli ID dei bools siano contigui { if (get_bool(F_P_BARCODE+i)) break; @@ -105,7 +106,7 @@ class TRicerca: public TSkeleton_application { TRicerca_mask * _mask; static TMask * _ordmask; - bool _barcode, _giac, _titolo, _artista, _compositore, _prezzo, _genere, _tiposupp; + bool _barcode, _giac, _titolo, _artista, _compositore, _etichetta, _prezzo, _genere, _tiposupp; static TArray _filtro; @@ -147,6 +148,7 @@ bool TRicerca::create() _titolo = config.get_bool("TITOLO"); _artista = config.get_bool("ARTISTA"); _compositore = config.get_bool("COMPOSITORE"); + _etichetta = config.get_bool("ETICHETTA"); _prezzo = config.get_bool("PREZZO"); _genere = config.get_bool("GENERE"); _tiposupp = config.get_bool("TIPOSUPP"); @@ -155,6 +157,7 @@ bool TRicerca::create() _mask->set(F_P_TITOLO, _titolo); _mask->set(F_P_ARTISTA, _artista); _mask->set(F_P_COMPOSITORE, _compositore); + _mask->set(F_P_ETICHETTA, _etichetta); _mask->set(F_P_PREZZO, _prezzo); _mask->set(F_P_GENERE, _genere); _mask->set(F_P_TIPOSUPPORTO, _tiposupp); @@ -379,6 +382,7 @@ void TRicerca::main_loop() _titolo = _mask->get_bool(F_P_TITOLO); _artista = _mask->get_bool(F_P_ARTISTA); _compositore = _mask->get_bool(F_P_COMPOSITORE); + _etichetta = _mask->get_bool(F_P_ETICHETTA); _prezzo = _mask->get_bool(F_P_PREZZO); _genere = _mask->get_bool(F_P_GENERE); _tiposupp = _mask->get_bool(F_P_TIPOSUPPORTO); @@ -390,6 +394,7 @@ void TRicerca::main_loop() config.set("TITOLO", _titolo); config.set("ARTISTA", _artista); config.set("COMPOSITORE", _compositore); + config.set("ETICHETTA", _etichetta); config.set("PREZZO", _prezzo); config.set("GENERE", _genere); config.set("TIPOSUPP", _tiposupp); @@ -427,6 +432,7 @@ void TRicerca::main_loop() form.find_field('B', odd_page, FF_B_TITOLO).show(_titolo); form.find_field('B', odd_page, FF_B_ARTISTA).show(_artista); form.find_field('B', odd_page, FF_B_COMPOSITORE).show(_compositore); + form.find_field('B', odd_page, FF_B_ETICHETTA).show(_etichetta);; form.find_field('B', odd_page, FF_B_PREZZO).show(_prezzo); form.find_field('B', odd_page, FF_B_GENERE).show(_genere); form.find_field('B', odd_page, FF_B_SUPPORTO).show(_tiposupp); diff --git a/dl/dl0500.h b/dl/dl0500.h index baf2f93bc..f076cd6c9 100755 --- a/dl/dl0500.h +++ b/dl/dl0500.h @@ -8,6 +8,7 @@ #define FF_B_GENERE 16 #define FF_B_SUPPORTO 17 #define FF_B_COMPOSITORE 18 +#define FF_B_ETICHETTA 19 #define FF_DATE 21 #define FF_PAGE 22 diff --git a/dl/dl0500a.frm b/dl/dl0500a.frm index 51b2719f8..ae1313a82 100755 --- a/dl/dl0500a.frm +++ b/dl/dl0500a.frm @@ -32,7 +32,7 @@ END //-----------------------riga tipo uno---------------------------------------------------// SECTION BODY ODD 1 COLUMNWISE -STRINGA FF_B_CODART 20 +STRINGA FF_B_CODART 16 BEGIN KEY "codart" PROMPT 1 1 "$[b]" @@ -48,7 +48,7 @@ BEGIN PROMPT 2 1 "$[n]" END -NUMERO FF_B_GIAC 7 +NUMERO FF_B_GIAC 6 BEGIN KEY "giacenza" PROMPT 2 1 "" @@ -68,7 +68,7 @@ BEGIN FIELD DESCR END -STRINGA FF_B_ARTISTA 18 +STRINGA FF_B_ARTISTA 22 BEGIN KEY "artista" PROMPT 4 1 "" @@ -78,7 +78,7 @@ BEGIN FIELD USER2 END -STRINGA FF_B_COMPOSITORE 18 +STRINGA FF_B_COMPOSITORE 15 BEGIN KEY "compositore" PROMPT 5 1 "" @@ -88,10 +88,20 @@ BEGIN FIELD USER3 END -VALUTA FF_B_PREZZO 10 +STRINGA FF_B_ETICHETTA 10 +BEGIN + KEY "etichetta" + PROMPT 6 1 "" + SPECIAL STRINGA INTESTAZIONE "Etichetta" "Etichetta" + SPECIAL NUMERO OFFSET "0" "Offset iniziale campo" + SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra" + FIELD USER4 +END + +VALUTA FF_B_PREZZO 7 BEGIN KEY "prezzo articolo" - PROMPT 6 1 "" + PROMPT 7 1 "" SPECIAL STRINGA INTESTAZIONE "Prezzo" "Prezzo" SPECIAL NUMERO OFFSET "0" "Offset iniziale campo" SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra" @@ -102,7 +112,7 @@ END STRINGA FF_B_GENERE 3 BEGIN KEY "genere" - PROMPT 7 1 "" + PROMPT 8 1 "" SPECIAL STRINGA INTESTAZIONE "Gen" "Genere" SPECIAL NUMERO OFFSET "0" "Offset iniziale campo" SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra" @@ -112,7 +122,7 @@ END STRINGA FF_B_SUPPORTO 3 BEGIN KEY "supporto" - PROMPT 8 1 "" + PROMPT 9 1 "" SPECIAL STRINGA INTESTAZIONE "Sup" "Tipo supporto" SPECIAL NUMERO OFFSET "0" "Offset iniziale campo" SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra" diff --git a/dl/dl0500a.h b/dl/dl0500a.h index b1b93f127..999548ff7 100755 --- a/dl/dl0500a.h +++ b/dl/dl0500a.h @@ -22,4 +22,5 @@ #define F_P_PREZZO 120 #define F_P_GENERE 121 #define F_P_TIPOSUPPORTO 122 +#define F_P_ETICHETTA 123 diff --git a/dl/dl0500a.uml b/dl/dl0500a.uml index 9b040f2e5..caebb3fba 100755 --- a/dl/dl0500a.uml +++ b/dl/dl0500a.uml @@ -149,19 +149,24 @@ BEGIN PROMPT 2 15 "Compositore" END +BOOL F_P_ETICHETTA +BEGIN + PROMPT 25 15 "Etichetta" +END + BOOL F_P_PREZZO BEGIN - PROMPT 25 15 "Prezzo" + PROMPT 2 16 "Prezzo" END BOOL F_P_GENERE BEGIN - PROMPT 2 16 "Genere" + PROMPT 25 16 "Genere" END BOOL F_P_TIPOSUPPORTO BEGIN - PROMPT 25 16 "Tipo supporto" + PROMPT 48 13 "Tipo supporto" END BUTTON DLG_OK 10 2 diff --git a/dl/dl0800.cpp b/dl/dl0800.cpp index 44e042087..64446055e 100755 --- a/dl/dl0800.cpp +++ b/dl/dl0800.cpp @@ -61,79 +61,6 @@ void TCat2dl_file::set_config(const char * listingr,const char * listven, const _codiva = codiva; } -/* -int TCat2dl_file::autosave(TRelation& rel, const TRecord_text& rec) -{ - const TString& type = rec.type(); //prendo il tracciato record del tipo del record_text - TTracciato_record& tr = *t_rec(type); - - TArray& a_tc = tr.tracciati_campo(); - const int items = a_tc.items(); - TString valore; - for (int i = 0; i < items; i++) - { - const TTracciato_campo& tc = tr.get(i); - if (tc.field().name().not_empty()) - { - const TFieldref& field = tc.field(); - // if (field.file()==0) - // field.set_file(rel.lfile().num()); - valore = rec.row(i); - // formatta il campo del file di testo secondo le specifiche del campo su file isam - preformat_field(field,valore,rel,tr.type()); - const TRectype& rel_rec = rel.curr(field.file()); - TFieldtypes tipo_campo = rel_rec.type(field.name()); - - switch(tipo_campo) //in base al tipo di campo formatta i valori seguendo le specifiche del tracciato - { - case _datefld: //tipo data... - { - if (real::is_null(valore)) - valore.cut(0); - else - { - TDate data(valore); - format_date(data, fpicture(tc), valore);//formatta la data secondo le specifiche del tracciato - } - } - break; - case _realfld: //tipi numerici - case _intfld: - case _longfld: - { - const real numero(valore); - valore = numero.string(fpicture(tc));//formatta il numero secondo le specifiche del tracciato - - int length = flength(tc,rel_rec); - if (falign(tc) == 'L') - valore.left_just(length, ffiller(tc)); - else - valore.right_just(length, ffiller(tc)); - } - break; - default: - valore = format_field(tc, rel.lfile().num(), valore);//formatta il campo secondo le specifiche del record - if (valore.blank() && field.name()=="CODIVA") //se il codice iva e' vuoto... - valore = _codiva; - break; - } - - if (rel.exist(field.file())) - field.write(valore, rel);//faccio una write sulla relazione del fieldref - } - } - - int err = NOERR; - if (pre_writerel(rel,rec)) - { - err= rel.write(); - if (err == _isdupkey || err ==_isreinsert) - err = rel.rewrite(); - } - return err; -} -*/ - bool TCat2dl_file::pre_writerel(TRelation& rel,const TRecord_text& rec) { if (rel.curr().get("CODIVA").blank())