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
This commit is contained in:
alex 2010-09-22 06:47:04 +00:00
parent 253c8447ff
commit aace49f409
4 changed files with 21 additions and 66 deletions

View File

@ -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"

View File

@ -41,6 +41,7 @@ NUMBER F_ANNO 4
BEGIN
PROMPT 2 1 "Anno "
FLAGS "A"
CHECKTYPE REQUIRED
END
LISTBOX F_MESE 10

View File

@ -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:

View File

@ -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;