Patch level : 12.0 584

Files correlati     : cg
Commento            : Implementata normativa sulla privacy (GDPR UE 2016/679)

git-svn-id: svn://10.65.10.50/branches/R_10_00@24505 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
mtollari 2018-05-24 14:22:33 +00:00
parent 65848c821a
commit 81f839eafa
10 changed files with 4986 additions and 4885 deletions

View File

@ -139,6 +139,7 @@
<MskCompiler Include="..\src\ba\batblng.uml" />
<MskCompiler Include="..\src\ba\batbnoc.uml" />
<MskCompiler Include="..\src\ba\batbois.uml" />
<MskCompiler Include="..\src\ba\batbpri.uml" />
<MskCompiler Include="..\src\ba\batbrgi.uml" />
<MskCompiler Include="..\src\ba\batbsce.uml" />
<MskCompiler Include="..\src\ba\batbsta.uml" />

2
src/ba/batbpri.h Normal file
View File

@ -0,0 +1,2 @@
#define F_CODICE 101
#define F_DESCR 102

41
src/ba/batbpri.uml Normal file
View File

@ -0,0 +1,41 @@
#include "batbpri.h"
TOOLBAR "topbar" 0 0 0 2
#include <relapbar.h>
ENDPAGE
PAGE "Risposte informativa privacy" -1 -1 78 19
STRING F_CODICE 5
BEGIN
PROMPT 2 3 "Codice "
FLAGS "U"
USE %PRI
INPUT CODTAB F_CODICE
DISPLAY "Codice" CODTAB
DISPLAY "Descrizione@50" S0
OUTPUT F_CODICE CODTAB
OUTPUT F_DESCR S0
CHECKTYPE REQUIRED
FIELD CODTAB
KEY 1
END
STRING F_DESCR 50
BEGIN
PROMPT 2 5 "Descrizione "
USE %PRI KEY 2
INPUT S0 F_DESCR
DISPLAY "Descrizione@50" S0
DISPLAY "Codice@8" CODTAB
COPY OUTPUT F_CODICE
OUTPUT F_DESCR S0
CHECKTYPE REQUIRED
FIELD S0
KEY 2
END
ENDPAGE
ENDMASK

File diff suppressed because it is too large Load Diff

View File

@ -1,228 +1,233 @@
#ifndef __CG0200_H
#define __CG0200_H
#define TCLI "C"
#define TFOR "F"
#define F_TIPOCF 101
#define F_CODCF 102
#define F_RAGSOC 103
#define F_INDCF 104
#define F_CIVCF 105
#define F_STATOCF 106
#define F_COMCF 107
#define F_CAPCF 108
#define F_COFI 109
#define F_STATOPAIV 110
#define F_STATOPAIVSTR 128
#define F_PAIV 111
#define F_TIPOPERS 112
#define F_ALLEG 113
#define F_GRUPPO 114
#define F_CONTO 115
#define F_DESCONTO 137
#define F_GRUPPORIC 116
#define F_CONTORIC 117
#define F_SOTTOCRIC 118
#define F_DESCRIC 138
#define F_TIPOAPER 119
#define F_CODANAGPER 120
#define F_PTEL 121
#define F_TEL 122
#define F_PFAX 123
#define F_FAX 124
#define F_PTELEX 125
#define F_TELEX 126
#define F_DATANASC 127
#define F_COMNASC 129
#define F_DENCOMNASC 135
#define F_CODSTAT 130
#define F_CODPAG 131
#define F_DESPAG 331
#define F_RAGSOC1 132
#define F_CODVAL 136
#define F_DESVAL 336
#define F_FIDO 139
#define F_LOCALITACF 144
#define F_CODAG 145
#define F_SOSPESO 146
#define F_CODALLEG 148
#define LST_TIPO_RFSO 500
#define F_COD_RFSO_G 501
#define F_COD_RFSO_F 502
#define F_OCCASIONALE 149
#define F_DENCOMCF 150
#define F_PROVCF 152
#define F_RICALT 151
#define F_PTEL2 153
#define F_TEL2 154
#define F_PTEL3 155
#define F_TEL3 156
#define F_CODLIN 157
#define F_DESLIN 158
#define F_CODINDDOC 160
#define F_CODNOTE 161
#define F_CODLEG 162
#define F_CODCATC 163
#define F_CODZONA 164
#define F_PROVV 165
#define F_LIQPAG 166
#define F_CODPRCF 167
#define F_CODINDSP 168
#define F_CODPORTO 169
#define F_RAGGDOC 170
#define F_NCOPIE 171
#define F_CODFASS 172
#define F_ASSFIS 173
#define F_FATTSOSP 174
#define F_VSNRPROT 175
#define F_VSDATAREG 176
#define F_NSNRPROT 177
#define F_NSDATAREG 178
#define F_ADDBNS1500 179
#define F_CATFIN 180
#define F_CODABIPR 181
#define F_CODBANPR 182
#define F_CODINDEFF 183
#define F_EMEFFRICH 184
#define F_CODNOTESP1 185
#define F_CODNOTESP2 186
#define F_CODSPMEZZO 187
#define F_IMPMINEFF 188
#define F_NONACCEFF 189
#define F_NONSCADEFF 190
#define F_ADDBOLLI 191
#define F_PERCSPINC 193
#define F_IVARID 194
#define F_GESTCONTR 195
#define F_CATVEN 196
#define F_CODLIST 197
#define F_CODSCC 198
#define F_SCONTO 199
#define F_CODMAG 200
#define F_CODSP1 201
#define F_CODSP2 202
#define F_CODSP3 203
#define F_CODSP4 204
#define F_PROFSOLL 205
#define F_MAXSOLL 206
#define F_DATAESC 207
#define F_DATASOLL 208
#define F_NUMESC 209
#define F_TITOLO 210
#define F_RAGGOR 211
#define F_MINORD 212
#define F_MAXORD 213
#define F_PREVORD 214
#define F_TIPOEVORD 215
#define F_SHEET_G_VEN 216
#define F_CODVETT1 217
#define F_CODVETT2 218
#define F_CODVETT3 219
#define F_SHEET_CONT 220
#define F_DESTACF 224
#define F_CODSPED1 225
#define F_CODSPED2 226
#define F_RAGSOCALLEG 228
#define F_CODDEP 230
#define F_RAGGEFF 232
#define F_CODLIST1 234
#define F_ESACC 235
#define F_ESALL 236
#define F_ESCAR 237
#define F_ESPLA 238
#define F_ESLEG 239
#define F_ESVET 240
#define F_ADDCONAI 241
#define F_CONAIASS 242
#define F_REFERENTE 243
#define F_DESBANPR 244
#define F_TIPODOCFAT 245
#define F_CODCAUS 246
#define F_CODVALINTRA 247
#define F_DESVALINTRA 248
#define F_CODCAUSNC 249
#define F_DATAECONAI 250
#define F_DESCRASS 251
#define F_SESSO 252
#define F_CODAG1 253
#define F_PROVV1 254
#define F_CODCFFATT 255
#define F_DESCFFATT 256
#define F_IMPMINFAT 257
#define F_RIFDOC 258
#define F_CODCAUSINC 259
#define F_STATONASC 260
#define F_DESTANASC 261
#define DLG_ALTNEWCLI 262
#define F_PADESTIN 263
#define F_PARIFAMM 264
#define F_PRODACC 271
#define F_PRODALL 272
#define F_PRODCAR 273
#define F_PRODPLA 274
#define F_PRODLEG 275
#define F_PRODVET 276
#define DLG_RIC 300
#define DLG_CST 301
#define F_RAGSOCA 302
#define F_MAIL 303
#define DLG_OGGETTI 304
#define F_BYMAIL 306
#define F_DOCMAIL 307
#define DLG_ANAG 308
#define DLG_CONTRLAV 309
#define F_BANA 310
#define F_BANP 311
#define F_DIPPUBB 312
#define F_ENTE 313
#define F_DESENTE 314
#define F_INDENTE 315
#define F_SPLITPAY 316
#define DLG_PERC 317
#define DLG_INIFATTEL 318
#define DLG_INIREVCHG 319
#define F_TPIMBALLO 401
#define F_DIMENSIONE 402
#define F_RIEMPIMENTO 403
#define F_ARTSEP 404
#define F_IBAN_STATO 101
#define F_IBAN_CHECK 102
#define F_BBAN_CIN 103
#define F_BBAN_ABI 104
#define F_BBAN_CAB 105
#define F_BBAN_CONTO 106
#define F_PROGPR 107
#define F_DESBAN 108
#define F_IBAN 109
#define F_BBAN 350
//////////////////////////////////////
// Identificatori per cg0200b.uml //
//////////////////////////////////////
#define F_RAGSOCI 101
#define F_INDIRI 102
#define F_CIVI 103
#define F_LOCALI 104
#define F_CAPI 105
#define F_STATOI 106
#define F_COMI 107
#define F_PTELI 108
#define F_TELI 109
#define F_PFAXI 110
#define F_FAXI 111
#define F_IVARIDI 112
#define F_DENCOMI 113
#define F_INDIR2 114
#endif // __CG0200_H
#ifndef __CG0200_H
#define __CG0200_H
#define TCLI "C"
#define TFOR "F"
#define F_TIPOCF 101
#define F_CODCF 102
#define F_RAGSOC 103
#define F_INDCF 104
#define F_CIVCF 105
#define F_STATOCF 106
#define F_COMCF 107
#define F_CAPCF 108
#define F_COFI 109
#define F_STATOPAIV 110
#define F_STATOPAIVSTR 128
#define F_PAIV 111
#define F_TIPOPERS 112
#define F_ALLEG 113
#define F_GRUPPO 114
#define F_CONTO 115
#define F_DESCONTO 137
#define F_GRUPPORIC 116
#define F_CONTORIC 117
#define F_SOTTOCRIC 118
#define F_DESCRIC 138
#define F_TIPOAPER 119
#define F_CODANAGPER 120
#define F_PTEL 121
#define F_TEL 122
#define F_PFAX 123
#define F_FAX 124
#define F_PTELEX 125
#define F_TELEX 126
#define F_DATANASC 127
#define F_COMNASC 129
#define F_DENCOMNASC 135
#define F_CODSTAT 130
#define F_CODPAG 131
#define F_DESPAG 331
#define F_RAGSOC1 132
#define F_CODVAL 136
#define F_DESVAL 336
#define F_FIDO 139
#define F_LOCALITACF 144
#define F_CODAG 145
#define F_SOSPESO 146
#define F_CODALLEG 148
#define LST_TIPO_RFSO 500
#define F_COD_RFSO_G 501
#define F_COD_RFSO_F 502
#define F_OCCASIONALE 149
#define F_DENCOMCF 150
#define F_PROVCF 152
#define F_RICALT 151
#define F_PTEL2 153
#define F_TEL2 154
#define F_PTEL3 155
#define F_TEL3 156
#define F_CODLIN 157
#define F_DESLIN 158
#define F_CODINDDOC 160
#define F_CODNOTE 161
#define F_CODLEG 162
#define F_CODCATC 163
#define F_CODZONA 164
#define F_PROVV 165
#define F_LIQPAG 166
#define F_CODPRCF 167
#define F_CODINDSP 168
#define F_CODPORTO 169
#define F_RAGGDOC 170
#define F_NCOPIE 171
#define F_CODFASS 172
#define F_ASSFIS 173
#define F_FATTSOSP 174
#define F_VSNRPROT 175
#define F_VSDATAREG 176
#define F_NSNRPROT 177
#define F_NSDATAREG 178
#define F_ADDBNS1500 179
#define F_CATFIN 180
#define F_CODABIPR 181
#define F_CODBANPR 182
#define F_CODINDEFF 183
#define F_EMEFFRICH 184
#define F_CODNOTESP1 185
#define F_CODNOTESP2 186
#define F_CODSPMEZZO 187
#define F_IMPMINEFF 188
#define F_NONACCEFF 189
#define F_NONSCADEFF 190
#define F_ADDBOLLI 191
#define F_PERCSPINC 193
#define F_IVARID 194
#define F_GESTCONTR 195
#define F_CATVEN 196
#define F_CODLIST 197
#define F_CODSCC 198
#define F_SCONTO 199
#define F_CODMAG 200
#define F_CODSP1 201
#define F_CODSP2 202
#define F_CODSP3 203
#define F_CODSP4 204
#define F_PROFSOLL 205
#define F_MAXSOLL 206
#define F_DATAESC 207
#define F_DATASOLL 208
#define F_NUMESC 209
#define F_TITOLO 210
#define F_RAGGOR 211
#define F_MINORD 212
#define F_MAXORD 213
#define F_PREVORD 214
#define F_TIPOEVORD 215
#define F_SHEET_G_VEN 216
#define F_CODVETT1 217
#define F_CODVETT2 218
#define F_CODVETT3 219
#define F_SHEET_CONT 220
#define F_DESTACF 224
#define F_CODSPED1 225
#define F_CODSPED2 226
#define F_RAGSOCALLEG 228
#define F_CODDEP 230
#define F_RAGGEFF 232
#define F_CODLIST1 234
#define F_ESACC 235
#define F_ESALL 236
#define F_ESCAR 237
#define F_ESPLA 238
#define F_ESLEG 239
#define F_ESVET 240
#define F_ADDCONAI 241
#define F_CONAIASS 242
#define F_REFERENTE 243
#define F_DESBANPR 244
#define F_TIPODOCFAT 245
#define F_CODCAUS 246
#define F_CODVALINTRA 247
#define F_DESVALINTRA 248
#define F_CODCAUSNC 249
#define F_DATAECONAI 250
#define F_DESCRASS 251
#define F_SESSO 252
#define F_CODAG1 253
#define F_PROVV1 254
#define F_CODCFFATT 255
#define F_DESCFFATT 256
#define F_IMPMINFAT 257
#define F_RIFDOC 258
#define F_CODCAUSINC 259
#define F_STATONASC 260
#define F_DESTANASC 261
#define DLG_ALTNEWCLI 262
#define F_PADESTIN 263
#define F_PARIFAMM 264
#define F_PRODACC 271
#define F_PRODALL 272
#define F_PRODCAR 273
#define F_PRODPLA 274
#define F_PRODLEG 275
#define F_PRODVET 276
#define DLG_RIC 300
#define DLG_CST 301
#define F_RAGSOCA 302
#define F_MAIL 303
#define DLG_OGGETTI 304
#define F_BYMAIL 306
#define F_DOCMAIL 307
#define DLG_ANAG 308
#define DLG_CONTRLAV 309
#define F_BANA 310
#define F_BANP 311
#define F_DIPPUBB 312
#define F_ENTE 313
#define F_DESENTE 314
#define F_INDENTE 315
#define F_SPLITPAY 316
#define DLG_PERC 317
#define DLG_INIFATTEL 318
#define DLG_INIREVCHG 319
#define F_SPEDPRI 320
#define F_SPEDDATA 321
#define F_SPEDRISP 322
#define F_SPEDDATARISP 323
#define F_TPIMBALLO 401
#define F_DIMENSIONE 402
#define F_RIEMPIMENTO 403
#define F_ARTSEP 404
#define F_IBAN_STATO 101
#define F_IBAN_CHECK 102
#define F_BBAN_CIN 103
#define F_BBAN_ABI 104
#define F_BBAN_CAB 105
#define F_BBAN_CONTO 106
#define F_PROGPR 107
#define F_DESBAN 108
#define F_IBAN 109
#define F_BBAN 350
//////////////////////////////////////
// Identificatori per cg0200b.uml //
//////////////////////////////////////
#define F_RAGSOCI 101
#define F_INDIRI 102
#define F_CIVI 103
#define F_LOCALI 104
#define F_CAPI 105
#define F_STATOI 106
#define F_COMI 107
#define F_PTELI 108
#define F_TELI 109
#define F_PFAXI 110
#define F_FAXI 111
#define F_IVARIDI 112
#define F_DENCOMI 113
#define F_INDIR2 114
#endif // __CG0200_H

File diff suppressed because it is too large Load Diff

View File

@ -1,247 +1,256 @@
#include "cg0201.h"
#include <recset.h>
#include <clifo.h>
#include <modaut.h>
#include <indsp.h>
// Definizione dei metodi relativi alla classe TClifoVI
TClifoVI::TClifoVI() : TRelation(LF_CLIFO), _oldindirizzi(0), _gesven(FALSE)
{
add(LF_CFVEN,"TIPOCF==TIPOCF|CODCF==CODCF");
add(LF_INDSP,"TIPOCF==TIPOCF|CODCF==CODCF");
}
void TClifoVI::destroy_rows()
{
_indirizzi.destroy();
_contatti.destroy();
}
TRectype& TClifoVI::indirizzo(int i)
{
TRectype *r=(TRectype*)_indirizzi.objptr(i);
if (r == NULL)
{
r = new TRectype(LF_INDSP);
_indirizzi.add(r,i);
}
return *r;
}
TRectype& TClifoVI::contatto(int i)
{
TRectype* r= (TRectype*)_contatti.objptr(i);
if (r == NULL)
{
r = new TRectype(LF_MULTIREL);
_contatti.add(r,i);
}
return *r;
}
int TClifoVI::read_indirizzi()
{
destroy_rows();
if (_gesven)
{
const TRectype& rind = curr(LF_INDSP);
for (bool ok=is_first_match(LF_INDSP); ok; ok=next_match(LF_INDSP))
{
const int nriga = rind.get_int(IND_CODIND) -1;
indirizzo(nriga) = rind;
}
_oldindirizzi = indirizzi();
// Read contatti
TLocalisamfile cont(LF_MULTIREL);
const char tipocf = curr().get_char(CLI_TIPOCF);
const long codcf = curr().get_long(CLI_CODCF);
TString8 first; first.format("%C%06ld", tipocf, codcf);
cont.put("COD", "BACON");
cont.put("FIRST", first);
for (int err = cont.read(_isgteq);
err == NOERR && cont.get("COD") == "BACON" && cont.get("FIRST") == first;
err = cont.next())
_contatti.add(cont.curr());
}
return 0;
}
int TClifoVI::write_contatti()
{
TAssoc_array old_ones;
TLocalisamfile cont(LF_MULTIREL);
const char tipocf = curr().get_char(CLI_TIPOCF);
const long codcf = curr().get_long(CLI_CODCF);
TString8 first; first.format("%C%06ld", tipocf, codcf);
cont.put("COD", "BACON");
cont.put("FIRST", first);
for (int err = cont.read(_isgteq);
err == NOERR && cont.get("COD") == "BACON" && cont.get("FIRST") == first;
err = cont.next())
old_ones.add(cont.curr().get("SECOND"));
FOR_EACH_ASSOC_OBJECT(old_ones, h, k, r)
{
bool trovato = false;
for (int i = _contatti.last(); i >= 0 && !trovato; i--)
{
const TRectype& c = (const TRectype&)_contatti[i];
trovato = c.get_long("SECOND") == atol(k);
}
if (!trovato)
{
cont.zero();
cont.put("COD", "BACON");
cont.put("FIRST", first);
cont.put("SECOND", k);
cont.remove();
}
}
FOR_EACH_ARRAY_ITEM(_contatti, i, obj)
{
TRectype& rec = *(TRectype*)obj;
if (rec.get("DATA").full())
{
TString8 second;
second.format("%06ld", rec.get_long("SECOND"));
rec.put("COD", "BACON");
rec.put("FIRST", first);
rec.put("SECOND", second);
rec.write_rewrite(cont);
}
}
return 0;
}
int TClifoVI::read(TIsamop op, TReclock lockop)
{
const int err = file().read(op,lockop);
position_rels();
if (err == NOERR)
read_indirizzi();
return err;
}
int TClifoVI::write_rec(bool re, const TRectype& rec, TLocalisamfile& f)
{
if (re)
{
const bool scrivi= f.rewrite(rec)!=NOERR;
if (scrivi) f.write(rec);
}
else
f.write(rec);
return f.status();
}
int TClifoVI::cancella(TLocalisamfile& f, int da, int a)
{
const char tipocf=lfile().get(IND_TIPOCF)[0];
const long codcf=lfile().get_long(IND_CODCF);
for (int i=da; i<=a;i++)
{
f.zero();
f.put(IND_TIPOCF,tipocf);
f.put(IND_CODCF,codcf);
f.put(IND_CODIND,i);
if (f.read(_isequal,_lock)==NOERR)
f.remove();
}
return f.status();
}
int TClifoVI::registra(bool re, bool force)
{
TLocalisamfile& c=lfile(LF_CLIFO);
int err=write_rec(re,c.curr(),c);
if (err!=NOERR) return err;
TLocalisamfile& v = lfile(LF_CFVEN);
err = write_rec(TRUE,v.curr(),v);
if (err!=NOERR) return err;
// Put here gest_vend() discrimination
if (_gesven)
{
TLocalisamfile& rind=lfile(LF_INDSP);
const char tipocf=c.get(CLI_TIPOCF)[0];
const long codcf=c.get_long(CLI_CODCF);
int i;
for (i=0; i<indirizzi(); i++)
{
if (!re)
{
indirizzo(i).put(IND_TIPOCF,tipocf);
indirizzo(i).put(IND_CODCF,codcf);
}
err=write_rec(TRUE,indirizzo(i),rind);
}
if (i<_oldindirizzi)
cancella(rind,i+1,_oldindirizzi);
_oldindirizzi=indirizzi();
write_contatti();
}
if (_geslv)
{
TLocalisamfile& lv = lfile(-LVAUT);
const char tipocf=c.get(CLI_TIPOCF)[0];
const long codcf=c.get_long(CLI_CODCF);
TString8 codtab; codtab << tipocf << codcf;
TRectype& rec = lv.curr();
rec.put("CODTAB", codtab);
err = write_rec(TRUE, rec, lv);
if (err!=NOERR) return err;
}
// END of gest_vend() discrimination
return err;
}
int TClifoVI::write(bool force)
{
_oldindirizzi=0;
return registra(FALSE,force);
}
int TClifoVI::rewrite(bool force)
{
return registra(TRUE,force);
}
int TClifoVI::remove()
{
const int err = lfile(LF_CLIFO).remove();
// Put here gest_vend() discrimination
if (_gesven)
{
lfile(LF_CFVEN).remove();
TLocalisamfile& rind = lfile(LF_INDSP);
cancella(rind, 1, _oldindirizzi);
_contatti.destroy();
write_contatti();
}
_oldindirizzi=0;
return err;
}
#include "cg0201.h"
#include <recset.h>
#include <clifo.h>
#include <modaut.h>
#include <indsp.h>
// Definizione dei metodi relativi alla classe TClifoVI
TClifoVI::TClifoVI() : TRelation(LF_CLIFO), _oldindirizzi(0), _gesven(FALSE)
{
add(LF_CFVEN,"TIPOCF==TIPOCF|CODCF==CODCF");
add(LF_INDSP,"TIPOCF==TIPOCF|CODCF==CODCF");
add(LF_CFPRI,"TIPOCF==TIPOCF|CODCF==CODCF");
}
void TClifoVI::destroy_rows()
{
_indirizzi.destroy();
_contatti.destroy();
}
TRectype& TClifoVI::indirizzo(int i)
{
TRectype *r=(TRectype*)_indirizzi.objptr(i);
if (r == NULL)
{
r = new TRectype(LF_INDSP);
_indirizzi.add(r,i);
}
return *r;
}
TRectype& TClifoVI::contatto(int i)
{
TRectype* r= (TRectype*)_contatti.objptr(i);
if (r == NULL)
{
r = new TRectype(LF_MULTIREL);
_contatti.add(r,i);
}
return *r;
}
int TClifoVI::read_indirizzi()
{
destroy_rows();
if (_gesven)
{
const TRectype& rind = curr(LF_INDSP);
for (bool ok=is_first_match(LF_INDSP); ok; ok=next_match(LF_INDSP))
{
const int nriga = rind.get_int(IND_CODIND) -1;
indirizzo(nriga) = rind;
}
_oldindirizzi = indirizzi();
// Read contatti
TLocalisamfile cont(LF_MULTIREL);
const char tipocf = curr().get_char(CLI_TIPOCF);
const long codcf = curr().get_long(CLI_CODCF);
TString8 first; first.format("%C%06ld", tipocf, codcf);
cont.put("COD", "BACON");
cont.put("FIRST", first);
for (int err = cont.read(_isgteq);
err == NOERR && cont.get("COD") == "BACON" && cont.get("FIRST") == first;
err = cont.next())
_contatti.add(cont.curr());
}
return 0;
}
int TClifoVI::write_contatti()
{
TAssoc_array old_ones;
TLocalisamfile cont(LF_MULTIREL);
const char tipocf = curr().get_char(CLI_TIPOCF);
const long codcf = curr().get_long(CLI_CODCF);
TString8 first; first.format("%C%06ld", tipocf, codcf);
cont.put("COD", "BACON");
cont.put("FIRST", first);
for (int err = cont.read(_isgteq);
err == NOERR && cont.get("COD") == "BACON" && cont.get("FIRST") == first;
err = cont.next())
old_ones.add(cont.curr().get("SECOND"));
FOR_EACH_ASSOC_OBJECT(old_ones, h, k, r)
{
bool trovato = false;
for (int i = _contatti.last(); i >= 0 && !trovato; i--)
{
const TRectype& c = (const TRectype&)_contatti[i];
trovato = c.get_long("SECOND") == atol(k);
}
if (!trovato)
{
cont.zero();
cont.put("COD", "BACON");
cont.put("FIRST", first);
cont.put("SECOND", k);
cont.remove();
}
}
FOR_EACH_ARRAY_ITEM(_contatti, i, obj)
{
TRectype& rec = *(TRectype*)obj;
if (rec.get("DATA").full())
{
TString8 second;
second.format("%06ld", rec.get_long("SECOND"));
rec.put("COD", "BACON");
rec.put("FIRST", first);
rec.put("SECOND", second);
rec.write_rewrite(cont);
}
}
return 0;
}
int TClifoVI::read(TIsamop op, TReclock lockop)
{
const int err = file().read(op,lockop);
position_rels();
if (err == NOERR)
read_indirizzi();
return err;
}
int TClifoVI::write_rec(bool re, const TRectype& rec, TLocalisamfile& f)
{
if (re)
{
const bool scrivi= f.rewrite(rec)!=NOERR;
if (scrivi) f.write(rec);
}
else
f.write(rec);
return f.status();
}
int TClifoVI::cancella(TLocalisamfile& f, int da, int a)
{
const char tipocf=lfile().get(IND_TIPOCF)[0];
const long codcf=lfile().get_long(IND_CODCF);
for (int i=da; i<=a;i++)
{
f.zero();
f.put(IND_TIPOCF,tipocf);
f.put(IND_CODCF,codcf);
f.put(IND_CODIND,i);
if (f.read(_isequal,_lock)==NOERR)
f.remove();
}
return f.status();
}
int TClifoVI::registra(bool re, bool force)
{
TLocalisamfile& c=lfile(LF_CLIFO);
int err=write_rec(re,c.curr(),c);
if (err!=NOERR) return err;
TLocalisamfile& v = lfile(LF_CFVEN);
err = write_rec(TRUE,v.curr(),v);
if (err!=NOERR) return err;
TLocalisamfile& p = lfile(LF_CFPRI);
p.put("TIPOCF", c.get(CLI_TIPOCF)[0]);
p.put("CODCF", c.get_long(CLI_CODCF));
err = write_rec(TRUE, p.curr(), p);
if (err != NOERR) return err;
// Put here gest_vend() discrimination
if (_gesven)
{
TLocalisamfile& rind=lfile(LF_INDSP);
const char tipocf=c.get(CLI_TIPOCF)[0];
const long codcf=c.get_long(CLI_CODCF);
int i;
for (i=0; i<indirizzi(); i++)
{
if (!re)
{
indirizzo(i).put(IND_TIPOCF,tipocf);
indirizzo(i).put(IND_CODCF,codcf);
}
err=write_rec(TRUE,indirizzo(i),rind);
}
if (i<_oldindirizzi)
cancella(rind,i+1,_oldindirizzi);
_oldindirizzi=indirizzi();
write_contatti();
}
if (_geslv)
{
TLocalisamfile& lv = lfile(-LVAUT);
const char tipocf=c.get(CLI_TIPOCF)[0];
const long codcf=c.get_long(CLI_CODCF);
TString8 codtab; codtab << tipocf << codcf;
TRectype& rec = lv.curr();
rec.put("CODTAB", codtab);
err = write_rec(TRUE, rec, lv);
if (err!=NOERR) return err;
}
// END of gest_vend() discrimination
return err;
}
int TClifoVI::write(bool force)
{
_oldindirizzi=0;
return registra(FALSE,force);
}
int TClifoVI::rewrite(bool force)
{
return registra(TRUE,force);
}
int TClifoVI::remove()
{
const int err = lfile(LF_CLIFO).remove();
lfile(LF_CFPRI).remove();
// Put here gest_vend() discrimination
if (_gesven)
{
lfile(LF_CFVEN).remove();
TLocalisamfile& rind = lfile(LF_INDSP);
cancella(rind, 1, _oldindirizzi);
_contatti.destroy();
write_contatti();
}
_oldindirizzi=0;
return err;
}

3
src/cg/f175.dir Normal file
View File

@ -0,0 +1,3 @@
175
0
$cfpri|2|2|30|0|Gestione Privacy clienti fornitori|||

10
src/cg/f175.trr Normal file
View File

@ -0,0 +1,10 @@
175
6
TIPOCF|1|1|0|
CODCF|3|6|0|
SPEDITA|8|1|0|
DATASPE|5|8|0|
RISPOSTA|1|5|0|
DATARISP|5|8|0|
1
TIPOCF+CODCF|

View File

@ -1,202 +1,203 @@
#ifndef __LFFILES_H
#define __LFFILES_H
#define LF_DIR 1
#define LF_USER 2
#define LF_TABGEN 3
#define LF_TABCOM 4
#define LF_TAB 5
#define LF_ANAG 6
#define LF_ANAGGIU 7
#define LF_ANAGFIS 8
#define LF_NDITTE 9
#define LF_ATTIV 10
#define LF_UNLOC 11
#define LF_SOCI 12
#define LF_COMUNI 13
#define LF_REFFETTI 14
#define LF_INDLIB 15
#define LF_INDSP 16
#define LF_CFVEN 17
#define LF_OCCAS 18
#define LF_PCON 19
#define LF_CLIFO 20
#define LF_SALDI 21
#define LF_ALLEG 22
#define LF_MOV 23
#define LF_RMOV 24
#define LF_RMOVIVA 25
#define LF_CAUSALI 26
#define LF_RCAUSALI 27
#define LF_PARTITE 28
#define LF_SCADENZE 29
#define LF_PAGSCA 30
#define LF_EFFETTI 31
#define LF_CESS 32
#define LF_DOC 33
#define SF_DOC "DOC"
#define LF_RIGHEDOC 34
#define LF_SCONTI 35
#define LF_BASE 36
#define LF_BASEBIS 37
#define LF_PERC 38
#define LF_SCPERC 39
#define LF_RVER 40
#define LF_RPAG 41
#define LF_QUAL 42
#define LF_QUAH 43
#define LF_QUAA 44
#define LF_DIPEND 45
#define LF_DETH 46
#define LF_ANAMAG 47
#define LF_CODCORR 48
#define LF_UMART 49
#define LF_RFORM 50
#define LF_DESLIN 51
#define LF_CONDV 52
#define LF_RCONDV 53
#define LF_FORM 54
#define LF_GOLEM 55
#define LF_QUAA1 56
#define LF_QUAA2 57
#define LF_QUAA3 58
#define LF_QUAB 59
#define LF_QUAB1 60
#define LF_QUAC 61
#define LF_QUAD 62
#define LF_QUAD1 63
#define LF_QUAE 64
#define LF_QUAE1 65
#define LF_QUAE2 66
#define LF_QUAF 67
#define LF_QUAF1 68
#define LF_QUAF2 69
#define LF_QUAG 70
#define LF_QUAG1 71
#define LF_QUAN 72
#define LF_QUAP 73
#define LF_QUAQ 74
#define LF_QUAR 75
#define LF_QUAS 76
#define LF_QUAT 77
#define LF_ABPCON 78
#define LF_ABSALDI 79
#define LF_MOVDETT 80
#define LF_RETT 81
#define LF_ANALISI 82
#define LF_VOCI 83
#define LF_RELVOCI 84
#define LF_RELANA 85
#define LF_SVRIEP 86
#define LF_SVSTAT 87
#define LF_RELNI 88
#define LF_PROSPE1 89
#define LF_SOGGETTI 90
#define LF_STORICO 91
#define LF_DONAZ 92
#define LF_CONTSAN 93
#define LF_BENEM 94
#define LF_FAMIGLIE 95
#define LF_SEZIONI 96
#define LF_MEDICI 97
#define LF_CFBAN 98
#define LF_CFCMS 99
#define LF_RIGHEF2 100
#define LF_QUAGD 101
#define LF_SOCTRASF 102
#define LF_TAB1100A 103
#define LF_TAB1100B 104
#define LF_TABREG 105
#define LF_PCONANA 106
#define LF_MOVANA 107
#define LF_RMOVANA 108
#define LF_MAG 109
#define LF_MOVMAG 110
#define LF_RMOVMAG 111
#define LF_DIST 112
#define LF_RDIST 113
#define LF_STOMAG 114
#define LF_PACCHI 115
#define LF_CONVOC 115 //NON si può chiamare un file con lo stesso numero di un file esistente
#define LF_RCONVOC 116
#define LF_STAZZ 117
#define LF_QUAGP 118
#define LF_QUAAB 119
#define LF_QUADBIS 120
#define LF_ATSTATD 121
#define LF_AGENTI 122
#define LF_PERCPROV 123
#define LF_PROVV 124
#define LF_RILORE 125
#define LF_PACKLIST 126
#define LF_COLLDICH 127
#define LF_IDONEITA 128
#define LF_ATSTATS 129
#define LF_ATOPERA 130
#define LF_ATROPERA 131
#define LF_MRPREPORT 132
#define LF_INTRA 133
#define LF_RINTRA 134
#define LF_RIEPRETT 135
#define LF_AMMCE 136
#define LF_AMMMV 137
#define LF_CATDI 138
#define LF_CESPI 139
#define LF_COLLCES 140
#define LF_MOVAM 141
#define LF_MOVCE 142
#define LF_SALCE 143
#define LF_QUALA 144
#define LF_SALCECMS 145
#define LF_CDC 146
#define LF_COMMESSE 147
#define LF_FASI 148
#define LF_RIP 149
#define LF_RRIP 150
#define LF_SALDANA 151
#define LF_RILPROD 152
#define LF_RRILPROD 153
#define LF_LETINT 154
#define LF_PANAPDC 155
#define LF_MULTIREL 156
#define LF_TURNI 157
#define LF_RIGHEF24 158
#define LF_RICLPDC 159
// Magari spostare in TABMOD in futuro
#define LF_MERCATICOOP 160
#define LF_SOCICOOP 161
#define LF_IMBARCAZIONI 162
#define LF_TABMOD 163
#define LF_LVPASPLAN 164
#define LF_LVPERISOSP 165
#define LF_CLIFOGIAC 166
#define LF_LVRCONSPLAN 167
#define LF_LVCONDV 168
#define LF_LVRCONDV 169
#define LF_CONTACT 170
#define LF_IVADIFF 171
#define LF_RMOVANAC 172
#define LF_TRASFATT 173
#define LF_IVALIQ 174
#define LF_EXTERNAL 1000 // Files with id >= are considered to be externals
#define CNF_GENERAL 10000
#define CNF_STUDIO CNF_GENERAL + 1
#define CNF_DITTA CNF_GENERAL + 2
#endif // __LFFILES_H
#ifndef __LFFILES_H
#define __LFFILES_H
#define LF_DIR 1
#define LF_USER 2
#define LF_TABGEN 3
#define LF_TABCOM 4
#define LF_TAB 5
#define LF_ANAG 6
#define LF_ANAGGIU 7
#define LF_ANAGFIS 8
#define LF_NDITTE 9
#define LF_ATTIV 10
#define LF_UNLOC 11
#define LF_SOCI 12
#define LF_COMUNI 13
#define LF_REFFETTI 14
#define LF_INDLIB 15
#define LF_INDSP 16
#define LF_CFVEN 17
#define LF_OCCAS 18
#define LF_PCON 19
#define LF_CLIFO 20
#define LF_SALDI 21
#define LF_ALLEG 22
#define LF_MOV 23
#define LF_RMOV 24
#define LF_RMOVIVA 25
#define LF_CAUSALI 26
#define LF_RCAUSALI 27
#define LF_PARTITE 28
#define LF_SCADENZE 29
#define LF_PAGSCA 30
#define LF_EFFETTI 31
#define LF_CESS 32
#define LF_DOC 33
#define SF_DOC "DOC"
#define LF_RIGHEDOC 34
#define LF_SCONTI 35
#define LF_BASE 36
#define LF_BASEBIS 37
#define LF_PERC 38
#define LF_SCPERC 39
#define LF_RVER 40
#define LF_RPAG 41
#define LF_QUAL 42
#define LF_QUAH 43
#define LF_QUAA 44
#define LF_DIPEND 45
#define LF_DETH 46
#define LF_ANAMAG 47
#define LF_CODCORR 48
#define LF_UMART 49
#define LF_RFORM 50
#define LF_DESLIN 51
#define LF_CONDV 52
#define LF_RCONDV 53
#define LF_FORM 54
#define LF_GOLEM 55
#define LF_QUAA1 56
#define LF_QUAA2 57
#define LF_QUAA3 58
#define LF_QUAB 59
#define LF_QUAB1 60
#define LF_QUAC 61
#define LF_QUAD 62
#define LF_QUAD1 63
#define LF_QUAE 64
#define LF_QUAE1 65
#define LF_QUAE2 66
#define LF_QUAF 67
#define LF_QUAF1 68
#define LF_QUAF2 69
#define LF_QUAG 70
#define LF_QUAG1 71
#define LF_QUAN 72
#define LF_QUAP 73
#define LF_QUAQ 74
#define LF_QUAR 75
#define LF_QUAS 76
#define LF_QUAT 77
#define LF_ABPCON 78
#define LF_ABSALDI 79
#define LF_MOVDETT 80
#define LF_RETT 81
#define LF_ANALISI 82
#define LF_VOCI 83
#define LF_RELVOCI 84
#define LF_RELANA 85
#define LF_SVRIEP 86
#define LF_SVSTAT 87
#define LF_RELNI 88
#define LF_PROSPE1 89
#define LF_SOGGETTI 90
#define LF_STORICO 91
#define LF_DONAZ 92
#define LF_CONTSAN 93
#define LF_BENEM 94
#define LF_FAMIGLIE 95
#define LF_SEZIONI 96
#define LF_MEDICI 97
#define LF_CFBAN 98
#define LF_CFCMS 99
#define LF_RIGHEF2 100
#define LF_QUAGD 101
#define LF_SOCTRASF 102
#define LF_TAB1100A 103
#define LF_TAB1100B 104
#define LF_TABREG 105
#define LF_PCONANA 106
#define LF_MOVANA 107
#define LF_RMOVANA 108
#define LF_MAG 109
#define LF_MOVMAG 110
#define LF_RMOVMAG 111
#define LF_DIST 112
#define LF_RDIST 113
#define LF_STOMAG 114
#define LF_PACCHI 115
#define LF_CONVOC 115 //NON si può chiamare un file con lo stesso numero di un file esistente
#define LF_RCONVOC 116
#define LF_STAZZ 117
#define LF_QUAGP 118
#define LF_QUAAB 119
#define LF_QUADBIS 120
#define LF_ATSTATD 121
#define LF_AGENTI 122
#define LF_PERCPROV 123
#define LF_PROVV 124
#define LF_RILORE 125
#define LF_PACKLIST 126
#define LF_COLLDICH 127
#define LF_IDONEITA 128
#define LF_ATSTATS 129
#define LF_ATOPERA 130
#define LF_ATROPERA 131
#define LF_MRPREPORT 132
#define LF_INTRA 133
#define LF_RINTRA 134
#define LF_RIEPRETT 135
#define LF_AMMCE 136
#define LF_AMMMV 137
#define LF_CATDI 138
#define LF_CESPI 139
#define LF_COLLCES 140
#define LF_MOVAM 141
#define LF_MOVCE 142
#define LF_SALCE 143
#define LF_QUALA 144
#define LF_SALCECMS 145
#define LF_CDC 146
#define LF_COMMESSE 147
#define LF_FASI 148
#define LF_RIP 149
#define LF_RRIP 150
#define LF_SALDANA 151
#define LF_RILPROD 152
#define LF_RRILPROD 153
#define LF_LETINT 154
#define LF_PANAPDC 155
#define LF_MULTIREL 156
#define LF_TURNI 157
#define LF_RIGHEF24 158
#define LF_RICLPDC 159
// Magari spostare in TABMOD in futuro
#define LF_MERCATICOOP 160
#define LF_SOCICOOP 161
#define LF_IMBARCAZIONI 162
#define LF_TABMOD 163
#define LF_LVPASPLAN 164
#define LF_LVPERISOSP 165
#define LF_CLIFOGIAC 166
#define LF_LVRCONSPLAN 167
#define LF_LVCONDV 168
#define LF_LVRCONDV 169
#define LF_CONTACT 170
#define LF_IVADIFF 171
#define LF_RMOVANAC 172
#define LF_TRASFATT 173
#define LF_IVALIQ 174
#define LF_CFPRI 175
#define LF_EXTERNAL 1000 // Files with id >= are considered to be externals
#define CNF_GENERAL 10000
#define CNF_STUDIO CNF_GENERAL + 1
#define CNF_DITTA CNF_GENERAL + 2
#endif // __LFFILES_H