2011-01-27 15:16:23 +00:00
|
|
|
// gestione tabelle di modulo hardy
|
|
|
|
|
|
|
|
#include <automask.h>
|
|
|
|
#include <modtbapp.h>
|
|
|
|
#include <tabutil.h>
|
|
|
|
|
|
|
|
#include "hatbcau.h"
|
2011-03-01 09:48:27 +00:00
|
|
|
#include "hatbcel.h"
|
2011-01-27 15:16:23 +00:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
// Maschera generica di gestione tabelle hardy
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
class THA_table_mask : public TAutomask
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
virtual bool on_field_event(TOperable_field &o, TField_event e, long jolly);
|
|
|
|
|
|
|
|
public:
|
|
|
|
THA_table_mask(const char* name) : TAutomask(name) {}
|
|
|
|
};
|
|
|
|
|
|
|
|
bool THA_table_mask::on_field_event(TOperable_field &o, TField_event e, long jolly)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
// Applicazione generica di gestione tabelle hardy
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
// applicazione per la gestione delle tabelle di lavanderia
|
|
|
|
class THA_table_app : public TTable_module_application
|
|
|
|
{
|
|
|
|
protected: // TRelation_application
|
2011-03-01 09:48:27 +00:00
|
|
|
virtual void init_query_mode(TMask& m);
|
|
|
|
virtual void init_query_insert_mode(TMask& m);
|
2011-01-27 15:16:23 +00:00
|
|
|
};
|
|
|
|
|
2011-03-01 09:48:27 +00:00
|
|
|
void THA_table_app::init_query_mode(TMask& m)
|
2011-01-27 15:16:23 +00:00
|
|
|
{
|
|
|
|
const TString4 name = get_relation()->file(0).name();
|
2011-03-01 09:48:27 +00:00
|
|
|
if (name == "CEL")
|
|
|
|
{
|
|
|
|
m.hide(F_CODCLI1);
|
|
|
|
m.show(F_CODCLI);
|
|
|
|
}
|
2011-01-27 15:16:23 +00:00
|
|
|
}
|
|
|
|
|
2011-03-01 09:48:27 +00:00
|
|
|
void THA_table_app::init_query_insert_mode(TMask& m)
|
2011-01-27 15:16:23 +00:00
|
|
|
{
|
|
|
|
const TString4 name = get_relation()->file(0).name();
|
2011-03-01 09:48:27 +00:00
|
|
|
if (name == "CEL")
|
|
|
|
{
|
|
|
|
m.hide(F_CODCLI);
|
|
|
|
m.show(F_CODCLI1);
|
|
|
|
}
|
2011-01-27 15:16:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int ha0100(int argc, char* argv[])
|
|
|
|
{
|
|
|
|
THA_table_app a;
|
|
|
|
a.run(argc, argv, TR("Tabella Caffe' Hardy"));
|
|
|
|
return 0;
|
|
|
|
}
|