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,6 +351,11 @@ 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
|
||||||
{
|
{
|
||||||
@ -362,9 +367,11 @@ 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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
@ -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:
|
||||||
|
@ -17,11 +17,8 @@ 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 iva_to_load() const;
|
|
||||||
bool comuni_to_load() const;
|
bool comuni_to_load() const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -86,16 +83,6 @@ bool TInstall_BA::post_installer()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TInstall_BA::something_checked() const
|
|
||||||
{
|
|
||||||
return _m->get_bool(F_DATI_IVA) || _m->get_bool(F_COMUNI) || TInstallmodule_app::something_checked();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool TInstall_BA::iva_to_load() const
|
|
||||||
{
|
|
||||||
TTable iva("%IVA");
|
|
||||||
return iva.empty();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool TInstall_BA::comuni_to_load() const
|
bool TInstall_BA::comuni_to_load() const
|
||||||
{
|
{
|
||||||
@ -112,42 +99,18 @@ bool TInstall_BA::something_to_load() const
|
|||||||
{
|
{
|
||||||
if (test_database())
|
if (test_database())
|
||||||
{
|
{
|
||||||
if (iva_to_load() || comuni_to_load())
|
if (comuni_to_load())
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return TInstallmodule_app::something_to_load();
|
return TInstallmodule_app::something_to_load();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TInstall_BA::preload_mask()
|
|
||||||
{
|
|
||||||
if (has_module(CGAUT) || has_module(VEAUT))
|
|
||||||
{
|
|
||||||
if (iva_to_load())
|
|
||||||
_m->set(F_DATI_IVA, "X");
|
|
||||||
}
|
|
||||||
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()
|
bool TInstall_BA::install_com()
|
||||||
{
|
{
|
||||||
//i codici iva vanno a parte
|
//questo serve per caricare i files (e non le tabelle)
|
||||||
TStd_filename txtfile;
|
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"))
|
if (txtfile.check(true, "bacomuni.txt") && comuni_to_load())
|
||||||
{
|
{
|
||||||
TSystemisamfile comuni(LF_COMUNI);
|
TSystemisamfile comuni(LF_COMUNI);
|
||||||
comuni.load(txtfile);
|
comuni.load(txtfile);
|
||||||
|
@ -1,3 +1 @@
|
|||||||
#include "bainsta.h"
|
#include "bainsta.h"
|
||||||
#define F_DATI_IVA 102
|
|
||||||
#define F_COMUNI 103
|
|
||||||
|
@ -1,20 +1,10 @@
|
|||||||
#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
|
|
||||||
|
|
||||||
BOOL F_DATI_IVA
|
|
||||||
BEGIN
|
|
||||||
PROMPT 2 2 "Installa dati IVA"
|
|
||||||
END
|
|
||||||
|
|
||||||
BOOL F_COMUNI
|
|
||||||
BEGIN
|
|
||||||
PROMPT 2 3 "Aggiorna l'elenco dei comuni italiani"
|
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON DLG_OK 10 2
|
BUTTON DLG_OK 10 2
|
||||||
|
@ -4,7 +4,7 @@ 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
|
||||||
|
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
|
@ -4,7 +4,7 @@ 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
|
||||||
|
@ -4,7 +4,7 @@ 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
|
||||||
|
@ -4,7 +4,7 @@ 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
|
||||||
|
@ -4,7 +4,7 @@ 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
|
||||||
|
@ -4,7 +4,7 @@ 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
|
||||||
|
@ -4,7 +4,7 @@ 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
|
||||||
|
@ -4,7 +4,7 @@ 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
|
||||||
|
@ -4,7 +4,7 @@ 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
|
||||||
|
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;
|
||||||
|
}
|
@ -336,24 +336,24 @@ bool TStd_filename::check(bool verbose,const char * n)
|
|||||||
{
|
{
|
||||||
if (n && *n)
|
if (n && *n)
|
||||||
set(n);
|
set(n);
|
||||||
insert("STD\\");
|
insert("std\\");
|
||||||
if (!exist())
|
if (!exist())
|
||||||
{
|
{
|
||||||
*this = name();
|
*this = name();
|
||||||
if (!exist())
|
if (!exist())
|
||||||
{
|
{
|
||||||
insert("STD\\");
|
insert("std\\");
|
||||||
insert(prefix().get_studio());
|
insert(prefix().get_studio());
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!exist())
|
if (!exist())
|
||||||
{
|
{
|
||||||
if (verbose)
|
if (verbose)
|
||||||
error_box("Non riesco a trovare il file: %s", (const char *)name());
|
cantread_box(name());
|
||||||
cut(0);
|
cut(0);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
return true;
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ********************************
|
// ********************************
|
||||||
@ -437,9 +437,10 @@ bool TInstallmodule_app::preload_mask()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TInstallmodule_app::ci_sono_novita(const TFilename& filesource, const int filedest) const
|
bool TInstallmodule_app::ci_sono_novita(const TFilename& txt, const int filedest) const
|
||||||
{
|
{
|
||||||
bool ok = (filedest == LF_TAB || filedest == LF_TABCOM || filedest == LF_TABMOD) && filesource.exist();
|
TStd_filename filesource;
|
||||||
|
bool ok = (filedest == LF_TAB || filedest == LF_TABCOM || filedest == LF_TABMOD) && filesource.check(false, txt);
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
TScanner scan(filesource);
|
TScanner scan(filesource);
|
||||||
@ -516,17 +517,15 @@ bool TInstallmodule_app::install_firm()
|
|||||||
txtfile << "tab.txt";
|
txtfile << "tab.txt";
|
||||||
if (txtfile.check())
|
if (txtfile.check())
|
||||||
{
|
{
|
||||||
TLocalisamfile ditte(LF_NDITTE);
|
TString_array firms;
|
||||||
for (ditte.first(); !ditte.eof() ; ditte.next())
|
TPrefix::firms(firms);
|
||||||
|
|
||||||
|
FOR_EACH_ARRAY_ROW(firms, r, riga)
|
||||||
{
|
{
|
||||||
const int newditta=ditte.get_int("CODDITTA");
|
set_firm(atol(*riga));
|
||||||
if (prefix().exist(newditta))
|
|
||||||
{
|
|
||||||
set_firm(newditta);
|
|
||||||
TSystemisamfile tab(LF_TAB);
|
TSystemisamfile tab(LF_TAB);
|
||||||
tab.load(txtfile);
|
tab.load(txtfile);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// carica le tabelle nei file di default
|
// carica le tabelle nei file di default
|
||||||
TSystemtempfile tabstd(LF_TAB);
|
TSystemtempfile tabstd(LF_TAB);
|
||||||
TFilename stdtabname(prefix().get_studio());
|
TFilename stdtabname(prefix().get_studio());
|
||||||
@ -579,18 +578,16 @@ bool TInstallmodule_app::install_mod()
|
|||||||
txtfile << "tabmod.txt";
|
txtfile << "tabmod.txt";
|
||||||
if (txtfile.check())
|
if (txtfile.check())
|
||||||
{
|
{
|
||||||
TLocalisamfile ditte(LF_NDITTE);
|
TString_array firms;
|
||||||
for (ditte.first(); !ditte.eof() ; ditte.next())
|
TPrefix::firms(firms);
|
||||||
|
|
||||||
|
FOR_EACH_ARRAY_ROW(firms, r, riga)
|
||||||
{
|
{
|
||||||
const int newditta=ditte.get_int("CODDITTA");
|
set_firm(atol(*riga));
|
||||||
if (prefix().exist(newditta))
|
|
||||||
{
|
|
||||||
set_firm(newditta);
|
|
||||||
TSystemisamfile tabmod(LF_TABMOD);
|
TSystemisamfile tabmod(LF_TABMOD);
|
||||||
tabmod.load(txtfile);
|
tabmod.load(txtfile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ public:
|
|||||||
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){}
|
||||||
|
@ -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