campo-sirio/ci/ci0300.cpp
brugno 2881f95a20 Patch level :
Files correlati     :
Ricompilazione Demo : [ ]
Commento            :


git-svn-id: svn://10.65.10.50/trunk@12958 c028cbd2-c16b-5b4b-a496-9718f37d4682
2005-04-18 15:31:21 +00:00

203 lines
4.6 KiB
C++
Executable File

#include <applicat.h>
#include <automask.h>
#include <isam.h>
#include <mask.h>
#include <prefix.h>
#include <progind.h>
#include <relation.h>
#include <sheet.h>
#include <tabutil.h>
#include <nditte.h>
#include "ci0.h"
#include "ci0300.h"
class TSelezioneGiorno_mask : public TAutomask
{
TCursor_sheet* _sheet;
protected:
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
public:
TCursor_sheet& sheet() {return *_sheet;}
TSelezioneGiorno_mask();
~TSelezioneGiorno_mask();
};
bool TSelezioneGiorno_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
{
/*
switch (o.dlg())
{
case F_SCELTADITTE:
if (e == fe_button)
{
sheet().run();
set(F_DITTESELEZ, sheet().checked());
}
if (e == fe_close)
if (sheet().checked() == 0)
return error_box(TR("Non sono state selezionate ditte da convertire"));
break;
case F_DITTESELEZ:
if (e == fe_init)
o.set(sheet().checked());
break;
case F_MINISTERIALI:
if (e == fe_init)
{
TTable cgr("%CGR");
const bool empty = cgr.first() != NOERR;
o.set(empty ? "X": " ");
}
break;
default:
break;
}
*/
return TRUE;
}
TSelezioneGiorno_mask::TSelezioneGiorno_mask()
: TAutomask("ci0300")
{
// _sheet = new TCursor_sheet(_cur, " |CODDITTA|RAGSOC", TR("Selezione ditte"), HR("@1|Codice|Ragione sociale@50"), 0, 1);
// _sheet->check(-1);
}
TSelezioneGiorno_mask::~TSelezioneGiorno_mask()
{
delete _sheet;
}
class TImmissioneDocumenti: public TSkeleton_application
{
protected:
virtual bool create(void);
virtual void main_loop();
virtual bool destroy(void) ;
public:
TImmissioneDocumenti() {}
virtual ~TImmissioneDocumenti() {}
};
bool TImmissioneDocumenti::create()
{
return TSkeleton_application::create();
}
bool TImmissioneDocumenti::destroy()
{
return TSkeleton_application::destroy();
}
void TImmissioneDocumenti::main_loop()
{
/*
TSelezioneGiorno_mask msk;
if (msk.run() == K_ENTER && yesno_box(TR("Confermare la conversione dei cespiti?")))
{
msk.lista_ditte(_ditte);
if (_ditte.items() == 0)
{
warning_box(TR("Nessuna ditta selezionata"));
return;
}
open_log();
TString80 s;
write_log("");
write_log("**********************************");
s.format(TR("Conversione cespiti del %s"), (const char *) TDate(TODAY).string());
write_log(s);
write_log("**********************************");
write_log("");
const char* studio = prefix().get_studio();
const bool converti_ministeriali = msk.get_bool(F_MINISTERIALI);
// conversione archivi
TFilename file = studio;
file << "cesp/ammce";
conv_file(file, 136);
file = studio;
file << "cesp/ammmv";
conv_file(file, 137);
file = studio;
file << "cesp/catdi";
conv_file(file, 138);
file = studio;
file << "cesp/cespi";
conv_file(file, 139);
file = studio;
file << "cesp/movam";
conv_file(file, 141);
file = studio;
file << "cesp/movce";
conv_file(file, 142);
file = studio;
file << "cesp/salce";
conv_file(file, 143);
file = studio;
file << "cesp/coll01";
conv_inifile(file, "COLL01", 140);
// conversione tabelle
file = studio;
file << "cesp/ditcb";
conv_tab(file, "CCB");
file = studio;
file << "cesp/ditce";
conv_tab(file, "CCE");
file = studio;
file << "cesp/tabimp";
conv_tab(file, "CIM");
file = studio;
file << "cesp/tabloc";
conv_tab(file, "LOC");
if (converti_ministeriali)
{
file = studio;
file << "cesp/tabat";
conv_tab(file, "%CAT");
file = studio;
file << "cesp/tabca";
conv_tab(file, "%CAC");
file = studio;
file << "cesp/tabgr";
conv_tab(file, "%CGR");
file = studio;
file << "cesp/limit";
conv_tab(file, "%CLM");
file = studio;
file << "cesp/tmvce";
conv_tab(file, "%TMC");
}
// conversione parametri
file = studio;
file << "cesp/ditc01";
conv_par(file, "DITC01", CONFIG_DITTA);
file = studio;
file << "cesp/ditca";
conv_par(file, "DITCA", CONFIG_DITTA);
message_box("Conversione completata");
close_log();
}
*/
}
int ci0300(int argc, char* argv[])
{
TImmissioneDocumenti a ;
a.run(argc, argv, TR("Immissione Documenti"));
return 0;
}
int ci0400(int argc, char* argv[])
{
TImmissioneDocumenti a ;
a.run(argc, argv, TR("Immissione Documenti"));
return 0;
}