Corretto passaggio da fisiche a giuridiche tramite bottone.
git-svn-id: svn://10.65.10.50/trunk@248 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
3d2dbf1fe6
commit
113424a344
@ -23,6 +23,7 @@ class BA4200_application : public TRelation_application
|
||||
TLocalisamfile* _comuni;
|
||||
TLocalisamfile* _tabcom;
|
||||
|
||||
protected:
|
||||
virtual bool user_create() ;
|
||||
virtual bool user_destroy() ;
|
||||
virtual int read(TMask& m);
|
||||
@ -35,6 +36,8 @@ class BA4200_application : public TRelation_application
|
||||
virtual TMask* get_mask(int mode) ;
|
||||
virtual void write_enable(const bool on = TRUE);
|
||||
|
||||
static bool ba4200_handler(TMask& m, KEY k);
|
||||
|
||||
public:
|
||||
virtual int write(const TMask& m);
|
||||
virtual TRelation* get_relation() const { return _rel[tip_msk()];}
|
||||
@ -52,15 +55,14 @@ public:
|
||||
virtual ~BA4200_application() {}
|
||||
};
|
||||
|
||||
bool ba4200_handler(TMask& m, KEY k)
|
||||
|
||||
bool BA4200_application::ba4200_handler(TMask& m, KEY k)
|
||||
{
|
||||
BA4200_application* app = (BA4200_application*) MainApp();
|
||||
BA4200_application& app = (BA4200_application&)main_app();
|
||||
|
||||
if (k == K_F10)
|
||||
{
|
||||
if (app->ana_fis()) app->set_tip_ana(TGIU);
|
||||
else app->set_tip_ana(TFIS);
|
||||
if (app.ana_fis()) app.set_tip_ana(TGIU);
|
||||
else app.set_tip_ana(TFIS);
|
||||
m.stop_run(K_ESC);
|
||||
return FALSE;
|
||||
}
|
||||
@ -68,29 +70,29 @@ bool ba4200_handler(TMask& m, KEY k)
|
||||
TToken_string body(16);
|
||||
|
||||
body.add(format("%d", FLD_GD1_CODDITTAH));
|
||||
if ( app->tip_ana() == TFIS )
|
||||
if ( app.tip_ana() == TFIS )
|
||||
{
|
||||
body.add(format("%d=F", FLD_GD1_TIPOA));
|
||||
body.add(format("%d=%s", FLD_GD1_CODANAGR, (const char*) app->cod_ana()));
|
||||
body.add(format("%d=%s", FLD_GD1_CODANAGR, (const char*) app.cod_ana()));
|
||||
}
|
||||
else
|
||||
{
|
||||
body.add(format("%d=G", FLD_GD1_TIPOA));
|
||||
body.add(format("%d=%s", FLD_GD1_CODANAGR, (const char*) app->cod_ana()));
|
||||
body.add(format("%d=%s", FLD_GD1_CODANAGR, (const char*) app.cod_ana()));
|
||||
}
|
||||
#if XVT_OS == XVT_OS_WIN
|
||||
TString cmd("ba4b -2");
|
||||
TString16 cmd("ba4b -2");
|
||||
#else
|
||||
TString cmd("ba4 -2");
|
||||
TString16 cmd("ba4 -2");
|
||||
#endif
|
||||
TMessage msg(cmd2name(cmd), MSG_FS, (const char*) body);
|
||||
TMailbox mb;
|
||||
mb.send(msg);
|
||||
TLocalisamfile* d = app->get_relation()->lfile();
|
||||
TLocalisamfile* d = app.get_relation()->lfile();
|
||||
|
||||
d->setkey(1);
|
||||
d->zero();
|
||||
d->put(N_TIPOA, app->ana_fis() ? "F" : "G");
|
||||
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);
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include <files.h>
|
||||
|
||||
#if XVT_OS == XVT_OS_SCOUNIX
|
||||
// extern "C" int mkdir(char*, int);
|
||||
#include <sys/stat.h>
|
||||
#else
|
||||
#include <direct.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user