Sostituito anno con attuale /precedente
git-svn-id: svn://10.65.10.50/trunk@924 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
6caf3d9476
commit
e79b928b51
27
ba/ba5.cpp
27
ba/ba5.cpp
@ -1,6 +1,7 @@
|
|||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
#include <mask.h>
|
#include <mask.h>
|
||||||
#include <isam.h>
|
#include <isam.h>
|
||||||
|
#include <relation.h>
|
||||||
#include <sheet.h>
|
#include <sheet.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
#include <urldefid.h>
|
#include <urldefid.h>
|
||||||
@ -62,12 +63,12 @@ void TSoci_sheet::add_socio(const TString& codice,
|
|||||||
|
|
||||||
class TQuery_socio
|
class TQuery_socio
|
||||||
{
|
{
|
||||||
TString _tipo; // tipo = F | G
|
TString16 _tipo; // tipo = F | G
|
||||||
int _anno; // anno
|
TString16 _attprec; // {A}ttuale / {P}recedente
|
||||||
TString _carica; // codice carica
|
TString16 _carica; // codice carica
|
||||||
TString _qualifica; // richiesta qualifica
|
TString16 _qualifica; // richiesta qualifica
|
||||||
TString _q740; // quadro 740
|
TString16 _q740; // quadro 740
|
||||||
TString _q750; // quadro 750
|
TString16 _q750; // quadro 750
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TQuery_socio(const TMask* mask);
|
TQuery_socio(const TMask* mask);
|
||||||
@ -79,7 +80,7 @@ public:
|
|||||||
TQuery_socio::TQuery_socio(const TMask* mask)
|
TQuery_socio::TQuery_socio(const TMask* mask)
|
||||||
{
|
{
|
||||||
_tipo = mask->get(LST_SC1_TIPOASOC);
|
_tipo = mask->get(LST_SC1_TIPOASOC);
|
||||||
_anno = atoi(mask->get(FLD_SC1_ANNO));
|
_attprec = mask->get(FLD_SC1_ANNO);
|
||||||
_carica = mask->get(FLD_SC1_CODCAR);
|
_carica = mask->get(FLD_SC1_CODCAR);
|
||||||
_qualifica = mask->get(LST_SC1_RICQUAL);
|
_qualifica = mask->get(LST_SC1_RICQUAL);
|
||||||
_q740 = mask->get(LST_SC2_Q740);
|
_q740 = mask->get(LST_SC2_Q740);
|
||||||
@ -89,7 +90,7 @@ TQuery_socio::TQuery_socio(const TMask* mask)
|
|||||||
int TQuery_socio::test(const TRectype& r) const
|
int TQuery_socio::test(const TRectype& r) const
|
||||||
{
|
{
|
||||||
if (_tipo != r.get("TIPOASOC")) return 1;
|
if (_tipo != r.get("TIPOASOC")) return 1;
|
||||||
if (_anno > 0 && _anno != r.get_int("ANNO")) return 2;
|
if (_attprec.not_empty()&& _attprec != r.get("ATTPREC")) return 2;
|
||||||
if (_carica.not_empty() && _carica != r.get("CODCAR")) return 3;
|
if (_carica.not_empty() && _carica != r.get("CODCAR")) return 3;
|
||||||
if (_qualifica.not_empty() && _qualifica != r.get("RICQUAL")) return 4;
|
if (_qualifica.not_empty() && _qualifica != r.get("RICQUAL")) return 4;
|
||||||
if (_q740.not_empty() && _q740 != r.get("Q740")) return 5;
|
if (_q740.not_empty() && _q740 != r.get("Q740")) return 5;
|
||||||
@ -105,7 +106,7 @@ class TQuery_application : public TApplication
|
|||||||
{
|
{
|
||||||
const TPrinter* _printer;
|
const TPrinter* _printer;
|
||||||
|
|
||||||
TLocalisamfile* _soci;
|
TRelation* _soci;
|
||||||
TLocalisamfile* _anag;
|
TLocalisamfile* _anag;
|
||||||
TLocalisamfile* _ditte;
|
TLocalisamfile* _ditte;
|
||||||
TMask* _mask;
|
TMask* _mask;
|
||||||
@ -132,7 +133,7 @@ TQuery_application::TQuery_application() : _mask(NULL)
|
|||||||
|
|
||||||
void TQuery_application::create_files()
|
void TQuery_application::create_files()
|
||||||
{
|
{
|
||||||
_soci = new TLocalisamfile(LF_SOCI); _soci->setkey(3);
|
_soci = new TRelation(LF_SOCI); _soci->lfile().setkey(3);
|
||||||
_anag = new TLocalisamfile(LF_ANAG);
|
_anag = new TLocalisamfile(LF_ANAG);
|
||||||
_ditte = new TLocalisamfile(LF_NDITTE);
|
_ditte = new TLocalisamfile(LF_NDITTE);
|
||||||
}
|
}
|
||||||
@ -209,7 +210,7 @@ bool TQuery_application::do_query()
|
|||||||
TRectype& ditte = _ditte->curr();
|
TRectype& ditte = _ditte->curr();
|
||||||
|
|
||||||
soci.zero();
|
soci.zero();
|
||||||
_mask->autosave();
|
_mask->autosave(_soci);
|
||||||
for (_soci->read(_isgteq); !_soci->eof(); _soci->next()) // Fill sheet
|
for (_soci->read(_isgteq); !_soci->eof(); _soci->next()) // Fill sheet
|
||||||
{
|
{
|
||||||
if (query.test(soci) == 0)
|
if (query.test(soci) == 0)
|
||||||
@ -247,7 +248,7 @@ bool TQuery_application::do_query()
|
|||||||
TString nome(r.get());
|
TString nome(r.get());
|
||||||
|
|
||||||
TToken_string h(128);
|
TToken_string h(128);
|
||||||
h.add("Anno");
|
h.add("A/P ");
|
||||||
h.add(head(ditte, "CODDITTA", "Codice"));
|
h.add(head(ditte, "CODDITTA", "Codice"));
|
||||||
h.add(head(ditte, "RAGSOC", "Ragione sociale"));
|
h.add(head(ditte, "RAGSOC", "Ragione sociale"));
|
||||||
h.add("Carica|Qualifica|740|750");
|
h.add("Carica|Qualifica|740|750");
|
||||||
@ -264,7 +265,7 @@ bool TQuery_application::do_query()
|
|||||||
if (codice != soci.get("CODANAGRSO")) break;
|
if (codice != soci.get("CODANAGRSO")) break;
|
||||||
if (query.test(soci) != 0) continue;
|
if (query.test(soci) != 0) continue;
|
||||||
|
|
||||||
row = soci.get("ANNO");
|
row = soci.get("ATTPREC");
|
||||||
ditte.zero();
|
ditte.zero();
|
||||||
row.add(soci.get("CODDITTA"));
|
row.add(soci.get("CODDITTA"));
|
||||||
ditte.put("CODDITTA", row.get(1));
|
ditte.put("CODDITTA", row.get(1));
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "ba4600.h"
|
#include "ba4600.h"
|
||||||
|
|
||||||
PAGE "Ricerca soci" -1 -1 42 9
|
PAGE "Ricerca soci" -1 -1 50 9
|
||||||
|
|
||||||
RADIOBUTTON LST_SC1_TIPOASOC 12
|
RADIOBUTTON LST_SC1_TIPOASOC 12
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -11,12 +11,13 @@ BEGIN
|
|||||||
ITEM "G|Giuridica"
|
ITEM "G|Giuridica"
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER FLD_SC1_ANNO 4
|
LIST FLD_SC1_ANNO 12
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 20 2 "Anno "
|
PROMPT 20 2 "Attuali/Prec. "
|
||||||
HELP "Anno su cui effettuare la ricerca"
|
FIELD LF_SOCI->ATTPREC
|
||||||
FIELD LF_SOCI->ANNO
|
ITEM " |Tutti"
|
||||||
FLAGS "A"
|
ITEM "A|Attuali"
|
||||||
|
ITEM "P|Precedenti"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING FLD_SC1_CODCAR 2
|
STRING FLD_SC1_CODCAR 2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user