Riportate modifiche a bainst da vecchia 11.0 a nuova 11.0
git-svn-id: svn://10.65.10.50/branches/R_10_00@22616 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
3a5a7d25d3
commit
7f2782af6f
@ -351,7 +351,12 @@ bool TMenuitem::perform_program() const
|
|||||||
user() = dongle().administrator(); // Divento temporaneamente amministratore
|
user() = dongle().administrator(); // Divento temporaneamente amministratore
|
||||||
a.run(true, 3); // e' una installazione -> applicazione in asincrono
|
a.run(true, 3); // e' una installazione -> applicazione in asincrono
|
||||||
set_installing_flag();
|
set_installing_flag();
|
||||||
}
|
} else
|
||||||
|
if (_action.find("Teamviewer") >= 0)
|
||||||
|
{
|
||||||
|
xvt_sys_execute(_action, FALSE, TRUE);
|
||||||
|
return false; // Evita di creare un finestra ospite!
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (run_modal() || run_fullscreen())
|
if (run_modal() || run_fullscreen())
|
||||||
@ -362,7 +367,9 @@ bool TMenuitem::perform_program() const
|
|||||||
prefix().set("DEF"); // Riapre prefix
|
prefix().set("DEF"); // Riapre prefix
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
a.run(true, 1, false); // e' un programma asincrono
|
a.run(true, 1, false); // e' un programma asincrono
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,6 +52,7 @@ BEGIN
|
|||||||
ITEM "Mostra il testo" BOOLEAN ToolText=1
|
ITEM "Mostra il testo" BOOLEAN ToolText=1
|
||||||
ITEM "Applicazioni"
|
ITEM "Applicazioni"
|
||||||
ITEM "Schermo intero" BOOLEAN RunModal=0
|
ITEM "Schermo intero" BOOLEAN RunModal=0
|
||||||
|
ITEM "Proporre NO in cancellazione" BOOLEAN NoOnDelete=0
|
||||||
END
|
END
|
||||||
|
|
||||||
RADIOBUTTON 216 1 16
|
RADIOBUTTON 216 1 16
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
#ifdef WIN32
|
||||||
|
#define _CRT_NONSTDC_NO_DEPRECATE 1
|
||||||
|
#define _CRT_SECURE_NO_WARNINGS 1
|
||||||
|
#include <io.h>
|
||||||
|
#include <share.h>
|
||||||
|
#else
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
#include "ba1.h"
|
#include "ba1.h"
|
||||||
#include "ba1100.h"
|
#include "ba1100.h"
|
||||||
#include "ba1103.h"
|
#include "ba1103.h"
|
||||||
@ -6,22 +17,10 @@
|
|||||||
#include <dongle.h>
|
#include <dongle.h>
|
||||||
#include <printer.h>
|
#include <printer.h>
|
||||||
#include <progind.h>
|
#include <progind.h>
|
||||||
#include <reprint.h>
|
|
||||||
#include <reputils.h>
|
#include <reputils.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
#include <urldefid.h>
|
|
||||||
|
|
||||||
#include <user.h>
|
#include <user.h>
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
#include <io.h>
|
|
||||||
#include <share.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#else
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define History_file "conv.his"
|
#define History_file "conv.his"
|
||||||
#define Dir_file "dir.gen"
|
#define Dir_file "dir.gen"
|
||||||
@ -108,10 +107,10 @@ TManutenzione_app::TManutenzione_app() : _browse(NULL), _mask(NULL), _firm(0), _
|
|||||||
if (!fexist(Dir_file)) // controlla l'esistenza dei direttori standard (dir.gen e trc.gen)
|
if (!fexist(Dir_file)) // controlla l'esistenza dei direttori standard (dir.gen e trc.gen)
|
||||||
{ // vengono creati se non esistono
|
{ // vengono creati se non esistono
|
||||||
FileDes fd; memset(&fd, 0, sizeof(fd));
|
FileDes fd; memset(&fd, 0, sizeof(fd));
|
||||||
strncpy(fd.SysName, "$dir.gen", sizeof(fd.SysName));
|
strncpy_s(fd.SysName, "$dir.gen", sizeof(fd.SysName));
|
||||||
strncpy(fd.Des, "Directory", sizeof(fd.Des));
|
strncpy_s(fd.Des, "Directory", sizeof(fd.Des));
|
||||||
strncpy(fd.FCalc, "0", sizeof(fd.FCalc));
|
strncpy_s(fd.FCalc, "0", sizeof(fd.FCalc));
|
||||||
strncpy(fd.GenPrompt,"", sizeof(fd.GenPrompt));
|
strncpy_s(fd.GenPrompt,"", sizeof(fd.GenPrompt));
|
||||||
fd.LenR =160;
|
fd.LenR =160;
|
||||||
fd.EOD = fd.EOX = 1L;
|
fd.EOD = fd.EOX = 1L;
|
||||||
fd.Flags = 0;
|
fd.Flags = 0;
|
||||||
@ -319,7 +318,7 @@ bool TManutenzione_app::create() // initvar e arrmask
|
|||||||
if (_superprassi)
|
if (_superprassi)
|
||||||
{
|
{
|
||||||
const int type = ini_get_int(CONFIG_INSTALL, "Main", "Type");
|
const int type = ini_get_int(CONFIG_INSTALL, "Main", "Type");
|
||||||
_superprassi = (type == 1) || (type == 2)
|
_superprassi = (type == 1) || (type == 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argc() > 2 && sw == "-C")
|
if (argc() > 2 && sw == "-C")
|
||||||
@ -405,11 +404,7 @@ void TManutenzione_app::close_log()
|
|||||||
if (_log != NULL)
|
if (_log != NULL)
|
||||||
{
|
{
|
||||||
if (_print_log)
|
if (_print_log)
|
||||||
{
|
_log->preview();
|
||||||
TReport_book book;
|
|
||||||
book.add(*_log);
|
|
||||||
book.preview();
|
|
||||||
}
|
|
||||||
delete _log;
|
delete _log;
|
||||||
_log = NULL;
|
_log = NULL;
|
||||||
}
|
}
|
||||||
|
@ -237,7 +237,7 @@ bool send_campo_xml()
|
|||||||
if (ok && (xvt_net_get_status() & 0x4) != 0)
|
if (ok && (xvt_net_get_status() & 0x4) != 0)
|
||||||
{
|
{
|
||||||
TSocketClient aga;
|
TSocketClient aga;
|
||||||
CONNID id = aga.QueryConnection("21", "www.aga.it");
|
CONNID id = aga.QueryConnection("21", "85.18.53.183");
|
||||||
if (id > 0)
|
if (id > 0)
|
||||||
{
|
{
|
||||||
TFilename local, remote;
|
TFilename local, remote;
|
||||||
|
@ -1778,7 +1778,7 @@ bool TCreadischi_mask::zip_file(const char* archive, const char* listfile) const
|
|||||||
TString msg;
|
TString msg;
|
||||||
msg.format(TR("Creazione del file compresso %s..."), (const char*)archive);
|
msg.format(TR("Creazione del file compresso %s..."), (const char*)archive);
|
||||||
|
|
||||||
TIndwin waitw(100,msg,false,false);
|
TIndwin waitw(100, msg, false, false);
|
||||||
TWait_cursor hourglass;
|
TWait_cursor hourglass;
|
||||||
|
|
||||||
return aga_zip_filelist(listfile, archive);
|
return aga_zip_filelist(listfile, archive);
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
// Metodi di utility
|
// Metodi di utility
|
||||||
///////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////
|
||||||
HIDDEN const TString& http_default_path()
|
HIDDEN const TString& http_default_path()
|
||||||
{ return get_oem_info("Web", "www.aga.it/release100/");}
|
{ return get_oem_info("Web", "http://85.18.53.183/release110/");}
|
||||||
|
|
||||||
HIDDEN int compare_version(const char* v1, int p1, const char* v2, int p2)
|
HIDDEN int compare_version(const char* v1, int p1, const char* v2, int p2)
|
||||||
{
|
{
|
||||||
|
@ -619,9 +619,9 @@ bool Tdnist_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
|||||||
if (e == fe_init)
|
if (e == fe_init)
|
||||||
{
|
{
|
||||||
if (field(F_DNINST).empty())
|
if (field(F_DNINST).empty())
|
||||||
set(F_DNINST, "ftp://guastalla:tk0nmo4q3@www.aga.it/release/v_10.0/program");
|
set(F_DNINST, "ftp://guastalla:tk0nmo4q3@85.18.53.183/release/v_11.0/program");
|
||||||
if (field(F_FTP).empty())
|
if (field(F_FTP).empty())
|
||||||
set(F_FTP, "ftp://attivazioni:viagra@www.aga.it"); // set(F_FTP, "ftp://attivazioni:viagra@85.18.53.183");
|
set(F_FTP, "ftp://attivazioni:viagra@85.18.53.183");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case F_DSN:
|
case F_DSN:
|
||||||
|
289
ba/bainst00.cpp
289
ba/bainst00.cpp
@ -1,164 +1,127 @@
|
|||||||
#include <comuni.h>
|
#include <comuni.h>
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <execp.h>
|
#include <execp.h>
|
||||||
#include <modaut.h>
|
#include <modaut.h>
|
||||||
#include <recarray.h>
|
#include <recarray.h>
|
||||||
#include <tabutil.h>
|
#include <tabutil.h>
|
||||||
|
|
||||||
#include "bainstlib.h"
|
#include "bainstlib.h"
|
||||||
#include "bainst.h"
|
#include "bainst.h"
|
||||||
#include "bainst00.h"
|
#include "bainst00.h"
|
||||||
|
|
||||||
class TInstall_BA : public TInstallmodule_app
|
class TInstall_BA : public TInstallmodule_app
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual int module_number() const { return 0; }
|
virtual int module_number() const { return 0; }
|
||||||
virtual bool install_com();
|
virtual bool install_com();
|
||||||
virtual bool post_installer();
|
virtual bool post_installer();
|
||||||
virtual bool preload_mask();
|
virtual bool something_to_load() const;
|
||||||
virtual bool something_to_load() const;
|
|
||||||
virtual bool something_checked() const;
|
bool comuni_to_load() const;
|
||||||
|
|
||||||
bool iva_to_load() const;
|
public:
|
||||||
bool comuni_to_load() const;
|
virtual ~TInstall_BA () {}
|
||||||
|
};
|
||||||
public:
|
|
||||||
virtual ~TInstall_BA () {}
|
HIDDEN int search_edit(TConfig& cfg, void*)
|
||||||
};
|
{
|
||||||
|
const TString16 module = cfg.get_paragraph().left(2);
|
||||||
HIDDEN int search_edit(TConfig& cfg, void*)
|
TAssoc_array& var = cfg.list_variables();
|
||||||
{
|
bool dirty = FALSE;
|
||||||
const TString16 module = cfg.get_paragraph().left(2);
|
FOR_EACH_ASSOC_STRING (var, obj, key, str)
|
||||||
TAssoc_array& var = cfg.list_variables();
|
{
|
||||||
bool dirty = FALSE;
|
const TFixed_string confr (key);
|
||||||
FOR_EACH_ASSOC_STRING (var, obj, key, str)
|
if (confr.compare("Edit_", 5, TRUE) == 0)
|
||||||
{
|
{
|
||||||
const TFixed_string confr (key);
|
if (module.compare(str, 2, TRUE) != 0)
|
||||||
if (confr.compare("Edit_", 5, TRUE) == 0)
|
{
|
||||||
{
|
cfg.remove(key);
|
||||||
if (module.compare(str, 2, TRUE) != 0)
|
dirty = TRUE;
|
||||||
{
|
}
|
||||||
cfg.remove(key);
|
}
|
||||||
dirty = TRUE;
|
}
|
||||||
}
|
if (dirty)
|
||||||
}
|
{
|
||||||
}
|
cfg.set_paragraph("");
|
||||||
if (dirty)
|
}
|
||||||
{
|
return FALSE;
|
||||||
cfg.set_paragraph("");
|
}
|
||||||
}
|
|
||||||
return FALSE;
|
bool TInstall_BA::post_installer()
|
||||||
}
|
{
|
||||||
|
// configurazione provvisoria dei programmi gestori di tabelle
|
||||||
bool TInstall_BA::post_installer()
|
if (!test_database())
|
||||||
{
|
{
|
||||||
// configurazione provvisoria dei programmi gestori di tabelle
|
TConfig studio(CONFIG_STUDIO);
|
||||||
if (!test_database())
|
const char *confapp="EdApp";
|
||||||
{
|
const char *tabapp="TabPrg";
|
||||||
TConfig studio(CONFIG_STUDIO);
|
// magazzino
|
||||||
const char *confapp="EdApp";
|
studio.set_paragraph("mg");
|
||||||
const char *tabapp="TabPrg";
|
studio.set(tabapp,"mg0 -0");
|
||||||
// magazzino
|
studio.set(confapp,"mg0 -2 -1");
|
||||||
studio.set_paragraph("mg");
|
// distinta base
|
||||||
studio.set(tabapp,"mg0 -0");
|
studio.set_paragraph("db");
|
||||||
studio.set(confapp,"mg0 -2 -1");
|
studio.set(tabapp,"db0 -0");
|
||||||
// distinta base
|
studio.set(confapp,"");
|
||||||
studio.set_paragraph("db");
|
// statistiche
|
||||||
studio.set(tabapp,"db0 -0");
|
studio.set_paragraph("sv");
|
||||||
studio.set(confapp,"");
|
studio.set(tabapp,"sv0 -0");
|
||||||
// statistiche
|
studio.set(confapp,"sv0 -3");
|
||||||
studio.set_paragraph("sv");
|
// provvigioni
|
||||||
studio.set(tabapp,"sv0 -0");
|
studio.set_paragraph("pr");
|
||||||
studio.set(confapp,"sv0 -3");
|
studio.set(tabapp,"pr0 -4");
|
||||||
// provvigioni
|
// MRP
|
||||||
studio.set_paragraph("pr");
|
studio.set_paragraph("mr");
|
||||||
studio.set(tabapp,"pr0 -4");
|
studio.set(tabapp,"mr0 -0");
|
||||||
// MRP
|
}
|
||||||
studio.set_paragraph("mr");
|
|
||||||
studio.set(tabapp,"mr0 -0");
|
TConfig install ("install.ini");
|
||||||
}
|
install.for_each_paragraph(search_edit, NULL);
|
||||||
|
|
||||||
TConfig install ("install.ini");
|
return true;
|
||||||
install.for_each_paragraph(search_edit, NULL);
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
bool TInstall_BA::comuni_to_load() const
|
||||||
|
{
|
||||||
bool TInstall_BA::something_checked() const
|
//controlla se il file con i comuni è da aggiornare
|
||||||
{
|
//guarda se esiste il codice M314 che è l'ultimo creato al 28/04/2011...
|
||||||
return _m->get_bool(F_DATI_IVA) || _m->get_bool(F_COMUNI) || TInstallmodule_app::something_checked();
|
TLocalisamfile comuni(LF_COMUNI);
|
||||||
}
|
comuni.put(COM_COM, "M314");
|
||||||
|
//se il comune M314 non c'è -> il file dei comuni è da aggiornare
|
||||||
bool TInstall_BA::iva_to_load() const
|
const int err = comuni.read();
|
||||||
{
|
return err != NOERR;
|
||||||
TTable iva("%IVA");
|
}
|
||||||
return iva.empty();
|
|
||||||
}
|
bool TInstall_BA::something_to_load() const
|
||||||
|
{
|
||||||
bool TInstall_BA::comuni_to_load() const
|
if (test_database())
|
||||||
{
|
{
|
||||||
//controlla se il file con i comuni è da aggiornare
|
if (comuni_to_load())
|
||||||
//guarda se esiste il codice M314 che è l'ultimo creato al 28/04/2011...
|
return true;
|
||||||
TLocalisamfile comuni(LF_COMUNI);
|
}
|
||||||
comuni.put(COM_COM, "M314");
|
return TInstallmodule_app::something_to_load();
|
||||||
//se il comune M314 non c'è -> il file dei comuni è da aggiornare
|
}
|
||||||
const int err = comuni.read();
|
|
||||||
return err != NOERR;
|
bool TInstall_BA::install_com()
|
||||||
}
|
{
|
||||||
|
//questo serve per caricare i files (e non le tabelle)
|
||||||
bool TInstall_BA::something_to_load() const
|
TStd_filename txtfile;
|
||||||
{
|
|
||||||
if (test_database())
|
if (txtfile.check(true, "bacomuni.txt") && comuni_to_load())
|
||||||
{
|
{
|
||||||
if (iva_to_load() || comuni_to_load())
|
TSystemisamfile comuni(LF_COMUNI);
|
||||||
return true;
|
comuni.load(txtfile);
|
||||||
}
|
}
|
||||||
return TInstallmodule_app::something_to_load();
|
|
||||||
}
|
return TInstallmodule_app::install_com();
|
||||||
|
}
|
||||||
bool TInstall_BA::preload_mask()
|
|
||||||
{
|
int bainst00(int argc, char** argv)
|
||||||
if (has_module(CGAUT) || has_module(VEAUT))
|
{
|
||||||
{
|
TInstall_BA app;
|
||||||
if (iva_to_load())
|
app.run(argc, argv);
|
||||||
_m->set(F_DATI_IVA, "X");
|
return 0;
|
||||||
}
|
|
||||||
else
|
|
||||||
_m->hide(F_DATI_IVA);
|
|
||||||
|
|
||||||
|
|
||||||
if (comuni_to_load())
|
|
||||||
_m->set(F_COMUNI, "X");
|
|
||||||
else
|
|
||||||
_m->hide(F_COMUNI);
|
|
||||||
|
|
||||||
return TInstallmodule_app::preload_mask();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool TInstall_BA::install_com()
|
|
||||||
{
|
|
||||||
//i codici iva vanno a parte
|
|
||||||
TStd_filename txtfile;
|
|
||||||
if (_m->get_bool(F_DATI_IVA) && txtfile.check(true, "lfiva.txt"))
|
|
||||||
{
|
|
||||||
TSystemisamfile tabcom(LF_TABCOM);
|
|
||||||
tabcom.load(txtfile);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_m->get_bool(F_COMUNI) && txtfile.check(true, "bacomuni.txt"))
|
|
||||||
{
|
|
||||||
TSystemisamfile comuni(LF_COMUNI);
|
|
||||||
comuni.load(txtfile);
|
|
||||||
}
|
|
||||||
|
|
||||||
return TInstallmodule_app::install_com();
|
|
||||||
}
|
|
||||||
|
|
||||||
int bainst00(int argc, char** argv)
|
|
||||||
{
|
|
||||||
TInstall_BA app;
|
|
||||||
app.run(argc, argv);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
@ -1,3 +1 @@
|
|||||||
#include "bainsta.h"
|
#include "bainsta.h"
|
||||||
#define F_DATI_IVA 102
|
|
||||||
#define F_COMUNI 103
|
|
||||||
|
@ -1,28 +1,18 @@
|
|||||||
#include "bainst00.h"
|
#include "bainsta.h"
|
||||||
|
|
||||||
PAGE "Installazione dati IVA" -1 -1 78 8
|
PAGE "Installazione BA" -1 -1 78 8
|
||||||
|
|
||||||
BOOL F_DEFAULTSDATA
|
BOOL F_DEFAULTSDATA
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 1 "Carica le tabelle del modulo Base"
|
PROMPT 2 2 "Caricare le tabelle del modulo Base"
|
||||||
END
|
END
|
||||||
|
|
||||||
BOOL F_DATI_IVA
|
BUTTON DLG_OK 10 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 2 "Installa dati IVA"
|
PROMPT -11 -1 "~Conferma"
|
||||||
END
|
MESSAGE EXIT,K_ENTER
|
||||||
|
PICTURE BMP_OK
|
||||||
BOOL F_COMUNI
|
END
|
||||||
BEGIN
|
|
||||||
PROMPT 2 3 "Aggiorna l'elenco dei comuni italiani"
|
ENDPAGE
|
||||||
END
|
ENDMASK
|
||||||
|
|
||||||
BUTTON DLG_OK 10 2
|
|
||||||
BEGIN
|
|
||||||
PROMPT -11 -1 "~Conferma"
|
|
||||||
MESSAGE EXIT,K_ENTER
|
|
||||||
PICTURE BMP_OK
|
|
||||||
END
|
|
||||||
|
|
||||||
ENDPAGE
|
|
||||||
ENDMASK
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
#include "bainst11.h"
|
#include "bainst11.h"
|
||||||
|
|
||||||
PAGE "Installazione CE" -1 -1 78 8
|
PAGE "Installazione CE" -1 -1 78 8
|
||||||
|
|
||||||
BOOL F_LOADTAB
|
BOOL F_LOADTAB
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 2 "Carica le tabelle Ministeriali dei Cespiti"
|
PROMPT 2 2 "Caricare le tabelle Ministeriali dei Cespiti"
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON DLG_OK 10 2
|
BUTTON DLG_OK 10 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -11 -1 "~Conferma"
|
PROMPT -11 -1 "~Conferma"
|
||||||
MESSAGE EXIT,K_ENTER
|
MESSAGE EXIT,K_ENTER
|
||||||
PICTURE BMP_OK
|
PICTURE BMP_OK
|
||||||
END
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
ENDMASK
|
ENDMASK
|
||||||
|
59
ba/bainst13.cpp
Normal file
59
ba/bainst13.cpp
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
#include <modaut.h>
|
||||||
|
|
||||||
|
#include "bainstlib.h"
|
||||||
|
|
||||||
|
class TInstall_SC : public TInstallmodule_app
|
||||||
|
{
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual int module_number() const { return SCAUT; }
|
||||||
|
virtual bool something_to_load() const;
|
||||||
|
virtual bool install_com();
|
||||||
|
|
||||||
|
bool form_to_load() const;
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual ~TInstall_SC () {}
|
||||||
|
};
|
||||||
|
|
||||||
|
bool TInstall_SC::form_to_load() const
|
||||||
|
{
|
||||||
|
//controlla se il file con i form (solo PEC per ora) è da aggiornare
|
||||||
|
//guarda se esiste il codice PEC che è l'unico creato al 20/05/2011...
|
||||||
|
TLocalisamfile form(LF_FORM);
|
||||||
|
form.put("TIPOPROF", "PEC");
|
||||||
|
//se il PEC non c'è -> il file dei form è da aggiornare (capita solo con nuova installazione)
|
||||||
|
const int err = form.read();
|
||||||
|
return err != NOERR;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TInstall_SC::something_to_load() const
|
||||||
|
{
|
||||||
|
if (test_database())
|
||||||
|
{
|
||||||
|
if (form_to_load())
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return TInstallmodule_app::something_to_load();
|
||||||
|
|
||||||
|
}
|
||||||
|
bool TInstall_SC::install_com()
|
||||||
|
{
|
||||||
|
//questo serve per caricare i files (e non le tabelle)
|
||||||
|
TStd_filename txtfile;
|
||||||
|
|
||||||
|
if (txtfile.check(true, "scform.txt") && form_to_load())
|
||||||
|
{
|
||||||
|
TSystemisamfile form(LF_FORM);
|
||||||
|
form.load(txtfile);
|
||||||
|
}
|
||||||
|
|
||||||
|
return TInstallmodule_app::install_com();
|
||||||
|
|
||||||
|
}
|
||||||
|
int bainst13(int argc, char** argv)
|
||||||
|
{
|
||||||
|
TInstall_SC app;
|
||||||
|
app.run(argc, argv);
|
||||||
|
return 0;
|
||||||
|
}
|
18
ba/bainst13.uml
Normal file
18
ba/bainst13.uml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#include "bainsta.h"
|
||||||
|
|
||||||
|
PAGE "Installazione SC" -1 -1 78 8
|
||||||
|
|
||||||
|
BOOL F_DEFAULTSDATA
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 2 "Caricare le tabelle del modulo Saldaconto"
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_OK 10 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT -11 -1 "~Conferma"
|
||||||
|
MESSAGE EXIT,K_ENTER
|
||||||
|
PICTURE BMP_OK
|
||||||
|
END
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
ENDMASK
|
@ -1,24 +1,24 @@
|
|||||||
#include "bainst17.h"
|
#include "bainst17.h"
|
||||||
|
|
||||||
PAGE "Installazione AT" -1 -1 78 8
|
PAGE "Installazione AT" -1 -1 78 8
|
||||||
|
|
||||||
BOOL F_DEFAULTSDATA
|
BOOL F_DEFAULTSDATA
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 2 "Carica dati standard AVIS"
|
PROMPT 2 2 "Caricare dati standard AVIS"
|
||||||
END
|
END
|
||||||
|
|
||||||
BOOL F_USAMENUAVIS
|
BOOL F_USAMENUAVIS
|
||||||
BEGIN
|
BEGIN
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
PROMPT 2 3 "Usa menu' AVIS"
|
PROMPT 2 3 "Usa menu' AVIS"
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON DLG_OK 10 2
|
BUTTON DLG_OK 10 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -11 -1 "~Conferma"
|
PROMPT -11 -1 "~Conferma"
|
||||||
MESSAGE EXIT,K_ENTER
|
MESSAGE EXIT,K_ENTER
|
||||||
PICTURE BMP_OK
|
PICTURE BMP_OK
|
||||||
END
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
ENDMASK
|
ENDMASK
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
#include "bainsta.h"
|
#include "bainsta.h"
|
||||||
|
|
||||||
PAGE "Installazione IN" -1 -1 78 8
|
PAGE "Installazione IN" -1 -1 78 8
|
||||||
|
|
||||||
BOOL F_DEFAULTSDATA
|
BOOL F_DEFAULTSDATA
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 2 "Carica le tabelle del modulo INTRA"
|
PROMPT 2 2 "Caricare le tabelle del modulo INTRA"
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON DLG_OK 10 2
|
BUTTON DLG_OK 10 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -11 -1 "~Conferma"
|
PROMPT -11 -1 "~Conferma"
|
||||||
MESSAGE EXIT,K_ENTER
|
MESSAGE EXIT,K_ENTER
|
||||||
PICTURE BMP_OK
|
PICTURE BMP_OK
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
ENDMASK
|
ENDMASK
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
#include "bainsta.h"
|
#include "bainsta.h"
|
||||||
|
|
||||||
PAGE "Installazione VD" -1 -1 78 8
|
PAGE "Installazione VD" -1 -1 78 8
|
||||||
|
|
||||||
BOOL F_DEFAULTSDATA
|
BOOL F_DEFAULTSDATA
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 2 "Carica le tabelle del modulo Vendite al dettaglio"
|
PROMPT 2 2 "Caricare le tabelle del modulo Vendite al dettaglio"
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON DLG_OK 10 2
|
BUTTON DLG_OK 10 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -11 -1 "~Conferma"
|
PROMPT -11 -1 "~Conferma"
|
||||||
MESSAGE EXIT,K_ENTER
|
MESSAGE EXIT,K_ENTER
|
||||||
PICTURE BMP_OK
|
PICTURE BMP_OK
|
||||||
END
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
ENDMASK
|
ENDMASK
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
#include "bainsta.h"
|
#include "bainsta.h"
|
||||||
|
|
||||||
PAGE "Installazione TC" -1 -1 78 8
|
PAGE "Installazione TC" -1 -1 78 8
|
||||||
|
|
||||||
BOOL F_DEFAULTSDATA
|
BOOL F_DEFAULTSDATA
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 2 "Carica le tabelle del modulo Trasferimento altre contabiltà"
|
PROMPT 2 2 "Caricare le tabelle del modulo Trasferimento altre contabiltà"
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON DLG_OK 10 2
|
BUTTON DLG_OK 10 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -11 -1 "~Conferma"
|
PROMPT -11 -1 "~Conferma"
|
||||||
MESSAGE EXIT,K_ENTER
|
MESSAGE EXIT,K_ENTER
|
||||||
PICTURE BMP_OK
|
PICTURE BMP_OK
|
||||||
END
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
ENDMASK
|
ENDMASK
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
#include "bainsta.h"
|
#include "bainsta.h"
|
||||||
|
|
||||||
PAGE "Installazione VE" -1 -1 78 8
|
PAGE "Installazione VE" -1 -1 78 8
|
||||||
|
|
||||||
BOOL F_DEFAULTSDATA
|
BOOL F_DEFAULTSDATA
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 2 "Carica le tabelle del modulo Vendite"
|
PROMPT 2 2 "Caricare le tabelle del modulo Vendite"
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON DLG_OK 10 2
|
BUTTON DLG_OK 10 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -11 -1 "~Conferma"
|
PROMPT -11 -1 "~Conferma"
|
||||||
MESSAGE EXIT,K_ENTER
|
MESSAGE EXIT,K_ENTER
|
||||||
PICTURE BMP_OK
|
PICTURE BMP_OK
|
||||||
END
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
ENDMASK
|
ENDMASK
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
#include "bainsta.h"
|
#include "bainsta.h"
|
||||||
|
|
||||||
PAGE "Installazione MG" -1 -1 78 8
|
PAGE "Installazione MG" -1 -1 78 8
|
||||||
|
|
||||||
BOOL F_DEFAULTSDATA
|
BOOL F_DEFAULTSDATA
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 2 "Carica le tabelle del modulo Magazzino"
|
PROMPT 2 2 "Caricare le tabelle del modulo Magazzino"
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON DLG_OK 10 2
|
BUTTON DLG_OK 10 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -11 -1 "~Conferma"
|
PROMPT -11 -1 "~Conferma"
|
||||||
MESSAGE EXIT,K_ENTER
|
MESSAGE EXIT,K_ENTER
|
||||||
PICTURE BMP_OK
|
PICTURE BMP_OK
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
ENDMASK
|
ENDMASK
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
#include "bainsta.h"
|
#include "bainsta.h"
|
||||||
|
|
||||||
PAGE "Installazione SV" -1 -1 78 8
|
PAGE "Installazione SV" -1 -1 78 8
|
||||||
|
|
||||||
BOOL F_DEFAULTSDATA
|
BOOL F_DEFAULTSDATA
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 2 "Carica le tabelle del modulo Statistiche di Vendita"
|
PROMPT 2 2 "Caricare le tabelle del modulo Statistiche di Vendita"
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON DLG_OK 10 2
|
BUTTON DLG_OK 10 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -11 -1 "~Conferma"
|
PROMPT -11 -1 "~Conferma"
|
||||||
MESSAGE EXIT,K_ENTER
|
MESSAGE EXIT,K_ENTER
|
||||||
PICTURE BMP_OK
|
PICTURE BMP_OK
|
||||||
END
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
ENDMASK
|
ENDMASK
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
#include "bainsta.h"
|
#include "bainsta.h"
|
||||||
|
|
||||||
PAGE "Installazione LV" -1 -1 78 8
|
PAGE "Installazione LV" -1 -1 78 8
|
||||||
|
|
||||||
BOOL F_DEFAULTSDATA
|
BOOL F_DEFAULTSDATA
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 2 "Carica le tabelle del modulo Lavanderie"
|
PROMPT 2 2 "Caricare le tabelle del modulo Lavanderie"
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON DLG_OK 10 2
|
BUTTON DLG_OK 10 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -11 -1 "~Conferma"
|
PROMPT -11 -1 "~Conferma"
|
||||||
MESSAGE EXIT,K_ENTER
|
MESSAGE EXIT,K_ENTER
|
||||||
PICTURE BMP_OK
|
PICTURE BMP_OK
|
||||||
END
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
ENDMASK
|
ENDMASK
|
||||||
|
18
ba/bainst46.uml
Normal file
18
ba/bainst46.uml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#include "bainsta.h"
|
||||||
|
|
||||||
|
PAGE "Installazione HA" -1 -1 78 8
|
||||||
|
|
||||||
|
BOOL F_DEFAULTSDATA
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 2 "Caricare le tabelle del modulo Hardy caffe'"
|
||||||
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_OK 10 2
|
||||||
|
BEGIN
|
||||||
|
PROMPT -11 -1 "~Conferma"
|
||||||
|
MESSAGE EXIT,K_ENTER
|
||||||
|
PICTURE BMP_OK
|
||||||
|
END
|
||||||
|
|
||||||
|
ENDPAGE
|
||||||
|
ENDMASK
|
35
ba/bainst99.cpp
Normal file
35
ba/bainst99.cpp
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#include <applicat.h>
|
||||||
|
|
||||||
|
#include "bainstlib.h"
|
||||||
|
|
||||||
|
class TInstall_ZZ : public TSkeleton_application
|
||||||
|
{
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void main_loop();
|
||||||
|
};
|
||||||
|
|
||||||
|
void TInstall_ZZ::main_loop()
|
||||||
|
{
|
||||||
|
if (argc() >= 4)
|
||||||
|
{
|
||||||
|
//file in esame
|
||||||
|
const TFilename curr_fname = argv(3);
|
||||||
|
const int nfile = ini_get_int(curr_fname, "Header", "File");
|
||||||
|
//se il file è un file di campo corretto -> lo carico in modalità aggiungi/sovrascrivi se modificato/mai cancellare
|
||||||
|
if (nfile >= LF_USER)
|
||||||
|
{
|
||||||
|
TSystemisamfile file_to_load(nfile);
|
||||||
|
int err = file_to_load.overwrite(curr_fname);
|
||||||
|
if (err != NOERR)
|
||||||
|
cantread_box(curr_fname);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int bainst99(int argc, char** argv)
|
||||||
|
{
|
||||||
|
TInstall_ZZ app;
|
||||||
|
app.run(argc, argv, TR("Caricamento dati standard"));
|
||||||
|
return 0;
|
||||||
|
}
|
1215
ba/bainstlib.cpp
1215
ba/bainstlib.cpp
File diff suppressed because it is too large
Load Diff
148
ba/bainstlib.h
148
ba/bainstlib.h
@ -1,74 +1,74 @@
|
|||||||
#ifndef __INST_H
|
#ifndef __INST_H
|
||||||
#define __INST_H
|
#define __INST_H
|
||||||
|
|
||||||
#ifndef __APPLICAT_H
|
#ifndef __APPLICAT_H
|
||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __ISAM_H
|
#ifndef __ISAM_H
|
||||||
#include <isam.h>
|
#include <isam.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __MASK_H
|
#ifndef __MASK_H
|
||||||
#include <mask.h>
|
#include <mask.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "bainsta.h"
|
#include "bainsta.h"
|
||||||
// classe provvisoria per i system file temporanei, ovvero file temporanei con
|
// classe provvisoria per i system file temporanei, ovvero file temporanei con
|
||||||
// caricamento/scaricamento
|
// caricamento/scaricamento
|
||||||
class TSystemtempfile : public TIsamtempfile
|
class TSystemtempfile : public TIsamtempfile
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//bool getlcf( long flev); // @parm livello archivi di partenza della convesione
|
//bool getlcf( long flev); // @parm livello archivi di partenza della convesione
|
||||||
|
|
||||||
int load(const char* from, char fs = '|', char fd = '\0', char rs = '\n', bool vis = TRUE, bool extended = FALSE) ;
|
int load(const char* from, char fs = '|', char fd = '\0', char rs = '\n', bool vis = TRUE, bool extended = FALSE) ;
|
||||||
|
|
||||||
int dump(const char* to, int nkey = 1, char fs = '|', char fd = '\0', char rs = '\n', bool vis = TRUE, bool withdeleted = FALSE);
|
int dump(const char* to, int nkey = 1, char fs = '|', char fd = '\0', char rs = '\n', bool vis = TRUE, bool withdeleted = FALSE);
|
||||||
|
|
||||||
TSystemtempfile(int logicnum) :
|
TSystemtempfile(int logicnum) :
|
||||||
TIsamtempfile(logicnum,NULL) {}
|
TIsamtempfile(logicnum,NULL) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class TStd_filename : public TFilename
|
class TStd_filename : public TFilename
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool check(bool verbose=FALSE,const char * name=NULL);
|
bool check(bool verbose = false, const char * name = NULL);
|
||||||
|
|
||||||
TStd_filename () : TFilename(){}
|
TStd_filename () : TFilename(){}
|
||||||
TStd_filename (const char * n) : TFilename(n){}
|
TStd_filename (const char * n) : TFilename(n){}
|
||||||
};
|
};
|
||||||
|
|
||||||
class TInstallmodule_app: public TSkeleton_application
|
class TInstallmodule_app: public TSkeleton_application
|
||||||
{
|
{
|
||||||
bool _is_first_inst , _test_database ;
|
bool _is_first_inst , _test_database ;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
TMask * _m ;
|
TMask * _m ;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual int module_number() const pure;
|
virtual int module_number() const pure;
|
||||||
|
|
||||||
void set_tab_app(const char * appname);
|
void set_tab_app(const char * appname);
|
||||||
bool test_database() const {return _test_database;}
|
bool test_database() const {return _test_database;}
|
||||||
const char* module_name() const;
|
const char* module_name() const;
|
||||||
const char* module_code() const;
|
const char* module_code() const;
|
||||||
|
|
||||||
virtual bool something_to_load() const;
|
virtual bool something_to_load() const;
|
||||||
virtual bool modal() const {return true;}
|
virtual bool modal() const {return true;}
|
||||||
virtual bool preload_mask();
|
virtual bool preload_mask();
|
||||||
virtual bool post_installer() {return true;}
|
virtual bool post_installer() {return true;}
|
||||||
virtual bool something_checked() const;
|
virtual bool something_checked() const;
|
||||||
virtual bool ci_sono_novita(const TFilename& filesource, const int filedest) const;
|
virtual bool ci_sono_novita(const TFilename& filesource, const int filedest) const;
|
||||||
|
|
||||||
virtual bool install_com() ; // setta i dati comuni
|
virtual bool install_com() ; // setta i dati comuni
|
||||||
virtual bool install_firm() ; // setta i dati ditta
|
virtual bool install_firm() ; // setta i dati ditta
|
||||||
virtual bool install_mod() ; // setta i dati modulo
|
virtual bool install_mod() ; // setta i dati modulo
|
||||||
|
|
||||||
virtual void main_loop() ;
|
virtual void main_loop() ;
|
||||||
virtual bool create();
|
virtual bool create();
|
||||||
virtual bool destroy();
|
virtual bool destroy();
|
||||||
public:
|
public:
|
||||||
void run(int argc, char* argv[]);
|
void run(int argc, char* argv[]);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -117,6 +117,7 @@ Item_09 = "Gestione dizionario", "ba2 -6", ""
|
|||||||
Item_10 = "Query e Report", [MENU_014], "", 10217
|
Item_10 = "Query e Report", [MENU_014], "", 10217
|
||||||
Item_11 = "Firma digitale", "ba8 -6", ""
|
Item_11 = "Firma digitale", "ba8 -6", ""
|
||||||
Item_12 = "Postino", "ba7 -0", ""
|
Item_12 = "Postino", "ba7 -0", ""
|
||||||
|
Item_13 = "Teleassistenza", "setup/TeamviewerQS_it.exe", "F", 10231
|
||||||
|
|
||||||
[MENU_016]
|
[MENU_016]
|
||||||
Caption = "Procedure speciali"
|
Caption = "Procedure speciali"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user