96f33c01ee
Files correlati : ve6.exe Ricompilazione Demo : [ ] Commento : Riportata la versione 3.1 patch 979 git-svn-id: svn://10.65.10.50/trunk@15623 c028cbd2-c16b-5b4b-a496-9718f37d4682
99 lines
1.9 KiB
C++
Executable File
99 lines
1.9 KiB
C++
Executable File
#include <execp.h>
|
|
#include <relapp.h>
|
|
#include <tabutil.h>
|
|
|
|
#include "771295.h"
|
|
#include <nditte.h>
|
|
|
|
class TDettaglio_H_app : public TRelation_application
|
|
{
|
|
TRelation * _rel;
|
|
TMask * _msk;
|
|
|
|
int _mode; // Modo maschera corrente
|
|
long _codditta;
|
|
int _anno;
|
|
TString _ente;
|
|
|
|
protected:
|
|
virtual bool user_create();
|
|
virtual bool user_destroy();
|
|
|
|
virtual TRelation* get_relation() const { return _rel; }
|
|
virtual TMask* get_mask(int mode);
|
|
virtual bool changing_mask(int mode) {return FALSE; }
|
|
|
|
// void init_mask(TMask&);
|
|
//virtual void init_query_mode(TMask&);
|
|
//virtual void init_modify_mode(TMask&);
|
|
//virtual void init_insert_mode(TMask&);
|
|
//virtual void init_query_insert_mode(TMask&);
|
|
|
|
public:
|
|
bool almeno_un_dettaglio(TMask&);
|
|
static bool generazione(TMask_field& f , KEY k);
|
|
static bool dettaglio (TMask_field& f , KEY k);
|
|
static bool descr_ente (TMask_field& f , KEY k);
|
|
|
|
TDettaglio_H_app() {}
|
|
};
|
|
|
|
bool TDettaglio_H_app::descr_ente (TMask_field& f , KEY k)
|
|
{
|
|
if (k == K_TAB || k == K_SPACE)
|
|
{
|
|
TTable ent ("%ENT");
|
|
TString16 dep;
|
|
TString descr;
|
|
|
|
int ente = atoi(f.get());
|
|
dep.format("%d", ente);
|
|
|
|
ent.zero();
|
|
ent.put("CODTAB", dep);
|
|
if (ent.read() == NOERR)
|
|
descr = ent.get("S0");
|
|
else
|
|
descr = "";
|
|
|
|
f.mask().set(F_DESCRENTE, descr);
|
|
}
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
TMask* TDettaglio_H_app::get_mask(int mode)
|
|
{
|
|
return _msk;
|
|
}
|
|
|
|
bool TDettaglio_H_app::user_create()
|
|
{
|
|
_rel = new TRelation (LF_DETH);
|
|
|
|
_msk = new TMask("771295a");
|
|
|
|
_msk->set_handler(F_ENTE, descr_ente);
|
|
|
|
set_search_field(F_DATAVERS);
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
bool TDettaglio_H_app::user_destroy()
|
|
{
|
|
delete _msk;
|
|
delete _rel;
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
int m71295(int argc, char* argv[])
|
|
{
|
|
TDettaglio_H_app a;
|
|
a.run(argc, argv, "Dettaglio Quadro H");
|
|
return 0;
|
|
}
|
|
|
|
|