Patch level : at2 at9 at0 at9600a.msk
Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/branches/R_10_00@22598 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
76de617a65
commit
31c48b6884
@ -2348,7 +2348,7 @@ bool TGestioneSoggetti::controlli_notify(TSheet_field& s, int r, KEY k)
|
|||||||
}
|
}
|
||||||
if (modified)
|
if (modified)
|
||||||
{
|
{
|
||||||
TSheet_field& i = (TSheet_field&)mask.field(F_IDONEITA);
|
TSheet_field& i = mask.sfield(F_IDONEITA);
|
||||||
c_reord(s, i);
|
c_reord(s, i);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -2397,7 +2397,7 @@ bool TGestioneSoggetti::idoneita_notify(TSheet_field& s, int r, KEY k)
|
|||||||
}
|
}
|
||||||
if (modified)
|
if (modified)
|
||||||
{
|
{
|
||||||
TSheet_field& c = (TSheet_field&)mask.field(F_CONTROLLI);
|
TSheet_field& c = mask.sfield(F_CONTROLLI);
|
||||||
c_reord(c,s);
|
c_reord(c,s);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include <form.h>
|
#include <form.h>
|
||||||
#include <mask.h>
|
#include <mask.h>
|
||||||
#include <printapp.h>
|
#include <printapp.h>
|
||||||
|
#include <progind.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
|
|
||||||
#include "donaz.h"
|
#include "donaz.h"
|
||||||
@ -84,10 +85,10 @@ TRelation* TEti_freq_form::relation() const { return cursor()->relation(); }
|
|||||||
|
|
||||||
void TFrequenza::filtra_sezioni()
|
void TFrequenza::filtra_sezioni()
|
||||||
{
|
{
|
||||||
const TString16 sezini = _msk->get(F_SEZINI);
|
const TString& sezini = _msk->get(F_SEZINI);
|
||||||
const TString16 sotini = _msk->get(F_SOTINI);
|
const TString& sotini = _msk->get(F_SOTINI);
|
||||||
const TString16 sezfin = _msk->get(F_SEZFIN);
|
const TString& sezfin = _msk->get(F_SEZFIN);
|
||||||
const TString16 sotfin = _msk->get(F_SOTFIN);
|
const TString& sotfin = _msk->get(F_SOTFIN);
|
||||||
TRectype da(LF_SOGGETTI);
|
TRectype da(LF_SOGGETTI);
|
||||||
TRectype a(LF_SOGGETTI);
|
TRectype a(LF_SOGGETTI);
|
||||||
if (sezini.not_empty())
|
if (sezini.not_empty())
|
||||||
@ -182,86 +183,86 @@ void TFrequenza::set_page(int file, int cnt)
|
|||||||
|
|
||||||
bool TFrequenza::filter_func_freq(const TRelation* rel)
|
bool TFrequenza::filter_func_freq(const TRelation* rel)
|
||||||
{
|
{
|
||||||
const TDate datanulla(NULLDATE);
|
if (rel->file().recno() % 100 == 0)
|
||||||
bool filtrato = TRUE;
|
do_events();
|
||||||
TLocalisamfile& sog = rel->lfile();
|
|
||||||
|
const TRectype& sog = rel->curr();
|
||||||
|
const TFrequenza& a = app();
|
||||||
|
|
||||||
|
bool filtrato = true;
|
||||||
|
|
||||||
// filtro per sesso
|
// filtro per sesso
|
||||||
if (app()._sesso != 'I')
|
if (a._sesso != 'I')
|
||||||
filtrato = (sog.get(SOG_SESSO)[0] == app()._sesso);
|
filtrato = sog.get(SOG_SESSO)[0] == a._sesso;
|
||||||
|
|
||||||
// filtro per nati all'estero
|
// filtro per nati all'estero
|
||||||
if (filtrato && app()._natiestero)
|
if (filtrato && a._natiestero)
|
||||||
filtrato = (sog.get(SOG_COMNASC)[0] == 'Z');
|
filtrato = sog.get_char(SOG_COMNASC) == 'Z';
|
||||||
|
|
||||||
// filtro per data nascita
|
// filtro per data nascita
|
||||||
if (filtrato)
|
if (filtrato)
|
||||||
{
|
{
|
||||||
if (app()._dnini != datanulla)
|
if (a._dnini.ok())
|
||||||
{
|
{
|
||||||
const TDate datanasc = sog.get_date(SOG_DATANASC);
|
const TDate datanasc = sog.get_date(SOG_DATANASC);
|
||||||
filtrato = datanasc >= app()._dnini;
|
filtrato = datanasc >= a._dnini;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (filtrato)
|
if (filtrato)
|
||||||
{
|
{
|
||||||
if (app()._dnfin != datanulla)
|
if (a._dnfin.ok())
|
||||||
{
|
{
|
||||||
const TDate datanasc = sog.get_date(SOG_DATANASC);
|
const TDate datanasc = sog.get_date(SOG_DATANASC);
|
||||||
filtrato = datanasc <= app()._dnfin;
|
filtrato = datanasc <= a._dnfin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// filtro per categorie
|
// filtro per categorie
|
||||||
if (filtrato)
|
if (filtrato)
|
||||||
{
|
{
|
||||||
TAssoc_array& categorie = app()._categorie;
|
const TAssoc_array& categorie = a._categorie;
|
||||||
if (categorie.items() != 0)
|
if (!categorie.empty())
|
||||||
{
|
{
|
||||||
const TString16 cat = sog.get(SOG_CATDON);
|
const TString& cat = sog.get(SOG_CATDON);
|
||||||
filtrato = categorie.is_key((const char*) cat);
|
filtrato = categorie.is_key(cat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// filtro per numero donazioni nel periodo
|
// filtro per numero donazioni nel periodo
|
||||||
if (filtrato)
|
if (filtrato)
|
||||||
{
|
{
|
||||||
int numdon = 0;
|
int numdon = 0;
|
||||||
filtrato = FALSE;
|
filtrato = false;
|
||||||
if (app()._ctrltotale)
|
if (a._ctrltotale)
|
||||||
numdon = sog.get_int(SOG_TOTDON);
|
numdon = sog.get_int(SOG_TOTDON);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (app()._dataini == datanulla)
|
if (!a._dataini.ok())
|
||||||
numdon = sog.get_int(SOG_DONPRECSI) + sog.get_int(SOG_DONPRECAF);
|
numdon = sog.get_int(SOG_DONPRECSI) + sog.get_int(SOG_DONPRECAF);
|
||||||
const long codice = sog.get_long(SOG_CODICE);
|
const long codice = sog.get_long(SOG_CODICE);
|
||||||
TRectype* key = new TRectype(LF_DONAZ);
|
TRectype* key = new TRectype(LF_DONAZ);
|
||||||
key->put(DON_CODICE, codice);
|
key->put(DON_CODICE, codice);
|
||||||
int err = app()._sdonazioni->read(key);
|
int err = a._sdonazioni->read(key);
|
||||||
if (err == NOERR)
|
if (err == NOERR)
|
||||||
{
|
{
|
||||||
for (int r=1; r<=app()._sdonazioni->rows(); r++)
|
for (int r=1; r<=a._sdonazioni->rows(); r++)
|
||||||
{
|
{
|
||||||
const TRectype& riga = app()._sdonazioni->row(r);
|
const TRectype& riga = a._sdonazioni->row(r);
|
||||||
TDate datadon = riga.get_date(DON_DATADON);
|
const TDate datadon = riga.get_date(DON_DATADON);
|
||||||
if ((datadon>=app()._dataini) && (datadon<=app()._datafin))
|
if ((datadon>=a._dataini) && (datadon<=a._datafin))
|
||||||
{
|
{
|
||||||
TString16 tipodon = riga.get(DON_TIPODON);
|
const TString& tipodon = riga.get(DON_TIPODON);
|
||||||
if ((app()._tipodon.empty()) || (app()._tipodon1 == tipodon) || (app()._tipodon2 == tipodon) || (app()._tipodon3 == tipodon) || (app()._tipodon4 == tipodon) || (app()._tipodon5 == tipodon))
|
if ((a._tipodon.empty()) || (a._tipodon1 == tipodon) || (a._tipodon2 == tipodon) ||
|
||||||
|
(a._tipodon3 == tipodon) || (a._tipodon4 == tipodon) || (a._tipodon5 == tipodon))
|
||||||
numdon++;
|
numdon++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch (app()._condizione)
|
switch (a._condizione)
|
||||||
{
|
{
|
||||||
case 'A':
|
case 'A': filtrato = (numdon >= a._numdon); break;
|
||||||
filtrato = (numdon >= app()._numdon);
|
case 'E': filtrato = (numdon == a._numdon); break;
|
||||||
break;
|
case 'D': filtrato = (numdon >= 1 && numdon <= a._numdon); break;
|
||||||
case 'E':
|
default : break;
|
||||||
filtrato = (numdon == app()._numdon);
|
|
||||||
break;
|
|
||||||
case 'D':
|
|
||||||
filtrato = (numdon >= 1 && numdon <= app()._numdon);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return filtrato;
|
return filtrato;
|
||||||
@ -516,19 +517,20 @@ bool TFrequenza::set_print(int m)
|
|||||||
TString256 chiave = "";
|
TString256 chiave = "";
|
||||||
switch (ordina)
|
switch (ordina)
|
||||||
{
|
{
|
||||||
case 'A':
|
case 'A': chiave << "90->CODSEZ|90->CODSOT|UPPER(90->COGNOME)|UPPER(90->NOME)"; break;
|
||||||
chiave << "90->CODSEZ|90->CODSOT|UPPER(90->COGNOME)|UPPER(90->NOME)";
|
case 'C': chiave << "90->DOM_CAP|UPPER(90->COGNOME)|UPPER(90->NOME)"; break;
|
||||||
break;
|
default : break;
|
||||||
case 'C':
|
|
||||||
chiave << "90->DOM_CAP|UPPER(90->COGNOME)|UPPER(90->NOME)";
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
((TSorted_cursor*) current_cursor())->change_order(chiave);
|
((TSorted_cursor*) current_cursor())->change_order(chiave);
|
||||||
current_cursor()->set_filterfunction (filter_func_freq);
|
current_cursor()->set_filterfunction (filter_func_freq);
|
||||||
reset_print();
|
reset_print();
|
||||||
printer().footerlen(0);
|
printer().footerlen(0);
|
||||||
crea_intestazione();
|
crea_intestazione();
|
||||||
return TRUE;
|
|
||||||
|
TProgind pi(1, TR("Controllo donazioni per soggetto"), true, false);
|
||||||
|
*current_cursor() = 0L;
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -57,8 +57,8 @@ void TControlloDonazioni::set_page(int file, int cnt)
|
|||||||
set_row(1,"@11g@S", FLD(LF_DONAZ, DON_LUOGODON));
|
set_row(1,"@11g@S", FLD(LF_DONAZ, DON_LUOGODON));
|
||||||
set_row(1,"@20g@S", FLD(LF_DONAZ,DON_TIPODON));
|
set_row(1,"@20g@S", FLD(LF_DONAZ,DON_TIPODON));
|
||||||
set_row(1,"@25g#a", &_cognome_nome);
|
set_row(1,"@25g#a", &_cognome_nome);
|
||||||
set_row(1,"@76g@S", FLD(LF_SOGGETTI,SOG_CODSEZ));
|
set_row(1,"@76g@S", FLD(LF_DONAZ,DON_CODSEZ));
|
||||||
set_row(1,"@79g@S", FLD(LF_SOGGETTI,SOG_CODSOT));
|
set_row(1,"@79g@S", FLD(LF_DONAZ,DON_CODSOT));
|
||||||
set_row(1,"@82g@S", FLD(LF_SOGGETTI, SOG_GRUPPOAB0));
|
set_row(1,"@82g@S", FLD(LF_SOGGETTI, SOG_GRUPPOAB0));
|
||||||
set_row(1,"@87g@S", FLD(LF_SOGGETTI, SOG_RHANTID));
|
set_row(1,"@87g@S", FLD(LF_SOGGETTI, SOG_RHANTID));
|
||||||
set_row(1,"@91g@S", FLD(LF_SOGGETTI, SOG_FENOTIPORH));
|
set_row(1,"@91g@S", FLD(LF_SOGGETTI, SOG_FENOTIPORH));
|
||||||
@ -76,8 +76,8 @@ void TControlloDonazioni::set_page(int file, int cnt)
|
|||||||
set_row(2,"@16g@8,rs", FLD(LF_SOGGETTI,SOG_TESSAVIS));
|
set_row(2,"@16g@8,rs", FLD(LF_SOGGETTI,SOG_TESSAVIS));
|
||||||
set_row(1,"@25g#a", &_cognome_nome);
|
set_row(1,"@25g#a", &_cognome_nome);
|
||||||
set_row(2,"@25g@ld", FLD(LF_SOGGETTI,SOG_DATANASC));
|
set_row(2,"@25g@ld", FLD(LF_SOGGETTI,SOG_DATANASC));
|
||||||
set_row(1,"@61g@S", FLD(LF_SOGGETTI,SOG_CODSEZ));
|
set_row(1,"@61g@S", FLD(LF_DONAZ,DON_CODSEZ));
|
||||||
set_row(2,"@64g@S", FLD(LF_SOGGETTI,SOG_CODSOT));
|
set_row(2,"@64g@S", FLD(LF_DONAZ,DON_CODSOT));
|
||||||
set_row(1,"@64g@ld", FLD(LF_DONAZ,DON_DATADON));
|
set_row(1,"@64g@ld", FLD(LF_DONAZ,DON_DATADON));
|
||||||
set_row(2,"@64g@S", FLD(LF_DONAZ,DON_TIPODON));
|
set_row(2,"@64g@S", FLD(LF_DONAZ,DON_TIPODON));
|
||||||
set_row(1,"@75g@S", FLD(LF_SOGGETTI, SOG_GRUPPOAB0));
|
set_row(1,"@75g@S", FLD(LF_SOGGETTI, SOG_GRUPPOAB0));
|
||||||
@ -93,8 +93,8 @@ void TControlloDonazioni::set_page(int file, int cnt)
|
|||||||
set_row(1,"@26g@S", FLD(LF_SOGGETTI,SOG_TESSAVIS));
|
set_row(1,"@26g@S", FLD(LF_SOGGETTI,SOG_TESSAVIS));
|
||||||
set_row(1,"@34g#a", &_cognome_nome);
|
set_row(1,"@34g#a", &_cognome_nome);
|
||||||
set_row(1,"@70g@ld", FLD(LF_SOGGETTI,SOG_DATANASC));
|
set_row(1,"@70g@ld", FLD(LF_SOGGETTI,SOG_DATANASC));
|
||||||
set_row(1,"@81g@S", FLD(LF_SOGGETTI,SOG_CODSEZ));
|
set_row(1,"@81g@S", FLD(LF_DONAZ,DON_CODSEZ));
|
||||||
set_row(1,"@84g@S", FLD(LF_SOGGETTI,SOG_CODSOT));
|
set_row(1,"@84g@S", FLD(LF_DONAZ,DON_CODSOT));
|
||||||
set_row(1,"@87g@ld", FLD(LF_DONAZ,DON_DATADON));
|
set_row(1,"@87g@ld", FLD(LF_DONAZ,DON_DATADON));
|
||||||
set_row(1,"@98g@S", FLD(LF_DONAZ,DON_TIPODON));
|
set_row(1,"@98g@S", FLD(LF_DONAZ,DON_TIPODON));
|
||||||
set_row(1,"@104g@S", FLD(LF_DONAZ, DON_LUOGODON));
|
set_row(1,"@104g@S", FLD(LF_DONAZ, DON_LUOGODON));
|
||||||
|
@ -563,6 +563,6 @@ bool TStampeSingole::user_destroy()
|
|||||||
int at7300(int argc, char* argv[])
|
int at7300(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
TStampeSingole a;
|
TStampeSingole a;
|
||||||
a.run(argc, argv, "Stampe singole");
|
a.run(argc, argv, TR("Stampe singole"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -85,10 +85,8 @@ bool TEsporta_ON_recordset::set(unsigned int column, const TVariant& var)
|
|||||||
return TCSV_recordset::set(column, TVariant(str));
|
return TCSV_recordset::set(column, TVariant(str));
|
||||||
}
|
}
|
||||||
|
|
||||||
TEsporta_ON_recordset::TEsporta_ON_recordset()
|
TEsporta_ON_recordset::TEsporta_ON_recordset() : TCSV_recordset("CSV(\"|\")")
|
||||||
: TCSV_recordset("CSV(\"|\")")
|
{ }
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
@ -105,29 +103,33 @@ protected:
|
|||||||
|
|
||||||
const TString& find_comune(const TRecordset& soggetti) const;
|
const TString& find_comune(const TRecordset& soggetti) const;
|
||||||
const TString& find_dencom_nasc(const TString& codcom) const;
|
const TString& find_dencom_nasc(const TString& codcom) const;
|
||||||
void crea_prima_riga(TEsporta_ON_recordset& csv, const TString& sezini, const TString& sezfin) const;
|
void crea_prima_riga(TEsporta_ON_recordset& csv, const TString& sezini, const TString& sezfin, TConfig& config) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void esporta_soggetti(const TMask& msk) const;
|
void esporta_soggetti(const TMask& msk) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void TEsporta_ON_app::crea_prima_riga(TEsporta_ON_recordset& csv, const TString& sezini, const TString& sezfin) const
|
void TEsporta_ON_app::crea_prima_riga(TEsporta_ON_recordset& csv, const TString& sezini, const TString& sezfin, TConfig& config) const
|
||||||
{
|
{
|
||||||
// query su sezioni per stabilire cosa scrivere nel primo record
|
// query su sezioni per stabilire cosa scrivere nel primo record
|
||||||
// elenco delle sezioni trasferite separate da ','
|
// elenco delle sezioni trasferite separate da ','
|
||||||
TString querysez;
|
TString querysez;
|
||||||
querysez << "USE SEZIONI\nSELECT CODSOT=''";
|
querysez << "USE SEZIONI\nSELECT CODSOT=''";
|
||||||
if (sezini.not_empty())
|
if (sezini.full())
|
||||||
querysez << "\nFROM CODSEZ=\"" << sezini << "\"";
|
querysez << "\nFROM CODSEZ=\"" << sezini << "\"";
|
||||||
if (sezini.not_empty())
|
if (sezfin.full())
|
||||||
querysez << "\nTO CODSEZ=\"" << sezfin << "\"";
|
querysez << "\nTO CODSEZ=\"" << sezfin << "\"";
|
||||||
TISAM_recordset sezioni(querysez);
|
TISAM_recordset sezioni(querysez);
|
||||||
|
|
||||||
// crea testata
|
// crea testata
|
||||||
TToken_string ts("", ',');
|
TToken_string ts("", ',');
|
||||||
for (bool oks = sezioni.move_first(); oks; oks = sezioni.move_next())
|
for (bool oks = sezioni.move_first(); oks; oks = sezioni.move_next())
|
||||||
ts.add(sezioni.get(SEZ_CODSEZ).as_string());
|
{
|
||||||
|
const TString& codsez = sezioni.get(SEZ_CODSEZ).as_string();
|
||||||
|
const TString& sez_on = config.get(codsez, "SEZIONI");
|
||||||
|
if (sez_on.full())
|
||||||
|
ts.add(sez_on);
|
||||||
|
}
|
||||||
csv.new_rec(ts);
|
csv.new_rec(ts);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,44 +144,49 @@ void TEsporta_ON_app::esporta_soggetti(const TMask& m) const
|
|||||||
const TString4 sotfin = m.get(F_SOTFIN);
|
const TString4 sotfin = m.get(F_SOTFIN);
|
||||||
TEsporta_ON_recordset csv;
|
TEsporta_ON_recordset csv;
|
||||||
//crea la prima stupida riga
|
//crea la prima stupida riga
|
||||||
crea_prima_riga(csv, sezini, sezfin);
|
crea_prima_riga(csv, sezini, sezfin, config);
|
||||||
|
|
||||||
|
|
||||||
// query su soggetti
|
// query su soggetti
|
||||||
TString query;
|
TString query;
|
||||||
query << "USE SOGGETTI KEY 3";
|
query << "USE SOGGETTI KEY 3";
|
||||||
|
|
||||||
const TDate data = m.get_date(F_DATA);
|
const TDate data = m.get_date(F_DATA);
|
||||||
if (sezini.not_empty())
|
if (sezini.full())
|
||||||
query << "\nFROM CODSEZ=\"" << sezini << "\"";
|
query << "\nFROM CODSEZ=\"" << sezini << "\"";
|
||||||
if (sezini.not_empty())
|
if (sezfin.full())
|
||||||
query << "\nTO CODSEZ=\"" << sezfin << "\"";
|
query << "\nTO CODSEZ=\"" << sezfin << "\"";
|
||||||
|
|
||||||
TISAM_recordset soggetti(query);
|
TISAM_recordset soggetti(query);
|
||||||
|
|
||||||
|
TFilename path = config.get("NOMEFILE", "GENERALE");
|
||||||
|
if (path.empty())
|
||||||
|
path = "file_on.txt";
|
||||||
|
TString msg;
|
||||||
|
msg << TR("Estrazione soggetti in ") << path;
|
||||||
|
|
||||||
const int items = soggetti.items();
|
const int items = soggetti.items();
|
||||||
TProgind pi(items, "Estrazione soggetti...", true, true);
|
TProgind pi(items, msg);
|
||||||
TString ws;
|
TString ws;
|
||||||
for (bool ok = soggetti.move_first(); ok; ok = soggetti.move_next())
|
for (bool ok = soggetti.move_first(); ok; ok = soggetti.move_next())
|
||||||
{
|
{
|
||||||
if (!pi.addstatus(1))
|
if (!pi.addstatus(1))
|
||||||
break;
|
break;
|
||||||
const TString4& catdon = soggetti.get(SOG_CATDON).as_string();
|
const TString4 catdon = soggetti.get(SOG_CATDON).as_string();
|
||||||
const TDate dataisc = soggetti.get(SOG_DATAISC).as_date();
|
const TDate dataisc = soggetti.get(SOG_DATAISC).as_date();
|
||||||
const bool passa = config.get_bool(catdon, "CATEGORIE");
|
const bool passa = config.get_bool(catdon, "CATEGORIE");
|
||||||
|
|
||||||
const TString4& codsez = soggetti.get(SOG_CODSEZ).as_string();
|
const TString& codsez = soggetti.get(SOG_CODSEZ).as_string();
|
||||||
TString16 sez_on = config.get(codsez, "SEZIONI");
|
const TString& sez_on = config.get(codsez, "SEZIONI");
|
||||||
if (sez_on.empty())
|
if (sez_on.blank())
|
||||||
sez_on = codsez;
|
continue;
|
||||||
|
|
||||||
//if ((catdon == "01" || catdon == "04") && (dataisc.empty() || dataisc <= data))
|
if (passa && (dataisc.empty() || dataisc <= data))
|
||||||
if (passa && (dataisc.empty() || dataisc <= data))
|
|
||||||
{
|
{
|
||||||
//creazione di un nuovo record di tipo soggetti
|
//creazione di un nuovo record di tipo soggetti
|
||||||
csv.new_rec("");
|
csv.new_rec("");
|
||||||
//..e successivo riempimento
|
//..e successivo riempimento
|
||||||
csv.set(0, (TVariant) sez_on);
|
|
||||||
|
csv.set(0, sez_on);
|
||||||
csv.set(1, soggetti.get(SOG_TESSAVIS));
|
csv.set(1, soggetti.get(SOG_TESSAVIS));
|
||||||
csv.set(2, soggetti.get(SOG_CF));
|
csv.set(2, soggetti.get(SOG_CF));
|
||||||
csv.set(3, soggetti.get(SOG_COGNOME));
|
csv.set(3, soggetti.get(SOG_COGNOME));
|
||||||
@ -208,9 +215,6 @@ void TEsporta_ON_app::esporta_soggetti(const TMask& m) const
|
|||||||
}
|
}
|
||||||
} //for(move_first()..
|
} //for(move_first()..
|
||||||
|
|
||||||
TString80 path = config.get("NOMEFILE", "GENERALE");
|
|
||||||
if (path.empty())
|
|
||||||
path = "file_on.txt";
|
|
||||||
csv.save_as(path, fmt_text);
|
csv.save_as(path, fmt_text);
|
||||||
#ifdef DBG
|
#ifdef DBG
|
||||||
xvt_sys_goto_url(path, "open");
|
xvt_sys_goto_url(path, "open");
|
||||||
|
@ -1,14 +1,10 @@
|
|||||||
#include "at9600a.h"
|
#include "at9600a.h"
|
||||||
|
|
||||||
TOOLBAR "" 0 0 0 2
|
PAGE "Estrazione dati per Osservatorio Associativo" -1 -1 80 6
|
||||||
#include <stdbar.h>
|
|
||||||
ENDPAGE
|
|
||||||
|
|
||||||
PAGE "Estrazione dati per Osservatorio Associativo" 0 2 0 0
|
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 77 4
|
GROUPBOX DLG_NULL 77 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 0 "Scelta sezioni"
|
PROMPT 1 0 "@bScelta sezioni"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_SEZINI 2
|
STRING F_SEZINI 2
|
||||||
@ -123,8 +119,14 @@ END
|
|||||||
|
|
||||||
DATE F_DATA
|
DATE F_DATA
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 6 "Situazione al "
|
PROMPT 2 4 "Situazione al "
|
||||||
END
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
|
TOOLBAR "" 0 0 0 2
|
||||||
|
#include <stdbar.h>
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
|
||||||
ENDMASK
|
ENDMASK
|
||||||
|
@ -16,21 +16,19 @@
|
|||||||
|
|
||||||
#include "atlib.h"
|
#include "atlib.h"
|
||||||
#include "at9800a.h"
|
#include "at9800a.h"
|
||||||
|
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
// Maschera
|
// Maschera
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
|
|
||||||
class TImporta_ct_rn_mask : public TAutomask
|
class TImporta_ct_rn_mask : public TAutomask
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
||||||
public:
|
public:
|
||||||
TImporta_ct_rn_mask();
|
TImporta_ct_rn_mask() : TAutomask("at9800a") {}
|
||||||
};
|
};
|
||||||
|
|
||||||
TImporta_ct_rn_mask::TImporta_ct_rn_mask() : TAutomask("at9800a")
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool TImporta_ct_rn_mask::on_field_event(TOperable_field& f, TField_event e, long jolly)
|
bool TImporta_ct_rn_mask::on_field_event(TOperable_field& f, TField_event e, long jolly)
|
||||||
{
|
{
|
||||||
switch (f.dlg())
|
switch (f.dlg())
|
||||||
@ -49,9 +47,7 @@ bool TImporta_ct_rn_mask::on_field_event(TOperable_field& f, TField_event e, lon
|
|||||||
*row = name.name();
|
*row = name.name();
|
||||||
}
|
}
|
||||||
if (as.run() == K_ENTER)
|
if (as.run() == K_ENTER)
|
||||||
{
|
|
||||||
f.set(as.row(as.selected()));
|
f.set(as.row(as.selected()));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -130,7 +126,7 @@ public:
|
|||||||
|
|
||||||
TObject* TDecode_c2a::key2obj(const char* key)
|
TObject* TDecode_c2a::key2obj(const char* key)
|
||||||
{
|
{
|
||||||
TString* str = new TString;
|
TString* str = new TString4;
|
||||||
|
|
||||||
TModule_table tabmod("AT548C2A");
|
TModule_table tabmod("AT548C2A");
|
||||||
tabmod.put("CODTAB", key);
|
tabmod.put("CODTAB", key);
|
||||||
@ -602,7 +598,7 @@ void TImporta_ct_rn::aggiunge_contsan(const TImporta_ct_rn_recordset& recset, co
|
|||||||
contsan.zero();
|
contsan.zero();
|
||||||
contsan.put(CON_CODICE, sog_codice);
|
contsan.put(CON_CODICE, sog_codice);
|
||||||
contsan.put(CON_PROGCON, next_contsan);
|
contsan.put(CON_PROGCON, next_contsan);
|
||||||
const TDate& dataesame = recset.get_date("DATADON");
|
const TDate dataesame = recset.get_date("DATADON");
|
||||||
contsan.put(CON_DATACON, dataesame);
|
contsan.put(CON_DATACON, dataesame);
|
||||||
const TString& tipopre = decode_prelievo(recset.get("TIPOPRE").as_string());
|
const TString& tipopre = decode_prelievo(recset.get("TIPOPRE").as_string());
|
||||||
contsan.put(CON_TIPOCON, tipopre);
|
contsan.put(CON_TIPOCON, tipopre);
|
||||||
@ -625,7 +621,7 @@ void TImporta_ct_rn::aggiunge_donazione(const TImporta_ct_rn_recordset& recset,
|
|||||||
donaz.zero();
|
donaz.zero();
|
||||||
donaz.put(DON_CODICE, sog_codice);
|
donaz.put(DON_CODICE, sog_codice);
|
||||||
donaz.put(DON_PROGDON, next_donaz);
|
donaz.put(DON_PROGDON, next_donaz);
|
||||||
const TDate& dataesame = recset.get_date("DATADON");
|
const TDate dataesame = recset.get_date("DATADON");
|
||||||
donaz.put(DON_DATADON, dataesame);
|
donaz.put(DON_DATADON, dataesame);
|
||||||
const TString& tipopre = decode_prelievo(recset.get("TIPOPRE").as_string());
|
const TString& tipopre = decode_prelievo(recset.get("TIPOPRE").as_string());
|
||||||
donaz.put(DON_TIPODON, tipopre);
|
donaz.put(DON_TIPODON, tipopre);
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include <diction.h>
|
||||||
#include <tabutil.h>
|
#include <tabutil.h>
|
||||||
|
|
||||||
#include "atlib.h"
|
#include "atlib.h"
|
||||||
@ -494,15 +495,15 @@ bool configura_stampante(TPrinter& p, const char* configurazione, const char* ti
|
|||||||
p.set_printtype(winprinter);
|
p.set_printtype(winprinter);
|
||||||
if (p.set())
|
if (p.set())
|
||||||
{
|
{
|
||||||
TString80 messaggio = "Stampante configurata per stampa ";
|
TString messaggio = TR("Stampante configurata per stampa ");
|
||||||
messaggio << tipostampa;
|
messaggio << tipostampa;
|
||||||
message_box(messaggio);
|
message_box(messaggio);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TString80 messaggio = "Operazione di stampa ";
|
TString messaggio = TR("Operazione di stampa ");
|
||||||
messaggio << tipostampa << " annullata";
|
messaggio << tipostampa << TR(" annullata");
|
||||||
message_box(messaggio);
|
message_box(messaggio);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user