campo-sirio/ve/ve0600.cpp
guy ea275165bd Patch level :
Files correlati     :
Ricompilazione Demo : [ ]
Commento            :


git-svn-id: svn://10.65.10.50/trunk@18392 c028cbd2-c16b-5b4b-a496-9718f37d4682
2009-03-02 11:13:06 +00:00

65 lines
1.4 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:
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();
public:
const TString& table_name() const;
};
const TString& TVE_tab_mod_app::table_name() const
{
TRelation* rel = get_relation();
return get_tmp_string() = rel->lfile().name();
}
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).read_mask(*get_realtion());
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;
}