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:
cris 2009-12-02 12:18:12 +00:00
parent 9e3a430923
commit 1b654686d6
2 changed files with 43 additions and 6 deletions

View File

@ -56,11 +56,11 @@ class TStampaBuoni_app: public TSkeleton_application
{
protected:
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);
TString query = "USE DOC \n"
@ -91,14 +91,24 @@ void TStampaBuoni_app::elabora(const TMask& mask) const
{
TFilename tmp; tmp.temp();
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();
for (long i = 0L; i<items; i++)
if (sht.checked(i))
{
outf << "Doc(" << (nx++) << ")=";
outf << chiavedoc << sht.row(i).get_long(1) << endl;
}
outf.close();
TString80 appname = "ve1.exe -2";
TFilename appname = "ve1.exe -2 -i";
appname << tmp;
TExternal_app app(appname);
app.run();
@ -109,8 +119,17 @@ void TStampaBuoni_app::elabora(const TMask& mask) const
void TStampaBuoni_app::main_loop()
{
TStampaBuoni_mask m;
while(m.run()==K_ENTER)
elabora(m);
bool running = true;
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[])

View File

@ -1,7 +1,25 @@
#include "lv1100a.h"
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
PAGE "Stampa Buoni" -1 -1 40 5