Files correlati : ve0 Ricompilazione Demo : [ ] Commento : Aggiunta gestione tabelle di modulo ve git-svn-id: svn://10.65.10.50/trunk@18394 c028cbd2-c16b-5b4b-a496-9718f37d4682
67 lines
1.5 KiB
C++
Executable File
67 lines
1.5 KiB
C++
Executable File
#include "ve0.h"
|
|
|
|
#include <automask.h>
|
|
#include <modtbapp.h>
|
|
|
|
///////////////////////////////////////////////////////////
|
|
// Maschera di gestione tabella CVM:
|
|
// Condizioni di vendita per categoria e gruppo merceologico
|
|
///////////////////////////////////////////////////////////
|
|
|
|
class TCVM_mask : public TAutomask
|
|
{
|
|
protected:
|
|
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
|
|
|
public:
|
|
int load(const TRectype& head) { return 0; }
|
|
TCVM_mask() : TAutomask("vetbcvm") {}
|
|
};
|
|
|
|
bool TCVM_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
///////////////////////////////////////////////////////////
|
|
// Applicazione per gestione maschere di modulo
|
|
///////////////////////////////////////////////////////////
|
|
|
|
class TVE_tab_mod_app : public TTable_module_application
|
|
{
|
|
protected:
|
|
virtual TMask* user_create_mask();
|
|
virtual int read(TMask& m);
|
|
|
|
public:
|
|
const TString& table_name() const;
|
|
};
|
|
|
|
const TString& TVE_tab_mod_app::table_name() const
|
|
{
|
|
TRelation* rel = get_relation();
|
|
return rel->curr().get("COD");
|
|
}
|
|
|
|
TMask* TVE_tab_mod_app::user_create_mask()
|
|
{
|
|
if (table_name() == "CVM")
|
|
return new TCVM_mask;
|
|
return TTable_module_application::user_create_mask();
|
|
}
|
|
|
|
int TVE_tab_mod_app::read(TMask& m)
|
|
{
|
|
if (table_name() == "CVM")
|
|
return ((TCVM_mask&)m).load(get_relation()->curr());
|
|
return TTable_module_application::read(m);
|
|
}
|
|
|
|
int ve0600(int argc, char* argv[])
|
|
{
|
|
TVE_tab_mod_app a;
|
|
a.run(argc, argv, TR("Tabelle module vendite"));
|
|
return 0;
|
|
}
|
|
|