Patch level : 10.0
Files correlati : Ricompilazione Demo : [ ] Commento : chiamata alla stampa avanzata doc. con nuovi parametri per stampare i documenti elencati in un file git-svn-id: svn://10.65.10.50/trunk@19711 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
9e3a430923
commit
1b654686d6
@ -56,11 +56,11 @@ class TStampaBuoni_app: public TSkeleton_application
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
virtual void main_loop();
|
virtual void main_loop();
|
||||||
void elabora(const TMask& mask) const;
|
void elabora(const TMask& mask, const char action) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void TStampaBuoni_app::elabora(const TMask& mask) const
|
void TStampaBuoni_app::elabora(const TMask& mask, const char action) const
|
||||||
{
|
{
|
||||||
const TDate data_from = mask.get_date(F_DATA_FROM);
|
const TDate data_from = mask.get_date(F_DATA_FROM);
|
||||||
TString query = "USE DOC \n"
|
TString query = "USE DOC \n"
|
||||||
@ -91,14 +91,24 @@ void TStampaBuoni_app::elabora(const TMask& mask) const
|
|||||||
{
|
{
|
||||||
TFilename tmp; tmp.temp();
|
TFilename tmp; tmp.temp();
|
||||||
ofstream outf(tmp);
|
ofstream outf(tmp);
|
||||||
|
|
||||||
|
outf << "[Transaction]" << endl;
|
||||||
|
outf << "Action=" << action << endl;
|
||||||
|
outf << "Mode=P" << endl;
|
||||||
|
outf << "[33]" << endl;
|
||||||
|
|
||||||
|
long nx=0;
|
||||||
|
|
||||||
const long items = sht.items();
|
const long items = sht.items();
|
||||||
for (long i = 0L; i<items; i++)
|
for (long i = 0L; i<items; i++)
|
||||||
if (sht.checked(i))
|
if (sht.checked(i))
|
||||||
|
{
|
||||||
|
outf << "Doc(" << (nx++) << ")=";
|
||||||
outf << chiavedoc << sht.row(i).get_long(1) << endl;
|
outf << chiavedoc << sht.row(i).get_long(1) << endl;
|
||||||
|
}
|
||||||
outf.close();
|
outf.close();
|
||||||
|
|
||||||
TString80 appname = "ve1.exe -2";
|
TFilename appname = "ve1.exe -2 -i";
|
||||||
appname << tmp;
|
appname << tmp;
|
||||||
TExternal_app app(appname);
|
TExternal_app app(appname);
|
||||||
app.run();
|
app.run();
|
||||||
@ -109,8 +119,17 @@ void TStampaBuoni_app::elabora(const TMask& mask) const
|
|||||||
void TStampaBuoni_app::main_loop()
|
void TStampaBuoni_app::main_loop()
|
||||||
{
|
{
|
||||||
TStampaBuoni_mask m;
|
TStampaBuoni_mask m;
|
||||||
while(m.run()==K_ENTER)
|
bool running = true;
|
||||||
elabora(m);
|
while (running)
|
||||||
|
{
|
||||||
|
const KEY k = m.run();
|
||||||
|
switch (k)
|
||||||
|
{
|
||||||
|
case K_ENTER: elabora(m, 'P'); break;
|
||||||
|
case 'A': elabora(m, 'A'); break;
|
||||||
|
default: running = false; break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int lv1100(int argc, char* argv[])
|
int lv1100(int argc, char* argv[])
|
||||||
|
@ -1,7 +1,25 @@
|
|||||||
#include "lv1100a.h"
|
#include "lv1100a.h"
|
||||||
|
|
||||||
TOOLBAR "" 0 0 0 2
|
TOOLBAR "" 0 0 0 2
|
||||||
#include <elabar.h>
|
BUTTON DLG_PRINT 10 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 1 "~Stampa"
|
||||||
|
MESSAGE EXIT,K_ENTER
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_SETPRINT 10 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 1 "~Imposta"
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_PREVIEW 10 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT 3 1 "~Anteprima"
|
||||||
|
PICTURE TOOL_PREVIEW
|
||||||
|
MESSAGE EXIT,65
|
||||||
|
END
|
||||||
|
#include <helpbar.h>
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Stampa Buoni" -1 -1 40 5
|
PAGE "Stampa Buoni" -1 -1 40 5
|
||||||
|
Loading…
x
Reference in New Issue
Block a user