Correzioni per XI
git-svn-id: svn://10.65.10.50/trunk@2833 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
20b383cc49
commit
6858a7875c
@ -88,16 +88,8 @@ bool TPersone_app::ba4200_handler(TMask& m, KEY k)
|
|||||||
TMessage msg(cmd2name(cmd), MSG_FS, (const char*) body);
|
TMessage msg(cmd2name(cmd), MSG_FS, (const char*) body);
|
||||||
|
|
||||||
msg.send();
|
msg.send();
|
||||||
// TLocalisamfile& d = app.get_relation()->lfile();
|
|
||||||
|
|
||||||
// d.setkey(1);
|
|
||||||
// d.zero();
|
|
||||||
// d.put(N_TIPOA, app.ana_fis() ? "F" : "G");
|
|
||||||
// d.put(N_CODANAGR, m.get(FLD_CODANAGR));
|
|
||||||
// d.read(_isequal, _unlock) ;
|
|
||||||
TExternal_app a(cmd);
|
TExternal_app a(cmd);
|
||||||
a.run();
|
a.run();
|
||||||
// d.read(_iscurr, _lock) ;
|
|
||||||
m.set_focus();
|
m.set_focus();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -289,7 +281,7 @@ bool gest_uff_imp(TMask_field& f, KEY key)
|
|||||||
if (msk.get(F_UFFIIDD).empty() || msk.is_running())
|
if (msk.get(F_UFFIIDD).empty() || msk.is_running())
|
||||||
{
|
{
|
||||||
msk.set(F_UFFIIDD, s) ; msk.field(F_UFFIIDD).on_key(K_TAB);
|
msk.set(F_UFFIIDD, s) ; msk.field(F_UFFIIDD).on_key(K_TAB);
|
||||||
}
|
}
|
||||||
s = comuni.get(N_IVA1);
|
s = comuni.get(N_IVA1);
|
||||||
if (s.empty()) s = comuni.get(N_IVA2) ;
|
if (s.empty()) s = comuni.get(N_IVA2) ;
|
||||||
if (s.empty()) s = comuni.get(N_IVA3) ;
|
if (s.empty()) s = comuni.get(N_IVA3) ;
|
||||||
@ -418,9 +410,6 @@ bool no_dup_fis(TMask_field& f, KEY key)
|
|||||||
const TString16 cofi(f.get());
|
const TString16 cofi(f.get());
|
||||||
if ( cofi.not_empty() )
|
if ( cofi.not_empty() )
|
||||||
{
|
{
|
||||||
// TRelation * r = app.get_relation();
|
|
||||||
|
|
||||||
// r->save_status();
|
|
||||||
anag.zero() ;
|
anag.zero() ;
|
||||||
anag.put(N_TIPOA, app.tip_ana());
|
anag.put(N_TIPOA, app.tip_ana());
|
||||||
anag.put(N_COFI, cofi ) ;
|
anag.put(N_COFI, cofi ) ;
|
||||||
@ -433,7 +422,6 @@ bool no_dup_fis(TMask_field& f, KEY key)
|
|||||||
if (anag.good() && (t1 != t || s1 != s))
|
if (anag.good() && (t1 != t || s1 != s))
|
||||||
f.message_box("Codice fiscale gia' utilizzato per il codice %c/%s",
|
f.message_box("Codice fiscale gia' utilizzato per il codice %c/%s",
|
||||||
t, (const char*)s);
|
t, (const char*)s);
|
||||||
// r->restore_status();
|
|
||||||
}
|
}
|
||||||
return TRUE ;
|
return TRUE ;
|
||||||
}
|
}
|
||||||
@ -494,10 +482,8 @@ bool no_dup_iva_g(TMask_field& f, KEY key)
|
|||||||
TMask* TPersone_app::get_mask(int mode)
|
TMask* TPersone_app::get_mask(int mode)
|
||||||
{
|
{
|
||||||
if (!changing_mask(mode)) return _msk[tip_msk()];
|
if (!changing_mask(mode)) return _msk[tip_msk()];
|
||||||
if (ana_fis())
|
if (ana_fis() && _msk[MSKF] == NULL)
|
||||||
{
|
{
|
||||||
if (_msk[MSKG] != NULL) delete _msk[MSKG];
|
|
||||||
_msk[MSKG] = NULL;
|
|
||||||
_msk[MSKF] = new TMask("ba4200b") ;
|
_msk[MSKF] = new TMask("ba4200b") ;
|
||||||
_msk[MSKF]->set_handler(F_STATO, stato_hnd);
|
_msk[MSKF]->set_handler(F_STATO, stato_hnd);
|
||||||
_msk[MSKF]->set_handler(FLD_AF1_PAIV, no_dup_iva_f);
|
_msk[MSKF]->set_handler(FLD_AF1_PAIV, no_dup_iva_f);
|
||||||
@ -511,19 +497,18 @@ TMask* TPersone_app::get_mask(int mode)
|
|||||||
_msk[MSKF]->set_handler(ba4200_handler);
|
_msk[MSKF]->set_handler(ba4200_handler);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
if (ana_giu() && _msk[MSKG] == NULL)
|
||||||
if (_msk[MSKF] != NULL) delete _msk[MSKF];
|
{
|
||||||
_msk[MSKF] = NULL;
|
_msk[MSKG] = new TMask("ba4200c") ;
|
||||||
_msk[MSKG] = new TMask("ba4200c") ;
|
_msk[MSKG]->set_handler(FLD_AG2_COMRES, gest_uff_imp);
|
||||||
_msk[MSKG]->set_handler(FLD_AG2_COMRES, gest_uff_imp);
|
_msk[MSKG]->set_handler(FLD_AG1_COMRF, gest_uff_imp);
|
||||||
_msk[MSKG]->set_handler(FLD_AG1_COMRF, gest_uff_imp);
|
_msk[MSKG]->set_handler(FLD_AG2_COMCORR, clear_cap);
|
||||||
_msk[MSKG]->set_handler(FLD_AG2_COMCORR, clear_cap);
|
// _msk[MSKG]->set_handler(FLD_AG1_COFI, no_dup_iva_g);
|
||||||
// _msk[MSKG]->set_handler(FLD_AG1_COFI, no_dup_iva_g);
|
_msk[MSKG]->set_handler(FLD_AG1_PAIV, no_dup_iva_g);
|
||||||
_msk[MSKG]->set_handler(FLD_AG1_PAIV, no_dup_iva_g);
|
_msk[MSKG]->set_handler(F_UFFCONC, uff_conc);
|
||||||
_msk[MSKG]->set_handler(F_UFFCONC, uff_conc);
|
_msk[MSKG]->set_handler(F_TITCF, tit_cf);
|
||||||
_msk[MSKG]->set_handler(F_TITCF, tit_cf);
|
_msk[MSKG]->set_handler(ba4200_handler);
|
||||||
_msk[MSKG]->set_handler(ba4200_handler);
|
}
|
||||||
}
|
|
||||||
return _msk[tip_msk()];
|
return _msk[tip_msk()];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -597,7 +582,7 @@ 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;
|
||||||
@ -606,7 +591,7 @@ int TPersone_app::read(TMask& m)
|
|||||||
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));
|
||||||
@ -627,7 +612,7 @@ int TPersone_app::write(const TMask& m)
|
|||||||
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)
|
||||||
|
@ -129,7 +129,6 @@ bool ba4300_handler(TMask& m, KEY k)
|
|||||||
if (appname.not_empty())
|
if (appname.not_empty())
|
||||||
{
|
{
|
||||||
TString body(16);
|
TString body(16);
|
||||||
// TLocalisamfile& d = app.get_relation()->lfile();
|
|
||||||
|
|
||||||
if (fldbrowse)
|
if (fldbrowse)
|
||||||
body << fldbrowse << "|";
|
body << fldbrowse << "|";
|
||||||
@ -144,16 +143,11 @@ bool ba4300_handler(TMask& m, KEY k)
|
|||||||
TMailbox mb;
|
TMailbox mb;
|
||||||
mb.send(msg);
|
mb.send(msg);
|
||||||
}
|
}
|
||||||
// d.setkey(1);
|
|
||||||
// d.zero();
|
|
||||||
// d.put("CODDITTA", m.get(FLD_GD1_CODDITTA));
|
|
||||||
// d.read(_isequal, _unlock) ;
|
|
||||||
TExternal_app a(appname);
|
TExternal_app a(appname);
|
||||||
const long oldditta = main_app().get_firm();
|
const long oldditta = main_app().get_firm();
|
||||||
if (k == K_F8) main_app().set_firm(m.get_long(FLD_GD1_CODDITTA));
|
if (k == K_F8) main_app().set_firm(m.get_long(FLD_GD1_CODDITTA));
|
||||||
a.run();
|
a.run();
|
||||||
if (k == K_F8) main_app().set_firm(oldditta);
|
if (k == K_F8) main_app().set_firm(oldditta);
|
||||||
// d.read(_iscurr, _lock) ;
|
|
||||||
m.set_focus();
|
m.set_focus();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -216,7 +210,7 @@ void TDitte_application::set_att_prev(const TMask& m)
|
|||||||
_attiv->put(CODATT, _oldattprev);
|
_attiv->put(CODATT, _oldattprev);
|
||||||
if (_attiv->read(_isequal, _lock) == NOERR)
|
if (_attiv->read(_isequal, _lock) == NOERR)
|
||||||
{
|
{
|
||||||
_attiv->put("ATTPREV", FALSE);
|
_attiv->put("ATTPREV", bool(FALSE));
|
||||||
if (_attiv->rewrite() != NOERR)
|
if (_attiv->rewrite() != NOERR)
|
||||||
error_box("Non posso aggiornare l'attivita' prevalente precedente : errore n. %d", _attiv->status());
|
error_box("Non posso aggiornare l'attivita' prevalente precedente : errore n. %d", _attiv->status());
|
||||||
}
|
}
|
||||||
@ -239,7 +233,7 @@ void TDitte_application::set_att_prev(const TMask& m)
|
|||||||
if (tabatt.read() == NOERR)
|
if (tabatt.read() == NOERR)
|
||||||
_attiv->put(DESCR, tabatt.get(S0)) ;
|
_attiv->put(DESCR, tabatt.get(S0)) ;
|
||||||
}
|
}
|
||||||
_attiv->put("ATTPREV", TRUE) ;
|
_attiv->put("ATTPREV", bool(TRUE)) ;
|
||||||
if (itwas)
|
if (itwas)
|
||||||
{
|
{
|
||||||
if (_attiv->rewrite() != NOERR)
|
if (_attiv->rewrite() != NOERR)
|
||||||
|
@ -24,23 +24,26 @@ public:
|
|||||||
|
|
||||||
HIDDEN bool clear_cap(TMask_field& f, KEY key)
|
HIDDEN bool clear_cap(TMask_field& f, KEY key)
|
||||||
{
|
{
|
||||||
if (f.mask().query_mode())
|
if (!f.mask().query_mode() && key == K_TAB)
|
||||||
return TRUE;
|
{
|
||||||
TMask& msk = f.mask() ;
|
TMask& msk = f.mask() ;
|
||||||
const short dlg = f.dlg();
|
const TString16 val(f.get());
|
||||||
|
const bool com_ulc = f.dlg() == FLD_UL1_COMULC;
|
||||||
|
|
||||||
if (dlg != FLD_UL1_COMULC && !f.to_check(key, TRUE))
|
if (val.empty())
|
||||||
return TRUE;
|
{
|
||||||
|
msk.set(com_ulc ? FLD_UL1_CAPULC : FLD_UL2_CAPTRIB, "", TRUE);
|
||||||
const TString16 val(f.get());
|
if (com_ulc)
|
||||||
const int capid = dlg == FLD_UL1_COMULC ? FLD_UL1_CAPULC : FLD_UL2_CAPTRIB;
|
{
|
||||||
|
msk.reset(-7);
|
||||||
if (val.empty())
|
msk.set(FLD_UL1_COMULC_COMUNI_PROVCOM, "", TRUE);
|
||||||
msk.set(capid, "");
|
}
|
||||||
|
msk.set(com_ulc ? FLD_UL1_COMULC_COMUNI_DENCOM : FLD_UL2_COMTRIB_COMUNI_DENCOM, "", TRUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool BA4400_application::user_create()
|
bool BA4400_application::user_create()
|
||||||
{
|
{
|
||||||
_msk = new TMask("ba4400a") ;
|
_msk = new TMask("ba4400a") ;
|
||||||
|
106
ba/ba4500.cpp
106
ba/ba4500.cpp
@ -43,54 +43,56 @@ bool TAttivita_application::gest_res(TMask_field& f, KEY key)
|
|||||||
msk.set( FLD_AT2_DEP_ANAGR_COMUNI_DESCR , "" ) ;
|
msk.set( FLD_AT2_DEP_ANAGR_COMUNI_DESCR , "" ) ;
|
||||||
msk.set( FLD_AT2_DEP_ANAGR_COMUNI_PROV , "" ) ;
|
msk.set( FLD_AT2_DEP_ANAGR_COMUNI_PROV , "" ) ;
|
||||||
}
|
}
|
||||||
if (!f.to_check(key)) return TRUE;
|
if (f.to_check(key))
|
||||||
|
|
||||||
TLocalisamfile & anag = *app()._anag;
|
|
||||||
TLocalisamfile & comuni = *app()._comuni;
|
|
||||||
|
|
||||||
anag.setkey(1);
|
|
||||||
anag.zero();
|
|
||||||
anag.put(N_TIPOA, msk.get(LST_AT2_TIPOADS));
|
|
||||||
anag.put(N_CODANAGR, msk.get(FLD_AT2_CODANGRDS));
|
|
||||||
if (anag.read() != NOERR)
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
TArray comarr(2), f1(2), f2(2), f3(2);
|
|
||||||
TString cod_com = anag.get(N_CODCOMRF);
|
|
||||||
|
|
||||||
msk.set( FLD_AT2_CODANGRDS_ANAGR_RAGSOC , anag.get(N_RAGSOC) ) ;
|
|
||||||
comarr.add(cod_com);
|
|
||||||
cod_com = anag.get(N_CODCOMRES);
|
|
||||||
comarr.add(cod_com);
|
|
||||||
cod_com = N_INDRF;
|
|
||||||
f1.add(cod_com);
|
|
||||||
cod_com = N_CIVRF;
|
|
||||||
f2.add(cod_com);
|
|
||||||
cod_com = N_CAPRF;
|
|
||||||
f3.add(cod_com);
|
|
||||||
cod_com = N_INDRES;
|
|
||||||
f1.add(cod_com);
|
|
||||||
cod_com = N_CIVRES;
|
|
||||||
f2.add(cod_com);
|
|
||||||
cod_com = N_CAPRES;
|
|
||||||
f3.add(cod_com);
|
|
||||||
|
|
||||||
for (int i = 0; i < comarr.items(); i++)
|
|
||||||
{
|
{
|
||||||
cod_com = (TString&) comarr[i];
|
|
||||||
if ( cod_com.not_empty() )
|
TLocalisamfile & anag = *app()._anag;
|
||||||
|
TLocalisamfile & comuni = *app()._comuni;
|
||||||
|
|
||||||
|
anag.setkey(1);
|
||||||
|
anag.zero();
|
||||||
|
anag.put(N_TIPOA, msk.get(LST_AT2_TIPOADS));
|
||||||
|
anag.put(N_CODANAGR, msk.get(FLD_AT2_CODANGRDS));
|
||||||
|
if (anag.read() != NOERR)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
TArray comarr(2), f1(2), f2(2), f3(2);
|
||||||
|
TString cod_com = anag.get(N_CODCOMRF);
|
||||||
|
|
||||||
|
msk.set( FLD_AT2_CODANGRDS_ANAGR_RAGSOC , anag.get(N_RAGSOC) ) ;
|
||||||
|
comarr.add(cod_com);
|
||||||
|
cod_com = anag.get(N_CODCOMRES);
|
||||||
|
comarr.add(cod_com);
|
||||||
|
cod_com = N_INDRF;
|
||||||
|
f1.add(cod_com);
|
||||||
|
cod_com = N_CIVRF;
|
||||||
|
f2.add(cod_com);
|
||||||
|
cod_com = N_CAPRF;
|
||||||
|
f3.add(cod_com);
|
||||||
|
cod_com = N_INDRES;
|
||||||
|
f1.add(cod_com);
|
||||||
|
cod_com = N_CIVRES;
|
||||||
|
f2.add(cod_com);
|
||||||
|
cod_com = N_CAPRES;
|
||||||
|
f3.add(cod_com);
|
||||||
|
|
||||||
|
for (int i = 0; i < comarr.items(); i++)
|
||||||
{
|
{
|
||||||
comuni.zero() ;
|
cod_com = (TString&) comarr[i];
|
||||||
comuni.put(N_COM, cod_com );
|
if ( cod_com.not_empty() )
|
||||||
comuni.setkey(1) ;
|
|
||||||
if (comuni.read() == NOERR)
|
|
||||||
{
|
{
|
||||||
msk.set( FLD_AT2_ANAGR_DEP_IND , (const char*) anag.get((TString&) f1[i]) ) ;
|
comuni.zero() ;
|
||||||
msk.set( FLD_AT2_ANAGR_DEP_CIV , (const char*) anag.get((TString&) f2[i]) ) ;
|
comuni.put(N_COM, cod_com );
|
||||||
msk.set( FLD_AT2_ANAGR_DEP_CAP , (const char*) anag.get((TString&) f3[i]) ) ;
|
comuni.setkey(1) ;
|
||||||
msk.set( FLD_AT2_DEP_ANAGR_COMUNI_DESCR , (const char*) comuni.get(N_DENCOM) ) ;
|
if (comuni.read() == NOERR)
|
||||||
msk.set( FLD_AT2_DEP_ANAGR_COMUNI_PROV , (const char*) comuni.get(N_PROV) ) ;
|
{
|
||||||
break;
|
msk.set( FLD_AT2_ANAGR_DEP_IND , (const char*) anag.get((TString&) f1[i]) ) ;
|
||||||
|
msk.set( FLD_AT2_ANAGR_DEP_CIV , (const char*) anag.get((TString&) f2[i]) ) ;
|
||||||
|
msk.set( FLD_AT2_ANAGR_DEP_CAP , (const char*) anag.get((TString&) f3[i]) ) ;
|
||||||
|
msk.set( FLD_AT2_DEP_ANAGR_COMUNI_DESCR , (const char*) comuni.get(N_DENCOM) ) ;
|
||||||
|
msk.set( FLD_AT2_DEP_ANAGR_COMUNI_PROV , (const char*) comuni.get(N_PROV) ) ;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -99,14 +101,14 @@ bool TAttivita_application::gest_res(TMask_field& f, KEY key)
|
|||||||
|
|
||||||
HIDDEN bool clear_cap(TMask_field& f, KEY key)
|
HIDDEN bool clear_cap(TMask_field& f, KEY key)
|
||||||
{
|
{
|
||||||
if (f.mask().query_mode() || !f.to_check(key, TRUE))
|
if (!f.mask().query_mode() && key == K_TAB)
|
||||||
return TRUE;
|
{
|
||||||
|
TMask& msk = f.mask() ;
|
||||||
|
const TString16 val(f.get());
|
||||||
|
|
||||||
TMask& msk = f.mask() ;
|
if (val.empty())
|
||||||
const TString16 val(f.get());
|
msk.set(FLD_AT2_CAPCS, "");
|
||||||
|
}
|
||||||
if (val.empty())
|
|
||||||
msk.set(FLD_AT2_CAPCS, "");
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,8 +23,11 @@ public:
|
|||||||
virtual ~TSoci_application() {}
|
virtual ~TSoci_application() {}
|
||||||
virtual void init_query_mode(TMask& m) ;
|
virtual void init_query_mode(TMask& m) ;
|
||||||
virtual void init_query_insert_mode(TMask& m) ;
|
virtual void init_query_insert_mode(TMask& m) ;
|
||||||
|
virtual void init_modify_mode(TMask& m) ;
|
||||||
|
virtual void init_insert_mode(TMask& m) { init_modify_mode(m) ; }
|
||||||
virtual int rewrite(const TMask& m);
|
virtual int rewrite(const TMask& m);
|
||||||
virtual int write(const TMask& m);
|
virtual int write(const TMask& m);
|
||||||
|
virtual bool remove();
|
||||||
virtual void update_ap_socio(const TMask& m);
|
virtual void update_ap_socio(const TMask& m);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -34,6 +37,7 @@ void TSoci_application::init_query_mode(TMask& m)
|
|||||||
m.show(FLD_SC1_CODANAGRSOH);
|
m.show(FLD_SC1_CODANAGRSOH);
|
||||||
m.hide(FLD_SC1_CODANAGRSO);
|
m.hide(FLD_SC1_CODANAGRSO);
|
||||||
m.set(FLD_SC1_CODANAGR_ANAGR_RAGSOC, "");
|
m.set(FLD_SC1_CODANAGR_ANAGR_RAGSOC, "");
|
||||||
|
m.enable(FLD_SC1_CODANAGR_ANAGR_RAGSOC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -45,12 +49,18 @@ void TSoci_application::init_query_insert_mode(TMask& m)
|
|||||||
m.set(FLD_SC1_CODANAGR_ANAGR_RAGSOC, "");
|
m.set(FLD_SC1_CODANAGR_ANAGR_RAGSOC, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TSoci_application::init_modify_mode(TMask& m)
|
||||||
|
|
||||||
|
{
|
||||||
|
m.disable(FLD_SC1_CODANAGR_ANAGR_RAGSOC);
|
||||||
|
}
|
||||||
|
|
||||||
void TSoci_application::update_ap_socio(const TMask& m)
|
void TSoci_application::update_ap_socio(const TMask& m)
|
||||||
{
|
{
|
||||||
int err = NOERR;
|
int err = NOERR;
|
||||||
const char ap = (m.get(FLD_SC1_ANNO)[0] == 'A') ? 'P' : 'A';
|
const char ap = (m.get(FLD_SC1_ANNO)[0] == 'A') ? 'P' : 'A';
|
||||||
|
|
||||||
if (yesno_box(format("Aggiornare anche il socio %s?", ap == 'A' ? "attuale" : "precedente")))
|
if (yesno_box(format("Aggiornare il socio anche per l' anno %s?", ap == 'A' ? "in corso" : "precedente")))
|
||||||
{
|
{
|
||||||
_rel->save_status();
|
_rel->save_status();
|
||||||
m.autosave(*_rel);
|
m.autosave(*_rel);
|
||||||
@ -61,7 +71,7 @@ void TSoci_application::update_ap_socio(const TMask& m)
|
|||||||
if (was) err = _rel->rewrite();
|
if (was) err = _rel->rewrite();
|
||||||
else err = _rel->write();
|
else err = _rel->write();
|
||||||
if (err != NOERR)
|
if (err != NOERR)
|
||||||
error_box("Aggiornamento socio %s - Errore : %d", ap == 'A' ? "attuale" : "precedente", err);
|
error_box("Aggiornamento socio anno %s - Errore : %d", ap == 'A' ? "in corso" : "precedente", err);
|
||||||
_rel->restore_status();
|
_rel->restore_status();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -82,6 +92,25 @@ int TSoci_application::rewrite(const TMask& m)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TSoci_application::remove()
|
||||||
|
{
|
||||||
|
const char ap = (curr_mask().get(FLD_SC1_ANNO)[0] == 'A') ? 'P' : 'A';
|
||||||
|
|
||||||
|
if (yesno_box(format("Cancellare il socio anche per l' anno %s?", ap == 'A' ? "in corso" : "precedente")))
|
||||||
|
{
|
||||||
|
_rel->save_status();
|
||||||
|
_rel->lfile().put("ATTPREC", ap);
|
||||||
|
if (_rel->read(_isequal, _lock) == NOERR)
|
||||||
|
{
|
||||||
|
const int err = _rel->remove();
|
||||||
|
if (err != NOERR)
|
||||||
|
error_box("Cancellazione socio anno %s - Errore : %d", ap == 'A' ? "in corso" : "precedente", err);
|
||||||
|
}
|
||||||
|
_rel->restore_status();
|
||||||
|
}
|
||||||
|
return TRelation_application::remove();
|
||||||
|
}
|
||||||
|
|
||||||
bool TSoci_application::user_create()
|
bool TSoci_application::user_create()
|
||||||
{
|
{
|
||||||
_rel = new TRelation(LF_SOCI) ;
|
_rel = new TRelation(LF_SOCI) ;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user