Patch level :4.0 804
Files correlati : Ricompilazione Demo : [ ] Commento :postinstallazione moduli furbizzata(?) git-svn-id: svn://10.65.10.50/trunk@15738 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
5963a39f87
commit
66990e2afa
@ -11,7 +11,7 @@ int main(int argc,char** argv)
|
||||
{
|
||||
TApplication::check_parameters(argc, argv);
|
||||
|
||||
int r=0;
|
||||
int r = 0;
|
||||
if (argc < 2) return 0;
|
||||
TFixed_string mod(argv[2]);
|
||||
mod.lower();
|
||||
|
@ -99,12 +99,9 @@ bool TInstall_BA::something_to_load() const
|
||||
|
||||
bool TInstall_BA::preload_mask()
|
||||
{
|
||||
if (test_database())
|
||||
{
|
||||
TTable iva("%IVA");
|
||||
if (iva.empty())
|
||||
_m->set(F_DATI_IVA, "X");
|
||||
}
|
||||
if (something_to_load())
|
||||
_m->set(F_DATI_IVA, "X");
|
||||
|
||||
return TInstallmodule_app::preload_mask();
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include <modaut.h>
|
||||
#include <tabutil.h>
|
||||
|
||||
#include "bainstlib.h"
|
||||
|
||||
@ -6,11 +7,25 @@ class TInstall_VE : public TInstallmodule_app
|
||||
{
|
||||
protected:
|
||||
virtual int module_number() const {return VEAUT;}
|
||||
virtual bool something_to_load() const;
|
||||
|
||||
public:
|
||||
virtual ~TInstall_VE () {}
|
||||
};
|
||||
|
||||
//le tabelle di vendita, non essendo ministeriali, vengono aggiornate soltanto se vuote! Questo per...
|
||||
//..evitare la comparsa di record non creati dall'utente che va in confusione mentale!!
|
||||
bool TInstall_VE::something_to_load() const
|
||||
{
|
||||
if (test_database())
|
||||
{
|
||||
TTable num("%NUM");
|
||||
if (!num.empty())
|
||||
return false;
|
||||
}
|
||||
return TInstallmodule_app::something_to_load();
|
||||
}
|
||||
|
||||
int bainst31(int argc, char** argv)
|
||||
{
|
||||
TInstall_VE app;
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include <modaut.h>
|
||||
#include <tabutil.h>
|
||||
|
||||
#include "bainstlib.h"
|
||||
|
||||
@ -6,11 +7,25 @@ class TInstall_MG : public TInstallmodule_app
|
||||
{
|
||||
protected:
|
||||
virtual int module_number() const { return MGAUT; }
|
||||
virtual bool something_to_load() const;
|
||||
|
||||
public:
|
||||
virtual ~TInstall_MG () {}
|
||||
};
|
||||
|
||||
//le tabelle di magazzino, non essendo ministeriali, vengono aggiornate soltanto se vuote! Questo per...
|
||||
//..evitare la comparsa di record non creati dall'utente che va in confusione mentale!!
|
||||
bool TInstall_MG::something_to_load() const
|
||||
{
|
||||
if (test_database())
|
||||
{
|
||||
TTable cau("%CAU");
|
||||
if (!cau.empty())
|
||||
return false;
|
||||
}
|
||||
return TInstallmodule_app::something_to_load();
|
||||
}
|
||||
|
||||
int bainst32(int argc, char** argv)
|
||||
{
|
||||
TInstall_MG app;
|
||||
|
@ -443,6 +443,7 @@ bool TInstallmodule_app::ci_sono_novita(const TFilename& filesource, const int f
|
||||
ok = ifile.open_ex() != NOERR; //se il file non e' buono va aggiornato...
|
||||
if (!ok)
|
||||
{
|
||||
ok = ifile.read(_isfirst) != NOERR; //se il file e' vuoto ci sono sicuramente novita'!!!
|
||||
TToken_string tok;
|
||||
while (!ok)
|
||||
{
|
||||
@ -560,11 +561,9 @@ void TInstallmodule_app::run(int argc, char* argv[])
|
||||
TSkeleton_application::run(argc, argv,(const char* )title);
|
||||
}
|
||||
|
||||
|
||||
void TInstallmodule_app::set_tab_app(const char * appname)
|
||||
{
|
||||
TConfig ditta(CONFIG_DITTA);
|
||||
ditta.set_paragraph(module_code());
|
||||
ditta.set("TabApp",appname);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user