2011-02-10 13:30:55 +00:00
|
|
|
|
|
|
|
|
|
#include <applicat.h>
|
|
|
|
|
#include <automask.h>
|
|
|
|
|
#include <progind.h>
|
2011-02-14 16:58:57 +00:00
|
|
|
|
#include <recarray.h>
|
2011-02-10 13:30:55 +00:00
|
|
|
|
#include <relation.h>
|
|
|
|
|
#include <reprint.h>
|
|
|
|
|
|
2011-02-14 16:58:57 +00:00
|
|
|
|
#include "../ca/calib01.h"
|
|
|
|
|
#include "../ca/commesse.h"
|
2011-02-10 13:30:55 +00:00
|
|
|
|
|
2011-02-14 16:58:57 +00:00
|
|
|
|
#include "rilore.h"
|
2011-02-17 16:08:30 +00:00
|
|
|
|
#include "ci1350.h"
|
2011-02-10 13:30:55 +00:00
|
|
|
|
#include "ci1300a.h"
|
|
|
|
|
|
2011-02-15 16:43:31 +00:00
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
|
// Report
|
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
|
|
2011-02-17 11:24:08 +00:00
|
|
|
|
class TRil_ore_ris_report : public TReport
|
2011-02-15 16:43:31 +00:00
|
|
|
|
{
|
|
|
|
|
protected:
|
|
|
|
|
virtual bool use_mask() { return false; }
|
|
|
|
|
|
|
|
|
|
public:
|
2011-02-24 16:23:25 +00:00
|
|
|
|
TRil_ore_ris_report(const char tipostampa);
|
2011-02-15 16:43:31 +00:00
|
|
|
|
};
|
|
|
|
|
|
2011-02-10 13:30:55 +00:00
|
|
|
|
|
2011-02-24 16:23:25 +00:00
|
|
|
|
TRil_ore_ris_report::TRil_ore_ris_report(const char tipostampa)
|
2011-02-21 17:08:21 +00:00
|
|
|
|
{
|
2011-02-24 16:23:25 +00:00
|
|
|
|
if (tipostampa == 'M')
|
|
|
|
|
load("ci1300a");
|
|
|
|
|
else
|
|
|
|
|
load("ci1300b");
|
|
|
|
|
|
2011-02-21 17:08:21 +00:00
|
|
|
|
TRil_ore_recordset* recset = new TRil_ore_recordset;
|
|
|
|
|
set_recordset(recset);
|
|
|
|
|
}
|
2011-02-10 13:30:55 +00:00
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
|
// Maschera
|
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
|
|
2011-02-17 11:24:08 +00:00
|
|
|
|
class TRil_ore_ris_mask : public TAutomask
|
2011-02-10 13:30:55 +00:00
|
|
|
|
{
|
|
|
|
|
protected:
|
2011-02-14 16:58:57 +00:00
|
|
|
|
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
2011-02-15 16:43:31 +00:00
|
|
|
|
|
2011-06-17 09:47:02 +00:00
|
|
|
|
void elabora_risorsa(const TString& curr_risorsa, const int curr_mese, const bool ignore, TReport& rep) const;
|
2011-02-10 13:30:55 +00:00
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
void elabora() const;
|
|
|
|
|
|
2011-02-17 11:24:08 +00:00
|
|
|
|
TRil_ore_ris_mask();
|
|
|
|
|
virtual ~TRil_ore_ris_mask() {}
|
2011-02-10 13:30:55 +00:00
|
|
|
|
};
|
|
|
|
|
|
2011-02-17 11:24:08 +00:00
|
|
|
|
TRil_ore_ris_mask::TRil_ore_ris_mask() : TAutomask("ci1300a")
|
2011-02-10 13:30:55 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2011-02-17 11:24:08 +00:00
|
|
|
|
bool TRil_ore_ris_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
2011-02-10 13:30:55 +00:00
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2011-06-17 09:47:02 +00:00
|
|
|
|
void TRil_ore_ris_mask::elabora_risorsa(const TString& curr_risorsa, const int curr_mese, const bool ignore, TReport& rep) const
|
2011-02-14 16:58:57 +00:00
|
|
|
|
{
|
2011-02-24 16:23:25 +00:00
|
|
|
|
const int tipo_ordinamento = get_int(F_ORDINAMENTO);
|
|
|
|
|
const char tipo_stampa = get(F_TIPOSTAMPA)[0];
|
2011-05-23 15:42:51 +00:00
|
|
|
|
const int anno = get_int(F_ANNO);
|
2011-06-15 13:29:27 +00:00
|
|
|
|
const int mese = tipo_stampa == 'M' ? curr_mese : 0;
|
2011-05-05 00:35:30 +00:00
|
|
|
|
|
2011-06-14 15:21:36 +00:00
|
|
|
|
//date del periodo
|
|
|
|
|
TDate inizio_periodo, fine_periodo;
|
|
|
|
|
ci_inizio_fine_periodo(tipo_stampa, anno, mese, inizio_periodo, fine_periodo);
|
|
|
|
|
|
2011-02-14 16:58:57 +00:00
|
|
|
|
//creare un assoc_array con chiave TToken_string cms-sede-fase(1) o sede-cms-fase(2) in base ai parametri..
|
|
|
|
|
//..indicati sulla maschera
|
2011-02-24 16:23:25 +00:00
|
|
|
|
//se tipo_stampa = 'M'ensile: il contenuto dell'assoc_array sar<61>: tot_Prev - 31 valori giornalieri Consuntivi - tot_Consuntivo
|
|
|
|
|
//se tipo_stampa = 'A'nnuale: il contenuto dell'assoc_array sar<61>: tot_Prev - 12 valori mensili Consuntivi - tot_Consuntivo
|
|
|
|
|
|
2011-02-14 16:58:57 +00:00
|
|
|
|
TAssoc_array righe;
|
|
|
|
|
|
|
|
|
|
const TVariant tiporisorsa = get(F_RISOATT);
|
2011-02-10 13:30:55 +00:00
|
|
|
|
|
2011-02-17 16:08:30 +00:00
|
|
|
|
//query sul file delle ore in chiave 3: TIPO+TIPORA+CODICE+.....frega niente altro
|
2011-02-10 13:30:55 +00:00
|
|
|
|
TString query;
|
2011-02-17 16:08:30 +00:00
|
|
|
|
query << "USE RILORE KEY 3";
|
2011-02-14 16:58:57 +00:00
|
|
|
|
query << "\nFROM TIPO=#TIPO TIPORA=#TPRA CODICE=#CODICE";
|
|
|
|
|
query << "\nTO TIPO=#TIPO TIPORA=#TPRA CODICE=#CODICE";
|
2011-02-10 13:30:55 +00:00
|
|
|
|
|
2011-06-17 09:47:02 +00:00
|
|
|
|
TRil_ore_cms_recordset rilore_recset(query);
|
2011-02-14 16:58:57 +00:00
|
|
|
|
rilore_recset.set_var("#TPRA", tiporisorsa);
|
|
|
|
|
rilore_recset.set_var("#CODICE", curr_risorsa);
|
2011-02-10 13:30:55 +00:00
|
|
|
|
|
2011-06-17 09:47:02 +00:00
|
|
|
|
//aggiunta Adolfica: lista di commesse da considerare separatamente pi<70> commessa borraccione..
|
|
|
|
|
//..con tutte le altre
|
|
|
|
|
TSheet_field& lista = sfield(F_RIGHE);
|
|
|
|
|
rilore_recset.set_list(lista.rows_array(), ignore);
|
|
|
|
|
|
|
|
|
|
|
2011-02-14 16:58:57 +00:00
|
|
|
|
//un giro con le ore a 'P'reventivo, uno con quelle a 'C'onsuntivo
|
2011-02-10 13:30:55 +00:00
|
|
|
|
for (int i = 0; i < 2; i++)
|
|
|
|
|
{
|
2011-02-14 16:58:57 +00:00
|
|
|
|
const TVariant tipo = i == 0 ? "P" : "C";
|
2011-06-14 15:21:36 +00:00
|
|
|
|
const char tipo_ora = i == 0 ? 'P' : 'C'; //serve solo per rendere comprensibili gli if( che seguono
|
2011-02-14 16:58:57 +00:00
|
|
|
|
rilore_recset.set_var("#TIPO", tipo);
|
2011-02-10 13:30:55 +00:00
|
|
|
|
|
|
|
|
|
const long rilore_recset_items = rilore_recset.items();
|
|
|
|
|
|
|
|
|
|
for (bool ok = rilore_recset.move_first(); ok; ok = rilore_recset.move_next())
|
|
|
|
|
{
|
2011-02-15 16:43:31 +00:00
|
|
|
|
const TString80 codcosto = rilore_recset.get(RILORE_CODCOSTO).as_string();
|
|
|
|
|
const TString80 codcms = rilore_recset.get(RILORE_CODCMS).as_string();
|
|
|
|
|
const TString16 codfase = rilore_recset.get(RILORE_CODFASE).as_string();
|
|
|
|
|
|
|
|
|
|
//date limite qta ore sul record del file LF_RILORE
|
2011-06-14 15:21:36 +00:00
|
|
|
|
TDate ini_rilore = rilore_recset.get(RILORE_DADATA).as_date();
|
|
|
|
|
TDate fine_rilore = rilore_recset.get(RILORE_ADATA).as_date();
|
|
|
|
|
|
|
|
|
|
//adatta le date alla commessa se quest'ultima <20> contenuta nell'intervallo (pu<70> essere pi<70> breve..
|
|
|
|
|
//..dell'intervallo selezionato, oppure sovrapporsi solo parzialmente)
|
|
|
|
|
//se sta stampando per cdc -> fine_cms e ini_cms sono vuoti se non c'<27> la cms e non fa la trimmatura
|
|
|
|
|
TDate inizio_int, fine_int;
|
|
|
|
|
long giorni_lavorativi = ci_calcola_giorni_lavorativi_intersezione(ini_rilore, fine_rilore, inizio_periodo, fine_periodo,
|
|
|
|
|
inizio_int, fine_int);
|
|
|
|
|
//se i giorni lavorativi non ci sono <20> inutile procedere
|
2011-02-14 16:58:57 +00:00
|
|
|
|
if (giorni_lavorativi <= 0)
|
|
|
|
|
continue;
|
|
|
|
|
|
2011-06-14 15:21:36 +00:00
|
|
|
|
const long giorni_lavorativi_rilore = ci_calcola_giorni_lavorativi(ini_rilore, fine_rilore);
|
2011-02-14 16:58:57 +00:00
|
|
|
|
|
2011-06-14 15:21:36 +00:00
|
|
|
|
if (giorni_lavorativi_rilore > 0)
|
2011-02-14 16:58:57 +00:00
|
|
|
|
{
|
|
|
|
|
const real tot_ore = rilore_recset.get(RILORE_QTAORE).as_real();
|
|
|
|
|
|
2011-06-14 15:21:36 +00:00
|
|
|
|
const real tot_ore_uso_risorsa_nel_periodo = tot_ore * giorni_lavorativi / giorni_lavorativi_rilore;
|
|
|
|
|
|
2011-02-14 16:58:57 +00:00
|
|
|
|
//crea la chiave per l'assoc_array
|
|
|
|
|
TToken_string key;
|
2011-06-29 15:34:03 +00:00
|
|
|
|
if (ignore)
|
|
|
|
|
key = OTHER_ACTIVITIES;
|
|
|
|
|
else
|
2011-02-14 16:58:57 +00:00
|
|
|
|
{
|
2011-06-29 15:34:03 +00:00
|
|
|
|
switch(tipo_ordinamento)
|
|
|
|
|
{
|
|
|
|
|
case 1: key.add(codcms); break;
|
|
|
|
|
case 2: key.add(codcms); key.add(codcosto); break;
|
|
|
|
|
case 3: key.add(codcms); key.add(codfase); break;
|
|
|
|
|
case 4: key.add(codcms); key.add(codcosto); key.add(codfase); break;
|
|
|
|
|
case 5: key.add(codcosto); break;
|
|
|
|
|
case 6: key.add(codcosto); key.add(codcms); break;
|
|
|
|
|
case 7: key.add(codcosto); key.add(codfase); break;
|
|
|
|
|
case 8: key.add(codcosto); key.add(codcms); key.add(codfase); break;
|
|
|
|
|
default: break;
|
|
|
|
|
}
|
2011-02-14 16:58:57 +00:00
|
|
|
|
}
|
|
|
|
|
//se la chiave non esiste gi<67> nell'assoc_array allora crea l'elemento
|
|
|
|
|
TToken_string* record = (TToken_string*)righe.objptr(key);
|
|
|
|
|
if (record == NULL)
|
|
|
|
|
{
|
|
|
|
|
record = new TToken_string;
|
|
|
|
|
righe.add(key, record);
|
|
|
|
|
}
|
|
|
|
|
|
2011-06-14 15:21:36 +00:00
|
|
|
|
if (tipo_ora == 'P') //'P'reventivo (aggiorna solo il totale)
|
2011-02-14 16:58:57 +00:00
|
|
|
|
{
|
|
|
|
|
real prev = record->get(0);
|
2011-06-14 15:21:36 +00:00
|
|
|
|
prev += tot_ore_uso_risorsa_nel_periodo;
|
2011-02-15 16:43:31 +00:00
|
|
|
|
record->add(prev.string(), 0);
|
2011-02-14 16:58:57 +00:00
|
|
|
|
}
|
|
|
|
|
else //'C'onsuntivo (aggiorna tutte le caselle dei giorni lavorativi)
|
|
|
|
|
{
|
2011-06-14 15:21:36 +00:00
|
|
|
|
const real ore_al_giorno = tot_ore / giorni_lavorativi_rilore;
|
|
|
|
|
for (TDate data = inizio_int; data <= fine_int; ++data)
|
2011-04-21 15:21:00 +00:00
|
|
|
|
{
|
2011-06-14 15:21:36 +00:00
|
|
|
|
if (giorni_lavorativi_rilore == 1 || ci_is_ferial_day(data))
|
2011-04-21 15:21:00 +00:00
|
|
|
|
{
|
2011-06-14 15:21:36 +00:00
|
|
|
|
const int index = tipo_stampa == 'M' ? data.day() : data.month();
|
|
|
|
|
real prev = record->get(index);
|
|
|
|
|
prev += ore_al_giorno;
|
|
|
|
|
record->add(prev.string(), index);
|
|
|
|
|
real tot = record->get(32);
|
|
|
|
|
tot += ore_al_giorno;
|
|
|
|
|
record->add(tot.string(), 32);
|
2011-04-21 15:21:00 +00:00
|
|
|
|
}
|
2011-06-14 15:21:36 +00:00
|
|
|
|
} //for (TDate data = inizio_int..
|
|
|
|
|
} //if (tipo_ora == 'P')..
|
|
|
|
|
} //if (giorni_lavorativi_rilore > 0)..
|
2011-02-14 16:58:57 +00:00
|
|
|
|
} //for (bool ok = rilore_recset.move_first();..
|
2011-02-10 13:30:55 +00:00
|
|
|
|
|
2011-02-15 16:43:31 +00:00
|
|
|
|
} //for (int i = 0; i < 2; i++)...
|
2011-02-14 16:58:57 +00:00
|
|
|
|
|
2011-06-29 15:34:03 +00:00
|
|
|
|
//prende il recordset in opera dal report per fargli le set_var
|
|
|
|
|
TRil_ore_recordset* recset = (TRil_ore_recordset*)rep.recordset();
|
2011-02-21 17:08:21 +00:00
|
|
|
|
//tenta la mask2report per far apparire sul report i campi di selezione della maschera
|
|
|
|
|
rep.mask2report(*this);
|
2011-06-15 13:29:27 +00:00
|
|
|
|
TString4 code;
|
|
|
|
|
code.format("%02d", curr_mese);
|
|
|
|
|
recset->set_var("#MESE", code, true);
|
2011-02-14 16:58:57 +00:00
|
|
|
|
//finita l'elaborazione che ha riempito l'assoc_array, asegna il medesimo ad un..
|
|
|
|
|
//..csv_recordset e poi sbatte quest'ultimo (ordinato) nel report
|
2011-02-21 17:08:21 +00:00
|
|
|
|
//Il tutto nel magico metodo che segue!
|
2011-06-14 15:21:36 +00:00
|
|
|
|
ci_fill_recset_from_ass(righe, rep);
|
2011-02-22 11:44:01 +00:00
|
|
|
|
//campo a mano per fare scattare la mask2report()
|
2011-02-21 17:08:21 +00:00
|
|
|
|
rep.recordset()->set_var("#CODRIS", curr_risorsa, true);
|
2011-02-15 16:43:31 +00:00
|
|
|
|
|
2011-02-10 13:30:55 +00:00
|
|
|
|
}
|
|
|
|
|
|
2011-02-15 16:43:31 +00:00
|
|
|
|
|
2011-02-24 16:23:25 +00:00
|
|
|
|
//metodo di alto livello per filtrare su ris/att e chiamare i metodi di livello inferiore per elaborare la singola ris/att
|
2011-02-17 11:24:08 +00:00
|
|
|
|
void TRil_ore_ris_mask::elabora() const
|
2011-02-16 14:55:08 +00:00
|
|
|
|
{
|
2011-06-15 13:29:27 +00:00
|
|
|
|
//book di stampa
|
2011-02-16 14:55:08 +00:00
|
|
|
|
TReport_book book;
|
2011-02-24 16:23:25 +00:00
|
|
|
|
//stampa mensile o annuale?
|
|
|
|
|
const char tipostampa = get(F_TIPOSTAMPA)[0];
|
|
|
|
|
TRil_ore_ris_report rep(tipostampa);
|
|
|
|
|
|
2011-06-15 13:29:27 +00:00
|
|
|
|
int da_mese = 1;
|
|
|
|
|
int a_mese = 1;
|
2011-02-24 16:23:25 +00:00
|
|
|
|
if (tipostampa == 'M')
|
2011-02-10 13:30:55 +00:00
|
|
|
|
{
|
2011-06-15 13:29:27 +00:00
|
|
|
|
da_mese = get_int(F_DA_MESE);
|
|
|
|
|
a_mese = get_int(F_A_MESE);
|
2011-02-10 13:30:55 +00:00
|
|
|
|
}
|
|
|
|
|
|
2011-06-15 13:29:27 +00:00
|
|
|
|
//giro su tutti i mesi; se stampa annuale o mese unico -> un giro solo
|
|
|
|
|
for (int m = da_mese; m <= a_mese; m++)
|
2011-02-10 13:30:55 +00:00
|
|
|
|
{
|
2011-06-15 13:29:27 +00:00
|
|
|
|
if (tipostampa == 'M')
|
|
|
|
|
format_report_month(get_int(F_ANNO), m, rep);
|
2011-02-10 13:30:55 +00:00
|
|
|
|
|
2011-06-15 13:29:27 +00:00
|
|
|
|
//query sulla tabella interessata (risorse o attrezzature)
|
|
|
|
|
TString16 da_ris_att, a_ris_att;
|
|
|
|
|
TString query_ris_att;
|
|
|
|
|
TString msg;
|
|
|
|
|
const char tiporisorsa = get(F_RISOATT)[0];
|
2011-02-10 13:30:55 +00:00
|
|
|
|
|
2011-06-15 13:29:27 +00:00
|
|
|
|
if (tiporisorsa == 'R')
|
|
|
|
|
{
|
|
|
|
|
da_ris_att = get(F_DA_CODRIS);
|
|
|
|
|
a_ris_att = get(F_A_CODRIS);
|
|
|
|
|
query_ris_att << "USE RSS";
|
|
|
|
|
msg << "Scansione risorse...";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
da_ris_att = get(F_DA_CODATT);
|
|
|
|
|
a_ris_att = get(F_A_CODATT);
|
|
|
|
|
query_ris_att << "USE ATR";
|
|
|
|
|
"Scansione attrezzature...";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
query_ris_att << "\nFROM CODTAB=#DACODICE";
|
|
|
|
|
query_ris_att << "\nTO CODTAB=#ACODICE";
|
|
|
|
|
|
|
|
|
|
TISAM_recordset recset_ris_att(query_ris_att);
|
|
|
|
|
recset_ris_att.set_var("#DACODICE", da_ris_att);
|
|
|
|
|
recset_ris_att.set_var("#ACODICE", a_ris_att);
|
|
|
|
|
const long recset_ris_att_items = recset_ris_att.items();
|
|
|
|
|
|
2011-06-17 09:47:02 +00:00
|
|
|
|
TSheet_field& lista = sfield(F_RIGHE);
|
|
|
|
|
//se la stampa ha come chiave principale il CDC, lo sheet (che e' nascosto!) va vuotato in quanto potrebbe avere elementi..
|
|
|
|
|
//..dovuti al profilo della maschera che produrrebbero una stampa non desiderata (per ora!, verra' il momento in cui il CRPA..
|
|
|
|
|
//..cambiera' idea..)
|
|
|
|
|
const int tipo_ordinamento = get_int(F_ORDINAMENTO);
|
|
|
|
|
if (tipo_ordinamento >= 5)
|
|
|
|
|
lista.reset();
|
|
|
|
|
|
|
|
|
|
//Come gestire la lista delle commesse particolari
|
|
|
|
|
//a) nel caso la lista sia vuota il giro di stampa <20> unico, considerando tutte le cms/cdc
|
|
|
|
|
//b) nel caso la lista abbia elementi(cms/cdc), viene fatto un primo giro sui soli elementi della lista,...
|
|
|
|
|
//poi un successivo su tutte le cms/cdc che non apparivano nella lista
|
|
|
|
|
const int ignore_start = 0;
|
|
|
|
|
const int ignore_end = !lista.empty();
|
2011-06-29 15:34:03 +00:00
|
|
|
|
|
|
|
|
|
TProgind pi(recset_ris_att_items, msg, true, true);
|
|
|
|
|
//per ogni risorsa/attrezzatura dell'elenco genera un report singolo che viene riempito nella elabora_risorsa e..
|
|
|
|
|
//..aggiunto al book per la stampa finale
|
|
|
|
|
for (bool ok = recset_ris_att.move_first(); ok; ok = recset_ris_att.move_next())
|
2011-06-15 13:29:27 +00:00
|
|
|
|
{
|
2011-06-29 15:34:03 +00:00
|
|
|
|
if (!pi.addstatus(1))
|
|
|
|
|
break;
|
2011-02-10 13:30:55 +00:00
|
|
|
|
|
2011-06-29 15:34:03 +00:00
|
|
|
|
const TString80 curr_risorsa = recset_ris_att.cursor()->curr().get("CODTAB");
|
2011-06-15 13:29:27 +00:00
|
|
|
|
|
2011-06-29 15:34:03 +00:00
|
|
|
|
//setta un nuovo recset al report: se non lo facesse il recset sarebbe sempre il medesimo per ogni..
|
|
|
|
|
//..risorsa (ovvero assoc_array) e quindi si incrementerebbe all'ignoranza
|
|
|
|
|
TRil_ore_recordset* recset = new TRil_ore_recordset;
|
|
|
|
|
rep.set_recordset(recset);
|
2011-06-17 09:47:02 +00:00
|
|
|
|
|
2011-06-29 15:34:03 +00:00
|
|
|
|
for (int ignore = ignore_start; ignore <= ignore_end; ignore++)
|
|
|
|
|
{
|
2011-06-17 09:47:02 +00:00
|
|
|
|
elabora_risorsa(curr_risorsa, m, ignore!=0, rep);
|
2011-06-29 15:34:03 +00:00
|
|
|
|
} //for (int ignore = ignore_start..
|
|
|
|
|
//stampa un report per risorsa
|
|
|
|
|
book.add(rep);
|
|
|
|
|
} ////for (bool ok = recset_ris_att.move_first()...
|
2011-02-10 13:30:55 +00:00
|
|
|
|
|
2011-06-15 13:29:27 +00:00
|
|
|
|
} //for (int m = da_mese; ..
|
2011-02-15 16:43:31 +00:00
|
|
|
|
//e alla fine stampa il book
|
|
|
|
|
book.preview();
|
2011-02-10 13:30:55 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
|
// Applicazione
|
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
|
|
2011-02-17 11:24:08 +00:00
|
|
|
|
class TRil_ore_ris : public TSkeleton_application
|
2011-02-10 13:30:55 +00:00
|
|
|
|
{
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
virtual void main_loop();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2011-02-17 11:24:08 +00:00
|
|
|
|
void TRil_ore_ris::main_loop()
|
2011-02-10 13:30:55 +00:00
|
|
|
|
{
|
2011-02-17 11:24:08 +00:00
|
|
|
|
TRil_ore_ris_mask mask;
|
2011-02-10 13:30:55 +00:00
|
|
|
|
|
|
|
|
|
while (mask.run() == K_ENTER)
|
|
|
|
|
{
|
|
|
|
|
mask.elabora();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int ci1300(int argc, char* argv[])
|
|
|
|
|
{
|
2011-02-17 11:24:08 +00:00
|
|
|
|
TRil_ore_ris sd;
|
|
|
|
|
sd.run(argc, argv, "Rilevazione ore per Risorsa - Attrezzatura");
|
2011-02-10 13:30:55 +00:00
|
|
|
|
return 0;
|
|
|
|
|
}
|