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)
{
const TRelation *r = get_relation();
const TRelation& r = *get_relation();
m.autoload(r);
_cod_ana = r->lfile().get(N_CODANAGR);
_cod_ana = r.lfile().get(N_CODANAGR);
return NOERR;
}
int TPersone_app::write(const TMask& m)
{
TRelation *r = get_relation();
r->zero();
TRelation& r = *get_relation();
r.zero();
m.autosave(r);
set_cod_ana(r->lfile().get(N_CODANAGR));
set_cod_ana(r.lfile().get(N_CODANAGR));
if (_reset_uff_conc)
{
_reset_uff_conc = FALSE;
r->lfile().zero("UFFCONC");
r.lfile().zero("UFFCONC");
}
if (_reset_codreg)
{
_reset_codreg = FALSE;
r->lfile(LF_ANAGFIS).zero("CODREG96");
r.lfile(LF_ANAGFIS).zero("CODREG96");
}
manual_save(m);
return r->write();
return r.write();
}
int TPersone_app::rewrite(const TMask& m)
{
TRelation *r = get_relation();
TRelation& r = *get_relation();
m.autosave(r);
if (_reset_uff_conc)
{
_reset_uff_conc = FALSE;
r->lfile().zero("UFFCONC");
r.lfile().zero("UFFCONC");
}
if (_reset_codreg)
{
_reset_codreg = FALSE;
r->lfile(LF_ANAGFIS).zero("CODREG96");
r.lfile(LF_ANAGFIS).zero("CODREG96");
}
manual_save(m);
/* 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())
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[])
{
char ta = 'F';
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);
TString80 titolo("Persone ");
titolo << (ta == 'F' ? "Fisiche" : "Giuridiche");
a.run(argc, argv, titolo);
a.run(argc, argv, "Anagrafica Persone");
return 0;
}

View File

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

View File

@ -17,10 +17,11 @@ END
#include <toolbar.h>
ENDPAGE
PAGE "Persone Giuridiche" -1 -1 77 20
PAGE "Pag.1" -1 -1 77 20
LIST DLG_NULL 1
BEGIN
LIST DLG_NULL 1 9
BEGIN
PROMPT 1 60 ""
FIELD LF_ANAG->TIPOA
ITEM "G|Giuridica"
FLAGS "D"
@ -183,7 +184,7 @@ END
ENDPAGE
PAGE "Anagrafica persone giuridiche" -1 -1 77 20
PAGE "Pag.2" -1 -1 77 20
GROUPBOX DLG_NULL 76 4
BEGIN
@ -400,7 +401,7 @@ END
ENDPAGE
PAGE "Anagrafica persone giuridiche" -1 -1 77 20
PAGE "Pag.3" -1 -1 77 20
GROUPBOX DLG_NULL 76 4
BEGIN
@ -565,7 +566,7 @@ END
ENDPAGE
PAGE "Anagrafica persone giuridiche" -1 -1 77 20
PAGE "Pag.4" -1 -1 77 20
GROUPBOX DLG_NULL 76 4
BEGIN
@ -794,7 +795,7 @@ END
ENDPAGE
PAGE "Anagrafica persone giuridiche" -1 -1 77 20
PAGE "Pag.5" -1 -1 77 20
GROUPBOX DLG_NULL 76 4
BEGIN
@ -949,7 +950,7 @@ END
ENDPAGE
PAGE "Anagrafica persone giuridiche" -1 -1 77 20
PAGE "Pag.6" -1 -1 77 20
GROUPBOX DLG_NULL 76 4
BEGIN
@ -1108,7 +1109,7 @@ END
ENDPAGE
PAGE "Anagrafica persone giuridiche" -1 -1 77 20
PAGE "Pag.7" -1 -1 77 20
GROUPBOX DLG_NULL 76 4
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")))
{
_rel->save_status();
m.autosave(_rel);
m.autosave(*_rel);
_rel->lfile().put("ATTPREC", ap);
const bool was =_rel->read(_isequal, _lock) == NOERR;
m.autosave(_rel);
m.autosave(*_rel);
_rel->lfile().put("ATTPREC", ap);
if (was) err = _rel->rewrite();
else err = _rel->write();