Continua la spietata caccia agli #include inutili
git-svn-id: svn://10.65.10.50/trunk@2199 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
772371210c
commit
2099aa791d
@ -6,7 +6,6 @@
|
||||
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include <nditte.h>
|
||||
@ -209,11 +208,7 @@ void BA3200_application::set_headers()
|
||||
//set_header (last_riga, (const char *)sep);
|
||||
sep.fill(' ');
|
||||
set_header (last_riga, (const char *)sep);
|
||||
#ifdef DBG
|
||||
set_background(format("i{modulo.bmp,20,20,60,38}W2l{1,3,%d,3}l{1,%d,%d,%d}", LungRiga, last_riga, LungRiga, last_riga));
|
||||
#else
|
||||
set_background(format("W2l{1,3,%d,3}l{1,%d,%d,%d}", LungRiga, last_riga, LungRiga, last_riga));
|
||||
#endif
|
||||
}
|
||||
|
||||
void BA3200_application::set_rows()
|
||||
|
@ -1,9 +1,7 @@
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <progind.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "ba3.h"
|
||||
#include "ba3300.h"
|
||||
|
@ -1,13 +1,8 @@
|
||||
// ba3500.cpp - Tabella libro unico
|
||||
|
||||
#include <applicat.h>
|
||||
#include <mask.h>
|
||||
#include <msksheet.h>
|
||||
#include <relapp.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
#include <config.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "ba3500.h"
|
||||
@ -227,24 +222,22 @@ void BA3500_application::init_query_mode(TMask& m)
|
||||
|
||||
int BA3500_application::rewrite(const TMask& m)
|
||||
{
|
||||
long items;
|
||||
// TTable *tab_inl = (TTable*)_rel->lfile(TAB_INL);
|
||||
TTable& tab_inl = (TTable&)_rel->lfile(-ALIAS);
|
||||
|
||||
int anno = m.get_int(F_ANNO);
|
||||
TString cod_lib = m.get(F_CODLIB);
|
||||
const int anno = m.get_int(F_ANNO);
|
||||
const TString cod_lib(m.get(F_CODLIB));
|
||||
|
||||
m.autosave(_rel);
|
||||
|
||||
TSheet_field& cs = (TSheet_field&)m.field(F_SHEET_LBU);
|
||||
|
||||
items = cs.items();
|
||||
|
||||
const int items = cs.items();
|
||||
for (int i = 0; i < items; i++)
|
||||
{
|
||||
TToken_string &riga = cs.row(i);
|
||||
TString codtab (format("%4d%-3s%6d",anno,(const char *)cod_lib,i));
|
||||
long year = atol(riga.get(0));
|
||||
TString codtab; codtab.format("%4d%-3s%6d",anno,(const char *)cod_lib,i);
|
||||
const int year = riga.get_int(0);
|
||||
if (year != 0)
|
||||
{
|
||||
tab_inl.put ("CODTAB", codtab);
|
||||
@ -277,8 +270,8 @@ int BA3500_application::write(const TMask& m)
|
||||
// TTable *tab_inl = (TTable*)_rel->lfile(TAB_INL);
|
||||
TTable& tab_inl = (TTable&)_rel->lfile(-ALIAS);
|
||||
|
||||
int anno = m.get_int(F_ANNO);
|
||||
TString cod_lib = m.get(F_CODLIB);
|
||||
const int anno = m.get_int(F_ANNO);
|
||||
const TString cod_lib(m.get(F_CODLIB));
|
||||
|
||||
m.autosave(_rel);
|
||||
|
||||
@ -291,8 +284,8 @@ int BA3500_application::write(const TMask& m)
|
||||
for (int i = 0; i < items; i++)
|
||||
{
|
||||
TToken_string &riga = cs.row(i);
|
||||
TString codtab (format("%4d%-3s%6d",anno,(const char *)cod_lib,i));
|
||||
long year = atol(riga.get(0));
|
||||
TString16 codtab; codtab.format("%4d%-3s%6d",anno,(const char *)cod_lib,i);
|
||||
const int year = riga.get_int(0);
|
||||
if (year != 0)
|
||||
{
|
||||
tab_inl.put ("CODTAB", codtab);
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <relation.h>
|
||||
//#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
//#include <utility.h>
|
||||
#include <sort.h>
|
||||
#include <progind.h>
|
||||
|
||||
@ -79,7 +79,7 @@ public:
|
||||
void crea_intestazione_prova();
|
||||
void crea_intestazione_bollato();
|
||||
const char* ragsoc_ditta(long);
|
||||
const char* descrizione_codreg(TString&);
|
||||
const char* descrizione_codreg(const TString&);
|
||||
void setta_righe_prova();
|
||||
void setta_righe_bollato();
|
||||
void dati_libro_unico();
|
||||
@ -122,8 +122,7 @@ void BA3600_application::crea_sort()
|
||||
// TString dep (format ("%4d%-3s", _anno, (const char*) _cod_lib));
|
||||
// sprintf(__tmp, "%4d", _anno);
|
||||
// strcat (__tmp, _cod_lib);
|
||||
dep = format ("%4d", _anno);
|
||||
dep << format ("%-3s", (const char*) _cod_lib);
|
||||
dep.format ("%4d%-3s", _anno, (const char*)_cod_lib);
|
||||
_tab_lbu->put("CODTAB", (const char*) dep);
|
||||
|
||||
if (_tab_lbu->read(_isequal) == NOERR)
|
||||
@ -208,11 +207,9 @@ void BA3600_application::crea_sort()
|
||||
void BA3600_application::dati_libro_unico()
|
||||
{
|
||||
TTable lbu ("%LBU");
|
||||
TString dep;
|
||||
|
||||
lbu.zero();
|
||||
dep = format ("%4d", _anno);
|
||||
dep << format ("%-3s", (const char*) _cod_lib);
|
||||
TString16 dep;
|
||||
dep.format("%4d%-3s", _anno, (const char*) _cod_lib);
|
||||
|
||||
lbu.put("CODTAB", (const char*) dep);
|
||||
|
||||
if (lbu.read(_isequal) == NOERR)
|
||||
@ -228,11 +225,8 @@ void BA3600_application::dati_libro_unico()
|
||||
void BA3600_application::descrizione()
|
||||
{
|
||||
TTable lbu ("%LBU");
|
||||
TString dep;
|
||||
|
||||
lbu.zero();
|
||||
dep = format ("%4d", _anno);
|
||||
dep << format ("%-3s", (const char*) _cod_lib_su);
|
||||
TString16 dep;
|
||||
dep.format ("%4d%-3s", _anno, (const char*) _cod_lib_su);
|
||||
lbu.put("CODTAB", (const char*) dep);
|
||||
|
||||
if (lbu.read(_isequal) == NOERR)
|
||||
@ -556,18 +550,19 @@ void BA3600_application::dati_anagrafici_ditta(TString& ind,TString& civ,TString
|
||||
}
|
||||
}
|
||||
|
||||
const char* BA3600_application::descrizione_codreg(TString& codreg)
|
||||
const char* BA3600_application::descrizione_codreg(const TString& codreg)
|
||||
{
|
||||
TString16 dep;
|
||||
dep.format("%4d%-3s", _anno, (const char*)codreg);
|
||||
|
||||
_tab_reg->zero();
|
||||
dep = format("%4d", _anno);
|
||||
dep << format("%-3s", (const char*) codreg);
|
||||
_tab_reg->put("CODTAB", dep);
|
||||
_tab_reg->read();
|
||||
|
||||
if (_tab_reg->bad())
|
||||
_tab_reg->zero();
|
||||
tmp = _tab_reg->get("S0");
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
#include <relapp.h>
|
||||
#include <tabutil.h>
|
||||
#include <urldefid.h>
|
||||
#include <utility.h>
|
||||
#include <msksheet.h>
|
||||
|
||||
#include "ba3700.h"
|
||||
@ -128,8 +126,8 @@ int BA3700_application::read(TMask& m)
|
||||
(*arr) = _cs->rows_array();
|
||||
shuttle._rws = arr;
|
||||
|
||||
shuttle._msk->field(F_INT_RATE).set(format("%d",_interv_rate));
|
||||
shuttle._msk->field(F_NUM_RATE).set(format("%d",_pag->n_rate()));
|
||||
shuttle._msk->set(F_INT_RATE,_interv_rate);
|
||||
shuttle._msk->set(F_NUM_RATE,_pag->n_rate());
|
||||
shuttle._msk->set(F_RATE_DIFF, _pag->rate_differenziate() ? "1" : "2", TRUE);
|
||||
|
||||
return NOERR;
|
||||
@ -180,7 +178,12 @@ bool BA3700_application::intervallo_rate(TMask_field& f, KEY k)
|
||||
(*(s->_rws)) = shf->rows_array();
|
||||
msk->field(F_MESECOMM).set(pag->mese_commerciale() ? "X" : "");
|
||||
}
|
||||
else f.set(format("%d",pag->intervallo_rate()));
|
||||
else
|
||||
{
|
||||
char r[8];
|
||||
sprintf(r, "%d", pag->intervallo_rate());
|
||||
f.set(r);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -258,7 +261,7 @@ bool BA3700_application::numero_rate(TMask_field& f, KEY k)
|
||||
(*rws) = shf->rows_array();
|
||||
}
|
||||
|
||||
msk->field(F_NUM_RATE).set(format("%d",pag->n_rate()));
|
||||
msk->set(F_NUM_RATE,pag->n_rate());
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -285,7 +288,7 @@ bool BA3700_application::mese_commerciale(TMask_field& f, KEY k)
|
||||
{
|
||||
pag->set_sheet(*shf);
|
||||
(*rws) = shf->rows_array();
|
||||
msk->field(F_INT_RATE).set(format("%d",ir));
|
||||
msk->set(F_INT_RATE,ir);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@ -456,7 +459,7 @@ bool BA3700_application::sheet_action(TSheet_field&, int r, KEY k)
|
||||
(*rws) = shf->rows_array();
|
||||
}
|
||||
|
||||
msk->field(F_NUM_RATE).set(format("%d", pag->n_rate()));
|
||||
msk->set(F_NUM_RATE, pag->n_rate());
|
||||
}
|
||||
|
||||
return doit;
|
||||
|
@ -1,11 +1,8 @@
|
||||
#include <mask.h>
|
||||
#include <printapp.h>
|
||||
#include <relation.h>
|
||||
#include <tabutil.h>
|
||||
#include <utility.h>
|
||||
#include <sort.h>
|
||||
#include <progind.h>
|
||||
#include <config.h>
|
||||
|
||||
#include <comuni.h>
|
||||
#include <nditte.h>
|
||||
@ -1713,10 +1710,10 @@ void BA3800_application::intestazione_studio()
|
||||
const char* BA3800_application::descrizione_lettera(char sezione, char lettera)
|
||||
{
|
||||
TTable tabivd(TAB_IVD);
|
||||
TString dep, dep2;
|
||||
TString16 dep, dep2;
|
||||
|
||||
tabivd.zero();
|
||||
dep = format("%1c%1c", sezione, lettera);
|
||||
dep.format("%1c%1c", sezione, lettera);
|
||||
tabivd.put("CODTAB", dep);
|
||||
tabivd.read();
|
||||
dep2 = tabivd.get("CODTAB");
|
||||
@ -1730,13 +1727,13 @@ const char* BA3800_application::descrizione_lettera(char sezione, char lettera)
|
||||
const char* BA3800_application::descrizione_numeroromano(char sezione, char lettera, int numr)
|
||||
{
|
||||
TTable tabivd(TAB_IVD);
|
||||
TString dep, dep2;
|
||||
TString16 dep, dep2;
|
||||
|
||||
tabivd.zero();
|
||||
if (numr != 0)
|
||||
dep = format("%1c%1c%04d", sezione, lettera, numr);
|
||||
dep.format("%1c%1c%04d", sezione, lettera, numr);
|
||||
else
|
||||
dep = format("%c%c ", sezione, lettera);
|
||||
dep.format("%c%c ", sezione, lettera);
|
||||
|
||||
tabivd.put("CODTAB", dep);
|
||||
tabivd.read();
|
||||
@ -1751,13 +1748,13 @@ const char* BA3800_application::descrizione_numeroromano(char sezione, char lett
|
||||
const char* BA3800_application::descrizione_numero(char sezione, char lettera, int numr, int numero)
|
||||
{
|
||||
TTable tabivd(TAB_IVD);
|
||||
TString dep,dep2;
|
||||
TString16 dep,dep2;
|
||||
|
||||
tabivd.zero();
|
||||
if (numr != 0)
|
||||
dep = format("%1c%1c%04d%02d",sezione, lettera, numr, numero);
|
||||
dep.format("%1c%1c%04d%02d",sezione, lettera, numr, numero);
|
||||
else
|
||||
dep = format("%c%c %02d",sezione,lettera,numero);
|
||||
dep.format("%c%c %02d",sezione,lettera,numero);
|
||||
tabivd.put("CODTAB", dep);
|
||||
tabivd.read();
|
||||
dep2 = tabivd.get("CODTAB");
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include <relapp.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "batbinl.h"
|
||||
|
||||
@ -8,6 +7,8 @@ class TIndici_app : public TRelation_application
|
||||
TRelation* _indici;
|
||||
TMask* _maschera;
|
||||
|
||||
TString80 _tmp;
|
||||
|
||||
protected:
|
||||
virtual bool user_create();
|
||||
virtual bool user_destroy();
|
||||
@ -71,8 +72,13 @@ const char* TIndici_app::get_next_key()
|
||||
if (index.get_int("ANNO") == anno && index.get("CODLIB") == libro)
|
||||
cod = index.get_long("NUMREG") + 1;
|
||||
}
|
||||
return (cod > 0) ? format("%d|%d|%d|%s|%d|%ld",
|
||||
F_ANNO, anno, F_CODLIB, (const char*)libro, F_INDEX, cod) : "";
|
||||
|
||||
if (cod > 0)
|
||||
_tmp.format("%d|%d|%d|%s|%d|%ld", F_ANNO, anno, F_CODLIB, (const char*)libro, F_INDEX, cod);
|
||||
else
|
||||
_tmp.cut(0);
|
||||
|
||||
return _tmp;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user