From aace49f40972b4f4f088ae409069e4f0817914b5 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 22 Sep 2010 06:47:04 +0000 Subject: [PATCH] Patch level : 10.0 patch 808 Files correlati : Ricompilazione Demo : [ ] Commento : Rilevazione ore git-svn-id: svn://10.65.10.50/branches/R_10_00@20889 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ci/ci0600.cpp | 13 ++++--------- ci/ci0600a.uml | 1 + ci/ci2100.cpp | 24 +++++++++--------------- ci/ci2200.cpp | 49 +++++++------------------------------------------ 4 files changed, 21 insertions(+), 66 deletions(-) diff --git a/ci/ci0600.cpp b/ci/ci0600.cpp index e85c9e628..bdb163986 100755 --- a/ci/ci0600.cpp +++ b/ci/ci0600.cpp @@ -181,16 +181,11 @@ void TDef_risoatt_msk::riempi_sheet() if (select.full()) select << "&&"; select << "(" << RILORE_CODICE << "==\"" << codice << "\")"; } - if (anno > 0) - { - if (select.full()) select << "&&"; - select << "STR(" << RILORE_ANNO << "==" << anno << ")"; - } - if (mese > 0) +/* if (mese > 0) { if (select.full()) select << "&&"; select << "STR(" RILORE_MESE << "==" << mese << ")"; - } + } */ if (tpora.full()) { if (select.full()) select << "&&"; @@ -218,9 +213,9 @@ void TDef_risoatt_msk::riempi_sheet() if (anno > 0) { - fromto << " " << RILORE_ANNO << "=\"" << anno << "\" "; + fromto << " " << RILORE_ANNO << "=" << anno << " "; if (mese > 0) - fromto << " " << RILORE_MESE << "=\"" << mese << "\" "; + fromto << " " << RILORE_MESE << "=" << mese << " "; } query << "FROM " << fromto << "\n" diff --git a/ci/ci0600a.uml b/ci/ci0600a.uml index f47d75fdc..097b433c2 100755 --- a/ci/ci0600a.uml +++ b/ci/ci0600a.uml @@ -41,6 +41,7 @@ NUMBER F_ANNO 4 BEGIN PROMPT 2 1 "Anno " FLAGS "A" + CHECKTYPE REQUIRED END LISTBOX F_MESE 10 diff --git a/ci/ci2100.cpp b/ci/ci2100.cpp index e50347d88..b4136141e 100755 --- a/ci/ci2100.cpp +++ b/ci/ci2100.cpp @@ -350,14 +350,14 @@ void TRilevamento_prev_msk::carica_default() void TRilevamento_prev_msk::riempi_sheet() { //leggo dalla maschera i campi chiave di ricerca - const int daanno = get_date(F_DADATA).year(); - int aanno = get_date(F_ADATA).year(); + const TDate da = get_date(F_DADATA); + const TDate a = get_date(F_ADATA); + const int daanno = da.year(); + int aanno = a.year(); if (aanno == 0) aanno = 2100; const TString4 risoatt = get(F_RISOATT) == "T" ? "" : get(F_RISOATT); - int damese = get_date(F_DADATA).month(); - int amese = get_date(F_ADATA).month(); const TString4 tpora = get(F_TPORA); TString80 codcosto; TString80 codcms; @@ -383,16 +383,8 @@ void TRilevamento_prev_msk::riempi_sheet() if (select.full()) select << "&&"; select << "(" << RILORE_CODICE << "==\"" << codice << "\")"; } - if (daanno > 0) - { - if (select.full()) select << "&&"; - select << "STR(BETWEEN(" << RILORE_ANNO << "," << daanno << "," << aanno << "))"; - } - if ( damese > 0 || amese > 0) - { if (select.full()) select << "&&"; - select << "(BETWEEN(" << RILORE_MESE << "," << damese << "," << amese << "))"; - } + select << "(BETWEEN(" << RILORE_DADATA << ",\"" << da << "\",\"" << a << "\"))"; if (tpora.full()) { if (select.full()) select << "&&"; @@ -420,8 +412,8 @@ void TRilevamento_prev_msk::riempi_sheet() TString to = from; if (daanno > 0) - from << " " << RILORE_ANNO << "=\"" << daanno << "\" "; - to << " " << RILORE_ANNO << "=\"" << aanno << "\" "; + from << " " << RILORE_ANNO << "=" << daanno << " "; + to << " " << RILORE_ANNO << "=" << aanno << " "; query << "FROM " << from << "\n" << "TO " << to; @@ -661,6 +653,8 @@ bool TRilevamento_prev_msk::on_field_event(TOperable_field& f, TField_event e, l } } break; + case F_DADATA: + case F_ADATA: case F_RISOATT: case F_CODRIS: case F_CODATT: diff --git a/ci/ci2200.cpp b/ci/ci2200.cpp index 425e15741..14a679b93 100755 --- a/ci/ci2200.cpp +++ b/ci/ci2200.cpp @@ -220,16 +220,6 @@ void TRilevamento_cons_msk::carica_default() if (select.full()) select << "&&"; select << "(" << RILORE_CODICE << "==\"" << codice << "\")"; } - if (anno > 0) - { - if (select.full()) select << "&&"; - select << "STR(" << RILORE_ANNO << "==" << anno << ")"; - } - if (mese > 0) - { - if (select.full()) select << "&&"; - select << "STR(" RILORE_MESE << "==" << mese << ")"; - } if (tpora.full()) { if (select.full()) select << "&&"; @@ -257,9 +247,9 @@ void TRilevamento_cons_msk::carica_default() if (anno > 0) { - fromto << " " << RILORE_ANNO << "=\"" << anno << "\" "; + fromto << " " << RILORE_ANNO << "=" << anno << " "; if (mese > 0) - fromto << RILORE_MESE << "=\"" << mese << "\" "; + fromto << RILORE_MESE << "=" << mese << " "; } riempi_calendario(query, anno, mese); } @@ -343,21 +333,6 @@ void TRilevamento_cons_msk::riempi_risoatt(int giorno) if (select.full()) select << "&&"; select << "(" << RILORE_CODICE << "==\"" << codice << "\")"; } - if (anno > 0) - { - if (select.full()) select << "&&"; - select << "STR(" << RILORE_ANNO << "==" << anno << ")"; - } - if (mese > 0) - { - if (select.full()) select << "&&"; - select << "STR(" RILORE_MESE << "==" << mese << ")"; - } - if (_edit_mode && giorno > 0) - { - if (select.full()) select << "&&"; - select << "STR(" RILORE_GIORNO << "==" << giorno << ")"; - } if (tpora.full()) { if (select.full()) select << "&&"; @@ -389,12 +364,12 @@ void TRilevamento_cons_msk::riempi_risoatt(int giorno) fromto << "=\"D\""; if (anno > 0) { - fromto << " " << RILORE_ANNO << "=\"" << anno << "\" "; + fromto << " " << RILORE_ANNO << "=" << anno << " "; if (mese > 0) { - fromto << RILORE_MESE << "=\"" << mese << "\" "; + fromto << RILORE_MESE << "=" << mese << " "; if (_edit_mode && giorno > 0) - fromto << RILORE_GIORNO << "=\"" << giorno << "\" "; + fromto << RILORE_GIORNO << "=" << giorno << " "; } } query << "FROM " << fromto << "\n" @@ -458,16 +433,6 @@ void TRilevamento_cons_msk::riempi_sheet() if (select.full()) select << "&&"; select << "(" << RILORE_CODICE << "==\"" << codice << "\")"; } - if (anno > 0) - { - if (select.full()) select << "&&"; - select << "STR(" << RILORE_ANNO << "==" << anno << ")"; - } - if (mese > 0) - { - if (select.full()) select << "&&"; - select << "STR(" RILORE_MESE << "==" << mese << ")"; - } if (tpora.full()) { if (select.full()) select << "&&"; @@ -495,9 +460,9 @@ void TRilevamento_cons_msk::riempi_sheet() if (anno > 0) { - fromto << " " << RILORE_ANNO << "=\"" << anno << "\" "; + fromto << " " << RILORE_ANNO << "=" << anno << " "; if (mese > 0) - fromto << RILORE_MESE << "=\"" << mese << "\" "; + fromto << RILORE_MESE << "=" << mese << " "; } query << "FROM " << fromto << "\n" << "TO " << fromto;