Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/branches/R_10_00@22207 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7c26664d17
commit
ca80780a7b
174
ha/ha1200.cpp
174
ha/ha1200.cpp
@ -74,19 +74,19 @@ class TFile2Txt : public TSkeleton_application
|
||||
protected:
|
||||
void elabora(const TMask& mask);
|
||||
|
||||
void genera_agenti_txt();
|
||||
void genera_clienti_txt(const long da_codcli);
|
||||
void genera_sospesi_txt(const long da_codcli);
|
||||
void genera_righelistini_txt();
|
||||
void genera_contratti_txt();
|
||||
void genera_promozioni_txt();
|
||||
void genera_prodotti_txt();
|
||||
void genera_barcode_txt();
|
||||
void genera_decodart_txt();
|
||||
void genera_attrezzature_txt();
|
||||
void genera_tabpag_txt();
|
||||
void genera_carico_txt(const TMask& mask);
|
||||
void genera_ripristino_txt(const TMask& mask);
|
||||
bool genera_agenti_txt();
|
||||
bool genera_clienti_txt(const long da_codcli);
|
||||
bool genera_sospesi_txt(const long da_codcli);
|
||||
bool genera_righelistini_txt();
|
||||
bool genera_contratti_txt();
|
||||
bool genera_promozioni_txt();
|
||||
bool genera_prodotti_txt();
|
||||
bool genera_barcode_txt();
|
||||
bool genera_decodart_txt();
|
||||
bool genera_attrezzature_txt();
|
||||
bool genera_tabpag_txt();
|
||||
bool genera_carico_txt(const TMask& mask);
|
||||
bool genera_ripristino_txt(const TMask& mask);
|
||||
|
||||
void fill_anagrafica_cliente(const TISAM_recordset& archivio_clienti,
|
||||
TEsporta_clienti_recordset& clienti, const bool is_fatt = false);
|
||||
@ -108,7 +108,7 @@ TFilename TFile2Txt::genera_path(const TString& prefisso)
|
||||
}
|
||||
|
||||
|
||||
void TFile2Txt::genera_agenti_txt()
|
||||
bool TFile2Txt::genera_agenti_txt()
|
||||
{
|
||||
//AS400 recordset da riempire (da lui nascerà il .txt)
|
||||
TEsporta_agenti_recordset agenti;
|
||||
@ -135,7 +135,10 @@ void TFile2Txt::genera_agenti_txt()
|
||||
//prepara il nome corretto del file .txt e lo genera
|
||||
TFilename output_path = genera_path("agenti");
|
||||
//..e alla fine della fiera salva il file di testo nell directory selezionata
|
||||
agenti.save_as(output_path, fmt_text);
|
||||
if (!agenti.save_as(output_path, fmt_text))
|
||||
return cantwrite_box(output_path);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -177,7 +180,7 @@ void TFile2Txt::fill_anagrafica_cliente(const TISAM_recordset& archivio_clienti,
|
||||
}
|
||||
|
||||
//clienti: i commenti del metodo sono nella genera_cliente_txt() della ha1100 (che è la mamma di questo)
|
||||
void TFile2Txt::genera_clienti_txt(const long da_codcli)
|
||||
bool TFile2Txt::genera_clienti_txt(const long da_codcli)
|
||||
{
|
||||
//controlla se c'è un codice selezionato da cui partire
|
||||
|
||||
@ -301,11 +304,14 @@ void TFile2Txt::genera_clienti_txt(const long da_codcli)
|
||||
} //for (bool ok = archivio_clienti.move_first()...
|
||||
|
||||
TFilename output_path = genera_path("clienti");
|
||||
clienti.save_as(output_path, fmt_text);
|
||||
if (!clienti.save_as(output_path, fmt_text))
|
||||
return cantwrite_box(output_path);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void TFile2Txt::genera_sospesi_txt(const long da_codcli)
|
||||
bool TFile2Txt::genera_sospesi_txt(const long da_codcli)
|
||||
{
|
||||
TEsporta_sospesi_recordset sospesi;
|
||||
|
||||
@ -368,11 +374,14 @@ void TFile2Txt::genera_sospesi_txt(const long da_codcli)
|
||||
}
|
||||
|
||||
TFilename output_path = genera_path("sospesi");
|
||||
sospesi.save_as(output_path, fmt_text);
|
||||
if (!sospesi.save_as(output_path, fmt_text))
|
||||
return cantwrite_box(output_path);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//listini: i commenti del metodo sono nella genera_listino_txt() della ha1100
|
||||
void TFile2Txt::genera_righelistini_txt()
|
||||
bool TFile2Txt::genera_righelistini_txt()
|
||||
{
|
||||
TEsporta_listini_recordset righe_listini;
|
||||
|
||||
@ -422,11 +431,14 @@ void TFile2Txt::genera_righelistini_txt()
|
||||
}
|
||||
|
||||
TFilename output_path = genera_path("listini");
|
||||
righe_listini.save_as(output_path, fmt_text);
|
||||
if (!righe_listini.save_as(output_path, fmt_text))
|
||||
return cantwrite_box(output_path);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void TFile2Txt::genera_contratti_txt()
|
||||
bool TFile2Txt::genera_contratti_txt()
|
||||
{
|
||||
TEsporta_contratti_recordset righe_contratti;
|
||||
|
||||
@ -464,10 +476,13 @@ void TFile2Txt::genera_contratti_txt()
|
||||
}
|
||||
|
||||
TFilename output_path = genera_path("particolari");
|
||||
righe_contratti.save_as(output_path, fmt_text);
|
||||
if (!righe_contratti.save_as(output_path, fmt_text))
|
||||
return cantwrite_box(output_path);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void TFile2Txt::genera_promozioni_txt()
|
||||
bool TFile2Txt::genera_promozioni_txt()
|
||||
{
|
||||
TEsporta_contratti_recordset righe_offerte;
|
||||
|
||||
@ -490,11 +505,14 @@ void TFile2Txt::genera_promozioni_txt()
|
||||
}
|
||||
|
||||
TFilename output_path = genera_path("promo");
|
||||
righe_offerte.save_as(output_path, fmt_text);
|
||||
if (!righe_offerte.save_as(output_path, fmt_text))
|
||||
return cantwrite_box(output_path);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//prodotti: i commenti del metodo sono nella genera_prodotto_txt() della ha1100
|
||||
void TFile2Txt::genera_prodotti_txt()
|
||||
bool TFile2Txt::genera_prodotti_txt()
|
||||
{
|
||||
TEsporta_prodotti_recordset prodotti;
|
||||
|
||||
@ -531,10 +549,13 @@ void TFile2Txt::genera_prodotti_txt()
|
||||
}
|
||||
|
||||
TFilename output_path = genera_path("prodotti");
|
||||
prodotti.save_as(output_path, fmt_text);
|
||||
if (!prodotti.save_as(output_path, fmt_text))
|
||||
return cantwrite_box(output_path);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void TFile2Txt::genera_barcode_txt()
|
||||
bool TFile2Txt::genera_barcode_txt()
|
||||
{
|
||||
TEsporta_barcode_recordset barcode;
|
||||
|
||||
@ -562,11 +583,14 @@ void TFile2Txt::genera_barcode_txt()
|
||||
}
|
||||
|
||||
TFilename output_path = genera_path("barcode");
|
||||
barcode.save_as(output_path, fmt_text);
|
||||
if (!barcode.save_as(output_path, fmt_text))
|
||||
return cantwrite_box(output_path);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void TFile2Txt::genera_decodart_txt()
|
||||
bool TFile2Txt::genera_decodart_txt()
|
||||
{
|
||||
TEsporta_decodart_recordset decodart;
|
||||
|
||||
@ -591,11 +615,14 @@ void TFile2Txt::genera_decodart_txt()
|
||||
}
|
||||
|
||||
TFilename output_path = genera_path("decodart");
|
||||
decodart.save_as(output_path, fmt_text);
|
||||
if (!decodart.save_as(output_path, fmt_text))
|
||||
return cantwrite_box(output_path);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void TFile2Txt::genera_attrezzature_txt()
|
||||
bool TFile2Txt::genera_attrezzature_txt()
|
||||
{
|
||||
//esporta le attrezzature (tabella &HAATT)
|
||||
TEsporta_attrezzature_recordset attrezzature;
|
||||
@ -632,7 +659,8 @@ void TFile2Txt::genera_attrezzature_txt()
|
||||
}
|
||||
|
||||
TFilename output_path_att = genera_path("attrezzature");
|
||||
attrezzature.save_as(output_path_att, fmt_text);
|
||||
if (!attrezzature.save_as(output_path_att, fmt_text))
|
||||
return cantwrite_box(output_path_att);
|
||||
|
||||
|
||||
//esporta lo storico attrezzature (tabella &HAHIS)
|
||||
@ -678,11 +706,14 @@ void TFile2Txt::genera_attrezzature_txt()
|
||||
}
|
||||
|
||||
TFilename output_path_sto = genera_path("storico");
|
||||
storico.save_as(output_path_sto, fmt_text);
|
||||
if (!storico.save_as(output_path_sto, fmt_text))
|
||||
return cantwrite_box(output_path_sto);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void TFile2Txt::genera_tabpag_txt()
|
||||
bool TFile2Txt::genera_tabpag_txt()
|
||||
{
|
||||
TEsporta_pagamenti_recordset tabpag;
|
||||
|
||||
@ -710,10 +741,13 @@ void TFile2Txt::genera_tabpag_txt()
|
||||
}
|
||||
|
||||
TFilename output_path = genera_path("tabpag");
|
||||
tabpag.save_as(output_path, fmt_text);
|
||||
if (!tabpag.save_as(output_path, fmt_text))
|
||||
return cantwrite_box(output_path);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void TFile2Txt::genera_carico_txt(const TMask& mask)
|
||||
bool TFile2Txt::genera_carico_txt(const TMask& mask)
|
||||
{
|
||||
TEsporta_carico_recordset carico;
|
||||
|
||||
@ -765,11 +799,14 @@ void TFile2Txt::genera_carico_txt(const TMask& mask)
|
||||
}
|
||||
|
||||
TFilename output_path = genera_path("carico");
|
||||
carico.save_as(output_path, fmt_text);
|
||||
if (!carico.save_as(output_path, fmt_text))
|
||||
return cantwrite_box(output_path);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void TFile2Txt::genera_ripristino_txt(const TMask& mask)
|
||||
bool TFile2Txt::genera_ripristino_txt(const TMask& mask)
|
||||
{
|
||||
TEsporta_carico_recordset ripristino;
|
||||
|
||||
@ -812,56 +849,61 @@ void TFile2Txt::genera_ripristino_txt(const TMask& mask)
|
||||
}
|
||||
|
||||
TFilename output_path = genera_path("carico");
|
||||
ripristino.save_as(output_path, fmt_text);
|
||||
if (!ripristino.save_as(output_path, fmt_text))
|
||||
return cantwrite_box(output_path);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//metodo di alto livello per la gestione delle chiamate
|
||||
void TFile2Txt::elabora(const TMask& mask)
|
||||
{
|
||||
if (mask.get_bool(F_AGENTI))
|
||||
genera_agenti_txt();
|
||||
bool go_on = true;
|
||||
|
||||
if (mask.get_bool(F_CLIENTI))
|
||||
if (mask.get_bool(F_AGENTI))
|
||||
go_on = genera_agenti_txt();
|
||||
|
||||
if (mask.get_bool(F_CLIENTI) && go_on)
|
||||
{
|
||||
const long da_codcli = mask.get_long(F_DA_CODCLI);
|
||||
genera_clienti_txt(da_codcli);
|
||||
go_on = genera_clienti_txt(da_codcli);
|
||||
}
|
||||
|
||||
if (mask.get_bool(F_SOSPESI))
|
||||
if (mask.get_bool(F_SOSPESI) && go_on)
|
||||
{
|
||||
const long da_codcli = mask.get_long(F_DA_SOSP_CODCLI);
|
||||
genera_sospesi_txt(da_codcli);
|
||||
go_on = genera_sospesi_txt(da_codcli);
|
||||
}
|
||||
|
||||
if (mask.get_bool(F_LISTINI))
|
||||
genera_righelistini_txt();
|
||||
if (mask.get_bool(F_LISTINI) && go_on)
|
||||
go_on = genera_righelistini_txt();
|
||||
|
||||
if (mask.get_bool(F_CONTRATTI))
|
||||
genera_contratti_txt();
|
||||
if (mask.get_bool(F_CONTRATTI) && go_on)
|
||||
go_on = genera_contratti_txt();
|
||||
|
||||
if (mask.get_bool(F_PROMOZIONI))
|
||||
genera_promozioni_txt();
|
||||
if (mask.get_bool(F_PROMOZIONI) && go_on)
|
||||
go_on = genera_promozioni_txt();
|
||||
|
||||
if (mask.get_bool(F_PRODOTTI))
|
||||
genera_prodotti_txt();
|
||||
if (mask.get_bool(F_PRODOTTI) && go_on)
|
||||
go_on = genera_prodotti_txt();
|
||||
|
||||
if (mask.get_bool(F_BARCODE))
|
||||
genera_barcode_txt();
|
||||
if (mask.get_bool(F_BARCODE) && go_on)
|
||||
go_on = genera_barcode_txt();
|
||||
|
||||
if (mask.get_bool(F_DECODART))
|
||||
genera_decodart_txt();
|
||||
if (mask.get_bool(F_DECODART) && go_on)
|
||||
go_on = genera_decodart_txt();
|
||||
|
||||
if (mask.get_bool(F_ATTREZZA))
|
||||
genera_attrezzature_txt();
|
||||
if (mask.get_bool(F_ATTREZZA) && go_on)
|
||||
go_on = genera_attrezzature_txt();
|
||||
|
||||
if (mask.get_bool(F_TABPAG))
|
||||
genera_tabpag_txt();
|
||||
if (mask.get_bool(F_TABPAG) && go_on)
|
||||
go_on = genera_tabpag_txt();
|
||||
|
||||
if (mask.get_bool(F_CARICO))
|
||||
genera_carico_txt(mask);
|
||||
if (mask.get_bool(F_CARICO) && go_on)
|
||||
go_on = genera_carico_txt(mask);
|
||||
|
||||
if (mask.get_bool(F_INIMAG))
|
||||
genera_ripristino_txt(mask);
|
||||
if (mask.get_bool(F_INIMAG) && go_on)
|
||||
go_on = genera_ripristino_txt(mask);
|
||||
}
|
||||
|
||||
|
||||
|
@ -30,20 +30,12 @@ MESSAGE ISAMREAD,16,TIPOCF='C'!CODCF=I0!CODIND=I1,103=RAGSOC!104=INDIR!105=CAP!1
|
||||
<source>I0</source>
|
||||
</field>
|
||||
<field x="8" y="0.75" type="Stringa" width="42" id="103" pattern="1">
|
||||
<font face="Arial Narrow" bold="1" size="8" />
|
||||
<prescript description="H2.103 PRESCRIPT">MESSAGE ISAMREAD,20,TIPOCF='C'!CODCF=#101,RAGSOC</prescript>
|
||||
</field>
|
||||
<field x="51" y="0.75" type="Stringa" width="20" id="104" pattern="1">
|
||||
<font face="Arial Narrow" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="72" y="0.75" type="Stringa" width="4" id="105" pattern="1">
|
||||
<font face="Arial Narrow" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="77" y="0.75" type="Stringa" hidden="1" width="4" id="106" pattern="1">
|
||||
<font face="Arial Narrow" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="51" y="0.75" type="Stringa" width="20" id="104" pattern="1" />
|
||||
<field x="72" y="0.75" type="Stringa" width="4" id="105" pattern="1" />
|
||||
<field x="77" y="0.75" type="Stringa" hidden="1" width="4" id="106" pattern="1" />
|
||||
<field x="77" y="0.75" type="Stringa" width="30" id="107" pattern="1">
|
||||
<font face="Arial Narrow" bold="1" size="8" />
|
||||
<prescript description="H2.107 PRESCRIPT">MESSAGE ISAMREAD,13,COM=#106,DENCOM</prescript>
|
||||
</field>
|
||||
</section>
|
||||
@ -72,5 +64,6 @@ MESSAGE ISAMREAD,16,TIPOCF='C'!CODCF=I0!CODIND=I1,103=RAGSOC!104=INDIR!105=CAP!1
|
||||
<section type="Foot" level="1" pattern="1" />
|
||||
<section type="Foot" level="2" pattern="1" />
|
||||
<sql>USE HAATT
|
||||
SELECT STR(BETWEEN(I0,#CODCF,#CODCF))</sql>
|
||||
SELECT STR(BETWEEN(I0,#CODCF,#CODCF))
|
||||
BY I0</sql>
|
||||
</report>
|
Loading…
x
Reference in New Issue
Block a user