Patch level :10.0

Files correlati     :
Ricompilazione Demo : [ ]
Commento            : Stampe Planning


git-svn-id: svn://10.65.10.50/trunk@17236 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
sperego 2008-09-12 13:30:15 +00:00
parent 47eef1988b
commit 527ac3529c
6 changed files with 197 additions and 0 deletions

View File

@ -9,6 +9,7 @@ int main(int argc, char** argv)
{
case 0: lv2100(argc, argv); break; //generazione automatica del planning
case 1: lv2200(argc, argv); break; //manipolazione e stampa del planning
case 2: lv2300(argc, argv); break; //stampe planning
default: lv2100(argc, argv); break; //generazione automatica del planning
}
return 0;

View File

@ -3,5 +3,7 @@
int lv2100(int argc, char* argv[]);
int lv2200(int argc, char* argv[]);
int lv2300(int argc, char* argv[]);
#endif // __LV2_H

86
lv/lv2300.cpp Executable file
View File

@ -0,0 +1,86 @@
#include "lv0.h"
//#include "lv2300a.h"
#include <applicat.h>
#include <automask.h>
#include <modaut.h>
#include <progind.h>
#include <recarray.h>
#include <relation.h>
#include <reprint.h>
#include <tabutil.h>
#include <textset.h>
class TStampe_planning_mask : public TAutomask
{
private:
public:
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
TStampe_planning_mask (const char* name) : TAutomask(name) {}
};
bool TStampe_planning_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
{
return true;
}
class TStampe_planning_app : public TSkeleton_application
{
TStampe_planning_mask* _msk;
protected:
virtual bool create();
virtual bool destroy();
public:
bool transfer();
virtual void main_loop();
};
bool TStampe_planning_app::create()
{
_msk = new TStampe_planning_mask("lv2300a");
return TSkeleton_application::create();
}
bool TStampe_planning_app::destroy()
{
delete _msk;
return TApplication::destroy();
}
void TStampe_planning_app::main_loop()
{
TStampe_planning_app app;
while (_msk->run() != K_QUIT)
{
TReport_book book;
TReport rep;
TFilename report_name("lv2300a");
report_name.ext("rep");
book.add(rep);
if (book.pages() > 0)
{
book.print_or_preview();
}
}
}
int lv2300(int argc, char* argv[])
{
TStampe_planning_app app;
app.run(argc, argv, "Stampe Planning");
return 0;
}

4
lv/lv2300a.h Executable file
View File

@ -0,0 +1,4 @@
#define F_COD_ITI_FROM 201
#define F_DES_ITI_FROM 202
#define F_COD_ITI_TO 203
#define F_DES_ITI_TO 204

49
lv/lv2300a.rep Executable file
View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8" ?>
<report name="lv2300a" lpi="6">
<description>Stampa Planning per Itinerario</description>
<font face="Courier New" size="10" />
<section type="Head" />
<section type="Head" level="1" />
<section type="Head" level="2">
<groupby>CODITI</groupby>
<field y="1" type="Testo" width="10" pattern="1" text="Itinerario" />
<field x="15" y="1" type="Numero" align="right" width="6" pattern="1">
<source>167.CODITI</source>
</field>
<field x="25" y="1" type="Stringa" width="50" pattern="1">
<source>&#26;ITI.S0</source>
</field>
</section>
<section type="Head" level="3">
<groupby>CODAUT</groupby>
<field y="1" type="Testo" width="10" pattern="1" text="Autista" />
<field x="15" y="1" type="Stringa" width="2" pattern="1">
<source>167.CODAUT</source>
</field>
</section>
<section type="Head" level="4">
<groupby>DTCONS</groupby>
<field y="1" type="Testo" width="25" pattern="1" text="Data Ordine di Passaggio" />
<field x="30" y="1" type="Data" width="9.5" pattern="1">
<source>DTCONS</source>
</field>
</section>
<section type="Body">
<field y="197" type="Numero" align="right" width="3" pattern="1">
<source>CODITI</source>
</field>
</section>
<section type="Body" level="1">
<field x="1" y="1" type="Numero" align="right" width="3" pattern="1">
<source>CODITI</source>
</field>
</section>
<section type="Foot" />
<section type="Foot" level="1" />
<section type="Foot" level="2" />
<section type="Foot" level="3" />
<section type="Foot" level="4" />
<sql>USE 167
JOIN &#26;ITI INTO CODTAB==CODITI
</sql>
</report>

55
lv/lv2300a.uml Executable file
View File

@ -0,0 +1,55 @@
#include "lv2300a.h"
TOOLBAR "topbar" 0 0 0 2
#include "printbar.h"
ENDPAGE
PAGE "Stampa Planning per Itinerario" -1 -1 40 5
GROUPBOX DLG_NULL 76 5
BEGIN
PROMPT 1 1 "@b Parametri di Stampa"
END
STRING F_COD_ITI_FROM 3
BEGIN
PROMPT 2 2 "Da itinerario"
FLAGS "U"
USE &ITI KEY 1
INPUT CODTAB F_COD_ITI_FROM
DISPLAY "Codice" CODTAB
DISPLAY "Descrizione@50" S0
OUTPUT F_COD_ITI_FROM CODTAB
OUTPUT F_DES_ITI_FROM S0
CHECKTYPE SEARCH
FIELD #FROM
END
STRING F_DES_ITI_FROM 50
BEGIN
PROMPT 25 2 ""
FLAGS "D"
END
STRING F_COD_ITI_TO 3
BEGIN
PROMPT 2 3 "A codice "
FLAGS "U"
USE &ITI KEY 1
INPUT CODTAB F_COD_ITI_TO
DISPLAY "Codice" CODTAB
DISPLAY "Descrizione@50" S0
OUTPUT F_COD_ITI_TO CODTAB
OUTPUT F_DES_ITI_TO S0
CHECKTYPE SEARCH
FIELD #TO
END
STRING F_DES_ITI_TO 50
BEGIN
PROMPT 25 3 ""
FLAGS "D"
END
ENDPAGE
ENDMASK