Patch level : 4.0 582

Files correlati     :  ve8.exe
Ricompilazione Demo : [ ]
Commento            :

Nella ricezione da galileo si devono esportare nel file di testo solo i record modificati


git-svn-id: svn://10.65.10.50/trunk@14709 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2007-01-03 14:35:31 +00:00
parent cdb9ded73c
commit 551f7840cb
2 changed files with 13 additions and 2 deletions

View File

@ -122,6 +122,7 @@ class TGalileo_clifo : public TGalileo_transfer
TDate _data; TDate _data;
TString _path; TString _path;
TAssoc_array _keys;
protected: protected:
int cancella_clifo(TLocalisamfile& clifo) const; int cancella_clifo(TLocalisamfile& clifo) const;
@ -143,6 +144,7 @@ class TGalileo_articoli : public TGalileo_transfer
TDate _data; TDate _data;
TString _path; TString _path;
TAssoc_array _keys;
protected: protected:
int cancella_articolo(TLocalisamfile& clifo) const; int cancella_articolo(TLocalisamfile& clifo) const;

View File

@ -78,7 +78,7 @@ bool TGalileo_clifo::dump()
TFilename path = _path; TFilename path = _path;
path << "clifo.txt"; path << "clifo.txt";
TSystemisamfile clifo(LF_CLIFO); TSystemisamfile clifo(LF_CLIFO);
return (clifo.dump(path, lista_dump) == NOERR); return (clifo.dump(path, lista_dump, &_keys) == NOERR);
} }
bool TGalileo_clifo::trasferisci() bool TGalileo_clifo::trasferisci()
@ -121,6 +121,9 @@ bool TGalileo_clifo::trasferisci()
rec_clifo.zero(); rec_clifo.zero();
rec_clifo.put(CLI_TIPOCF, tipocf); rec_clifo.put(CLI_TIPOCF, tipocf);
rec_clifo.put(CLI_CODCF, codcf); rec_clifo.put(CLI_CODCF, codcf);
const TString16 key(rec_clifo.build_key(1));
_keys.add(key, key);
good = clifo.read() == NOERR; good = clifo.read() == NOERR;
if (!good) if (!good)
needs_creation = true; needs_creation = true;
@ -234,7 +237,7 @@ bool TGalileo_articoli::dump()
{ {
path = _path; path = _path;
path << "anamag.txt"; path << "anamag.txt";
err = anamag.dump(path, lista_dump); err = anamag.dump(path, lista_dump, &_keys);
} }
return (err == NOERR); return (err == NOERR);
} }
@ -270,7 +273,13 @@ bool TGalileo_articoli::trasferisci()
const TString& codart = get_str("RICOD"); const TString& codart = get_str("RICOD");
rec_anamag.zero(); rec_anamag.zero();
rec_anamag.put(ANAMAG_CODART, codart); rec_anamag.put(ANAMAG_CODART, codart);
const TString16 key(rec_anamag.build_key(1));
_keys.add(key, key);
bool good = anamag.read() == NOERR; bool good = anamag.read() == NOERR;
if (!good) if (!good)
{ {
rec_anamag.zero(); rec_anamag.zero();