campo-sirio/ci/ci0100.cpp

78 lines
2.0 KiB
C++
Raw Normal View History

// gestione tabelle contabilita' ind.
#include <automask.h>
#include <modtbapp.h>
#include <tabapp.h>
#include "citbore.h"
///////////////////////////////////////////////////////////
// Maschera generica di gestione tabelle cont/ industriale
///////////////////////////////////////////////////////////
class TCI_table_mask : public TAutomask
{
protected:
virtual bool on_field_event(TOperable_field &o, TField_event e, long jolly);
public:
TCI_table_mask(const char* name) : TAutomask(name) {}
};
bool TCI_table_mask::on_field_event(TOperable_field &o, TField_event e, long jolly)
{
return true;
}
///////////////////////////////////////////////////////////
// Applicazione generica di gestione tabelle cont. ind.
///////////////////////////////////////////////////////////
// applicazione per la gestione delle tabelle di cont. ind.
class TCI_table_app : public TTable_module_application
{
protected: // TRelation_application
virtual TMask* user_create_mask();
virtual int write(const TMask& m);
virtual int rewrite(const TMask& m);
public:
};
// Ridefinire questo metodo per le eventuali maschere speciali
// che abbiano controlli speciali da effettuare nella on_field_evebt
TMask* TCI_table_app::user_create_mask()
{
const TString4 name = get_relation()->file(0).name();
if (name == "???")
return new TCI_table_mask("???");
// Le maschere normali sono gia' gestite dalla TTable_module_application
return TTable_module_application::user_create_mask();
}
// Ridefinizione del metodo write
int TCI_table_app::write(const TMask& m)
{
const TString4 name = get_relation()->file(0).name();
if (name == "???")
{
}
return TTable_module_application::write(m);
}
// Ridefinizione del metodo rewrite
int TCI_table_app::rewrite(const TMask& m)
{
const TString4 name = get_relation()->file(0).name();
if (name == "???")
{
}
return TTable_module_application::rewrite(m);
}
int ci0100(int argc, char* argv[])
{
TCI_table_app a;
a.run(argc, argv, TR("Tabella Cont. Ind. "));
return 0;
}