Aggiustate anagrafiche persone fisiche e giuridiche

git-svn-id: svn://10.65.10.50/trunk@2822 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1996-05-15 10:21:32 +00:00
parent 1cf54d9244
commit 5a790dd12c
4 changed files with 38 additions and 43 deletions

View File

@ -597,48 +597,48 @@ void TPersone_app::manual_save(const TMask& m)
int TPersone_app::read(TMask& m) int TPersone_app::read(TMask& m)
{ {
const TRelation *r = get_relation(); const TRelation& r = *get_relation();
m.autoload(r); m.autoload(r);
_cod_ana = r->lfile().get(N_CODANAGR); _cod_ana = r.lfile().get(N_CODANAGR);
return NOERR; return NOERR;
} }
int TPersone_app::write(const TMask& m) int TPersone_app::write(const TMask& m)
{ {
TRelation *r = get_relation(); TRelation& r = *get_relation();
r->zero(); r.zero();
m.autosave(r); m.autosave(r);
set_cod_ana(r->lfile().get(N_CODANAGR)); set_cod_ana(r.lfile().get(N_CODANAGR));
if (_reset_uff_conc) if (_reset_uff_conc)
{ {
_reset_uff_conc = FALSE; _reset_uff_conc = FALSE;
r->lfile().zero("UFFCONC"); r.lfile().zero("UFFCONC");
} }
if (_reset_codreg) if (_reset_codreg)
{ {
_reset_codreg = FALSE; _reset_codreg = FALSE;
r->lfile(LF_ANAGFIS).zero("CODREG96"); r.lfile(LF_ANAGFIS).zero("CODREG96");
} }
manual_save(m); manual_save(m);
return r->write(); return r.write();
} }
int TPersone_app::rewrite(const TMask& m) int TPersone_app::rewrite(const TMask& m)
{ {
TRelation *r = get_relation(); TRelation& r = *get_relation();
m.autosave(r); m.autosave(r);
if (_reset_uff_conc) if (_reset_uff_conc)
{ {
_reset_uff_conc = FALSE; _reset_uff_conc = FALSE;
r->lfile().zero("UFFCONC"); r.lfile().zero("UFFCONC");
} }
if (_reset_codreg) if (_reset_codreg)
{ {
_reset_codreg = FALSE; _reset_codreg = FALSE;
r->lfile(LF_ANAGFIS).zero("CODREG96"); r.lfile(LF_ANAGFIS).zero("CODREG96");
} }
manual_save(m); manual_save(m);
/* if (ana_fis()) /* if (ana_fis())
@ -653,21 +653,14 @@ int TPersone_app::rewrite(const TMask& m)
m.field(FLD_AG1_CAPRF).dirty() || m.field(FLD_AG1_COMRF).dirty()) m.field(FLD_AG1_CAPRF).dirty() || m.field(FLD_AG1_COMRF).dirty())
message_box("Attenzione e' stata variata la residenza fiscale. Controllare le unita' locali"); message_box("Attenzione e' stata variata la residenza fiscale. Controllare le unita' locali");
} */ } */
return r->rewrite(); return r.rewrite();
} }
int ba4200(int argc, char* argv[]) int ba4200(int argc, char* argv[])
{ {
char ta = 'F';
TApplication::check_parameters(argc, argv); TApplication::check_parameters(argc, argv);
if (argc > 2 && toupper(*argv[2]) == 'G') ta = 'G'; const char ta = (argc > 2 && toupper(*argv[2]) == 'G') ? 'G' : 'F';
TPersone_app a(ta); TPersone_app a(ta);
a.run(argc, argv, "Anagrafica Persone");
TString80 titolo("Persone ");
titolo << (ta == 'F' ? "Fisiche" : "Giuridiche");
a.run(argc, argv, titolo);
return 0; return 0;
} }

View File

@ -19,14 +19,15 @@ END
ENDPAGE ENDPAGE
PAGE "Persone Fisiche" -1 -1 77 20 PAGE "Pag.1" -1 -1 77 20
LIST DLG_NULL 1 LIST DLG_NULL 1 6
BEGIN BEGIN
FIELD LF_ANAG->TIPOA PROMPT 1 60 ""
FLAGS "DG" FIELD LF_ANAG->TIPOA
KEY 1 2 3 FLAGS "DG"
ITEM "F|Fisica" KEY 1 2 3
ITEM "F|Fisica"
END END
GROUPBOX DLG_NULL 76 5 GROUPBOX DLG_NULL 76 5
@ -254,7 +255,7 @@ END
ENDPAGE ENDPAGE
PAGE "Anagrafica persone fisiche" -1 -1 77 20 PAGE "Pag.2" -1 -1 77 20
GROUPBOX DLG_NULL 76 5 GROUPBOX DLG_NULL 76 5
BEGIN BEGIN
@ -460,7 +461,7 @@ END
ENDPAGE ENDPAGE
PAGE "Anagrafica persone fisiche" -1 -1 77 20 PAGE "Pag.3" -1 -1 77 20
GROUPBOX DLG_NULL 76 5 GROUPBOX DLG_NULL 76 5
BEGIN BEGIN
@ -632,7 +633,7 @@ END
ENDPAGE ENDPAGE
PAGE "Anagrafica persone fisiche" -1 -1 77 20 PAGE "Pag.4" -1 -1 77 20
GROUPBOX DLG_NULL 76 5 GROUPBOX DLG_NULL 76 5
BEGIN BEGIN
@ -829,7 +830,7 @@ END
ENDPAGE ENDPAGE
PAGE "Anagrafica persone fisiche" -1 -1 77 20 PAGE "Pag.5" -1 -1 77 20
GROUPBOX DLG_NULL 76 5 GROUPBOX DLG_NULL 76 5
BEGIN BEGIN
@ -983,7 +984,7 @@ END
ENDPAGE ENDPAGE
PAGE "Anagrafica persone fisiche" -1 -1 77 20 PAGE "Pag.6" -1 -1 77 20
GROUPBOX DLG_NULL 76 5 GROUPBOX DLG_NULL 76 5
BEGIN BEGIN

View File

@ -17,10 +17,11 @@ END
#include <toolbar.h> #include <toolbar.h>
ENDPAGE ENDPAGE
PAGE "Persone Giuridiche" -1 -1 77 20 PAGE "Pag.1" -1 -1 77 20
LIST DLG_NULL 1 LIST DLG_NULL 1 9
BEGIN BEGIN
PROMPT 1 60 ""
FIELD LF_ANAG->TIPOA FIELD LF_ANAG->TIPOA
ITEM "G|Giuridica" ITEM "G|Giuridica"
FLAGS "D" FLAGS "D"
@ -183,7 +184,7 @@ END
ENDPAGE ENDPAGE
PAGE "Anagrafica persone giuridiche" -1 -1 77 20 PAGE "Pag.2" -1 -1 77 20
GROUPBOX DLG_NULL 76 4 GROUPBOX DLG_NULL 76 4
BEGIN BEGIN
@ -400,7 +401,7 @@ END
ENDPAGE ENDPAGE
PAGE "Anagrafica persone giuridiche" -1 -1 77 20 PAGE "Pag.3" -1 -1 77 20
GROUPBOX DLG_NULL 76 4 GROUPBOX DLG_NULL 76 4
BEGIN BEGIN
@ -565,7 +566,7 @@ END
ENDPAGE ENDPAGE
PAGE "Anagrafica persone giuridiche" -1 -1 77 20 PAGE "Pag.4" -1 -1 77 20
GROUPBOX DLG_NULL 76 4 GROUPBOX DLG_NULL 76 4
BEGIN BEGIN
@ -794,7 +795,7 @@ END
ENDPAGE ENDPAGE
PAGE "Anagrafica persone giuridiche" -1 -1 77 20 PAGE "Pag.5" -1 -1 77 20
GROUPBOX DLG_NULL 76 4 GROUPBOX DLG_NULL 76 4
BEGIN BEGIN
@ -949,7 +950,7 @@ END
ENDPAGE ENDPAGE
PAGE "Anagrafica persone giuridiche" -1 -1 77 20 PAGE "Pag.6" -1 -1 77 20
GROUPBOX DLG_NULL 76 4 GROUPBOX DLG_NULL 76 4
BEGIN BEGIN
@ -1108,7 +1109,7 @@ END
ENDPAGE ENDPAGE
PAGE "Anagrafica persone giuridiche" -1 -1 77 20 PAGE "Pag.7" -1 -1 77 20
GROUPBOX DLG_NULL 76 4 GROUPBOX DLG_NULL 76 4
BEGIN BEGIN

View File

@ -53,10 +53,10 @@ void TSoci_application::update_ap_socio(const TMask& m)
if (yesno_box(format("Aggiornare anche il socio %s?", ap == 'A' ? "attuale" : "precedente"))) if (yesno_box(format("Aggiornare anche il socio %s?", ap == 'A' ? "attuale" : "precedente")))
{ {
_rel->save_status(); _rel->save_status();
m.autosave(_rel); m.autosave(*_rel);
_rel->lfile().put("ATTPREC", ap); _rel->lfile().put("ATTPREC", ap);
const bool was =_rel->read(_isequal, _lock) == NOERR; const bool was =_rel->read(_isequal, _lock) == NOERR;
m.autosave(_rel); m.autosave(*_rel);
_rel->lfile().put("ATTPREC", ap); _rel->lfile().put("ATTPREC", ap);
if (was) err = _rel->rewrite(); if (was) err = _rel->rewrite();
else err = _rel->write(); else err = _rel->write();