Patch level : 10.0
Files correlati : lv0 Ricompilazione Demo : [ ] Commento : Aggiunta gestione tabelle di modulo lavanderia Creata tabella MEZzi di trasporto (esempio) git-svn-id: svn://10.65.10.50/trunk@16941 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
be3aaff31b
commit
4a449096d8
@ -7,10 +7,9 @@ int main(int argc, char** argv)
|
||||
const int r = (argc > 1) ? argv[1][1] - '0' : 0;
|
||||
switch (r)
|
||||
{
|
||||
case 1: lv0200(argc,argv); break; //gestione contratti
|
||||
case 1: break; //gestione contratti
|
||||
case 2:
|
||||
default: lv0100(argc,argv); break; // gestione tabelle
|
||||
default: lv0100(argc, argv); break; // gestione tabelle
|
||||
}
|
||||
exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,68 +1,53 @@
|
||||
// gestione tabelle di magazzino
|
||||
// gestione tabelle lavanderie
|
||||
|
||||
#include <automask.h>
|
||||
#include <modaut.h>
|
||||
#include <relapp.h>
|
||||
#include <modtbapp.h>
|
||||
|
||||
class TMask_app_lav : public TAutomask
|
||||
///////////////////////////////////////////////////////////
|
||||
// Maschera generica di gestione tabelle lavanderie
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
class TLV_table_mask : public TAutomask
|
||||
{
|
||||
protected:
|
||||
virtual bool on_field_event(TOperable_field &o, TField_event e, long jolly);
|
||||
|
||||
public:
|
||||
TMask_app_lav() : TAutomask("lv0100a") {}
|
||||
TLV_table_mask(const char* name) : TAutomask(name) {}
|
||||
};
|
||||
|
||||
bool TMask_app_lav::on_field_event(TOperable_field &o, TField_event e, long jolly)
|
||||
bool TLV_table_mask::on_field_event(TOperable_field &o, TField_event e, long jolly)
|
||||
{
|
||||
switch(o.dlg())
|
||||
{
|
||||
//case F_CAMPO1:
|
||||
// break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// applicazione per la gestione delle tabelle di lavanderia
|
||||
class Tab_app_lav : public TRelation_application
|
||||
{
|
||||
TRelation* _rel;
|
||||
TMask_app_lav* _msk;
|
||||
///////////////////////////////////////////////////////////
|
||||
// Applicazione generica di gestione tabelle lavanderie
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
protected: // TRelation_application
|
||||
virtual bool user_create();
|
||||
|
||||
virtual bool user_destroy();
|
||||
virtual TRelation* get_relation() const {return _rel;}
|
||||
virtual TMask* get_mask(int mode) {return _msk;}
|
||||
// applicazione per la gestione delle tabelle di lavanderia
|
||||
class TLV_table_app : public TTable_module_application
|
||||
{
|
||||
protected: // TRelation_application
|
||||
virtual TMask* user_create_mask();
|
||||
|
||||
public:
|
||||
|
||||
};
|
||||
|
||||
HIDDEN inline Tab_app_lav& app() { return (Tab_app_lav&)main_app(); }
|
||||
|
||||
|
||||
bool Tab_app_lav::user_create()
|
||||
// Ridefinire questo metodo per le eventuali maschere speciali
|
||||
// che abbiano controlli speciali da effettuare nella on_field_evebt
|
||||
TMask* TLV_table_app::user_create_mask()
|
||||
{
|
||||
_rel = new TRelation("MEZ");
|
||||
_msk = new TMask_app_lav;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Tab_app_lav::user_destroy()
|
||||
{
|
||||
delete _msk;
|
||||
delete _rel;
|
||||
return true;
|
||||
const TString4 name = get_relation()->file(0).name();
|
||||
if (name == "???")
|
||||
return new TLV_table_mask("???");
|
||||
// Le maschere normali sono gia' gestite dalla TTable_module_application
|
||||
return TTable_module_application::user_create_mask();
|
||||
}
|
||||
|
||||
int lv0100(int argc, char* argv[])
|
||||
{
|
||||
Tab_app_lav a;
|
||||
a.run(argc, argv, TR("Mezzi di Trasporto"));
|
||||
TLV_table_app a;
|
||||
a.run(argc, argv, TR("Tabella Lavanderie"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//campi maschera lv0100a.uml (Tabella Mezzi di Trasporto)
|
||||
//campi maschera lvtbmez.uml (Tabella Mezzi di Trasporto)
|
||||
#define F_COD 150
|
||||
#define F_COD_MEZZO 151
|
||||
#define F_DES_MEZZO 152
|
@ -1,4 +1,4 @@
|
||||
#include "lv0100a.h"
|
||||
#include "lvtbmez.h"
|
||||
|
||||
TOOLBAR "" 0 0 0 2
|
||||
#include "Relapbar.h"
|
||||
@ -6,14 +6,6 @@ ENDPAGE
|
||||
|
||||
PAGE "Mezzi di Trasporto" -1 -1 78 10
|
||||
|
||||
LIST F_COD 3
|
||||
BEGIN
|
||||
PROMPT 1 1 ""
|
||||
ITEM "MEZ|MEZ"
|
||||
FLAGS "H"
|
||||
KEY 1
|
||||
END
|
||||
|
||||
STRING F_COD_MEZZO 2
|
||||
BEGIN
|
||||
PROMPT 1 2 "Codice Mezzo"
|
||||
@ -23,7 +15,7 @@ BEGIN
|
||||
USE MEZ
|
||||
INPUT CODTAB F_COD_MEZZO
|
||||
DISPLAY "Codice" CODTAB
|
||||
DISPLAY "Descrizione@35" S0
|
||||
DISPLAY "Descrizione@50" S0
|
||||
OUTPUT F_COD_MEZZO CODTAB
|
||||
OUTPUT F_DES_MEZZO S0
|
||||
CHECKTYPE REQUIRED
|
||||
@ -42,7 +34,7 @@ END
|
||||
STRING F_TARGA 12
|
||||
BEGIN
|
||||
PROMPT 1 4 "Targa"
|
||||
HELP "Inserire la Targa del mezzo."
|
||||
HELP "Targa del mezzo."
|
||||
FIELD S1
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
Loading…
x
Reference in New Issue
Block a user