Patch level :

Files correlati     :
Ricompilazione Demo : [ ]
Commento            : Riportata la versione 98.01.03pl015


git-svn-id: svn://10.65.10.50/trunk@6574 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1998-04-30 14:38:35 +00:00
parent e06bb56755
commit 449e913e3e
24 changed files with 2100 additions and 838 deletions

View File

@ -45,8 +45,7 @@ protected: // TMask
virtual void update();
public:
virtual bool stop_run(KEY key) { return TWindow::stop_run(key); }
virtual bool stop_run(KEY key) ;
TPicture_mask(const char* name, int dx, int dy, TImage& image);
virtual ~TPicture_mask() {}
};
@ -58,6 +57,13 @@ TPicture_mask::TPicture_mask(const char* name, int dx, int dy, TImage& image)
_image.set_palette(win());
}
bool TPicture_mask::stop_run(KEY key)
{
if (key==K_FORCE_CLOSE)
key=K_QUIT;
return TWindow::stop_run(key);
}
void TPicture_mask::update()
{
if (_image.ok())

View File

@ -7,6 +7,7 @@
#include <printer.h>
#include <utility.h>
#include <urldefid.h>
#include <dongle.h>
#define BITTEST(w,p) (((w) & (0x0001 << (p))) != 0)
#define BITSET(w,p,v) ((v) ? ((w) |= (0x0001 << (p))) : ((w) &= (~(0x0001 << (p)))))
@ -14,6 +15,7 @@
#include "ba1.h"
#include "ba1500.h"
#include "ba1500a.h"
#include "ba1500b.h"
#include "ba1600.h"
#define USERADR 26952
@ -24,6 +26,7 @@
#define LBYTEMASK 0x00FF
#define UBYTEMASK 0xFF00
///////////////////////////////////////////////////////////
TInformazione_moduli::TInformazione_moduli()
@ -33,7 +36,6 @@ TInformazione_moduli::TInformazione_moduli()
TToken_string t;
TString_array descs;
_unassigned_modules = 0;
ifstream in("prassi.aut");
while (!in.eof() && in.good())
{
@ -42,15 +44,13 @@ TInformazione_moduli::TInformazione_moduli()
if (s.empty())
break;
const int l = s.len();
if (l > 2)
if (l >= 3 && s[3] > ' ')
{
t = s.mid(3);
t.add(s.left(2));
}
else
{
t = " "; t.add(" ");
_unassigned_modules++;
} else {
t = "{Modulo Sconosciuto}";
t.add(s.left(2));
}
t.add(mod++);
s = t.get(0);
@ -105,7 +105,7 @@ TDongleType TInformazione_moduli::get_owner(int module) const
return _procom_dongle;
const int aut[] = { CMAUT, ATAUT, POAUT, AFAUT, TCAUT, TMAUT,
VEAUT, MGAUT, ORAUT, EFAUT, DBAUT, SVAUT, -1 };
VEAUT, MGAUT, ORAUT, EFAUT, DBAUT, PRAUT, SVAUT, -1 };
for (int a = 0; aut[a] >= 0; a++)
if (module == aut[a])
return _aga_dongle;
@ -174,20 +174,28 @@ TRequest_form::TRequest_form(const char* name)
void TRequest_form::update_serno(const TString& num)
{
const TDate today(TODAY);
TForm_item& data = find_field('H', odd_page, 101);
TForm_item& data = find_field('H', odd_page, FF_DATARICH);
data.set(today.string());
TForm_item& serno = find_field('H', odd_page, 102);
switch (::dongle().hardware() )
{
case _dongle_eutron:
find_field('H',odd_page,FF_DONGLE_HD).set("EUTRON"); break;
default:
find_field('H',odd_page,FF_DONGLE_HD).set("HARDLOCK"); break;
}
TForm_item& serno = find_field('H', odd_page, FF_DONGLE_SN);
serno.set(num);
}
void TRequest_form::update_dongle(const TDongle& dongle)
{
TForm_item& year = find_field('H', odd_page, 103);
TForm_item& year = find_field('H', odd_page, FF_YEAR);
TString str;
str << "31-12-" << (int)dongle.year_assist();
year.set(str);
TForm_item& user = find_field('H', odd_page, 104);
TForm_item& user = find_field('H', odd_page, FF_NUTENTI);
str.format("%d", dongle.max_users());
user.set(str);
}
@ -223,10 +231,14 @@ protected:
word& serno() { return _serno; }
void generate_key();
void init_mask();
void update_listino();
void load_masklistino(TMask & m);
void save_masklistino(TMask & m);
int build_sheet(bool on = TRUE);
void build_key_column();
bool burn_dongle();
static void keyext(const TString & s, word * v);
@ -245,7 +257,11 @@ protected:
static bool assist_handler(TMask_field& fld, KEY key);
static bool print_handler(TMask_field& fld, KEY key);
static bool aggiorna_listino_handler(TMask_field& fld, KEY key);
static bool modifica_listino_handler(TMask_field& fld, KEY key);
static bool aga_handler(TMask_field& fld, KEY key);
static bool sh_nposti_handler(TMask_field& fld, KEY key);
static bool sh_acquisto_handler(TMask_field& fld, KEY key);
static bool sh_aggiornamento_handler(TMask_field& fld, KEY key);
protected:
void print_request();
@ -261,17 +277,172 @@ public:
HIDDEN TAttivazione_moduli& app() { return (TAttivazione_moduli &)main_app(); }
int round_price(int val)
{
if (val>50000)
val=int((val+9)/10000)*10000;
else
val=int((val+9)/10)*10;
return val;
}
bool TAttivazione_moduli::sh_nposti_handler(TMask_field& fld, KEY key)
{
if (key == K_TAB && fld.focusdirty())
{
// default
int posti = atoi(fld.get());
if (posti<=1)
return TRUE;
int val = fld.mask().get_int(F_ACQ1);
switch (posti)
{
case 2:
val = int(val * .30); break;
case 3:
val = int(val * .20); break;
case 5:
val = int(val * .15); break;
case 9:
val = int(val * .10); break;
case 30:
val = int(val * .05); break;
default:
val=0;
}
val = round_price(val);
if (fld.mask().field(fld.dlg()+1).empty())
fld.mask().field(fld.dlg()+1).set(val) ; // costo di acquisto
val=fld.mask().get_int(fld.dlg()+1);
val = int (val * .35);
val = round_price(val);
fld.mask().field(fld.dlg()+2).set(val) ; // costo di aggiornamento
}
return TRUE;
}
bool TAttivazione_moduli::sh_acquisto_handler(TMask_field& fld, KEY key)
{
return TRUE;
}
bool TAttivazione_moduli::sh_aggiornamento_handler(TMask_field& fld, KEY key)
{
if (key == K_TAB && fld.empty())
{
}
return TRUE;
}
void TAttivazione_moduli::update_listino()
{
TMask msklistino("ba1500b") ;
TMask &smask = msklistino.sfield(F_MODULILIST).sheet_mask();
for (int c=0; c<6; c++)
{
smask.set_handler(F_POSTI1+3*c, sh_nposti_handler );
smask.set_handler(F_ACQ1+3*c, sh_acquisto_handler );
smask.set_handler(F_AGG1+3*c, sh_aggiornamento_handler);
}
load_masklistino(msklistino);
if (msklistino.run()==K_ENTER)
{
save_masklistino(msklistino);
}
}
void TAttivazione_moduli::load_masklistino(TMask &msklistino)
{
TWait_cursor hourglass;
TInstall_ini ini;
TDate dt(ini.get("Listino","Main"));
if (!dt.empty())
msklistino.set(F_DATALIST,dt);
TSheet_field& sf = msklistino.sfield(F_MODULILIST);
for (int i = 0; i < MAX_AUT; i++)
{
const TString16 modname(_im->get_name_by_order(i));
if (modname.empty())
break;
TToken_string& riga = sf.row(i);
riga=modname;
const TFixed_string d(_im->get_description_by_order(i));
riga.add(d);
riga.trim();
riga.add("1"); // prima colonna = monoutenza
TString_array prices;
ini.set_paragraph(modname);
ini.list_variables(prices, TRUE,modname,TRUE); // get array sorted by var name
FOR_EACH_ARRAY_ROW(prices, v, key)
{
const TFixed_string price(key->get(0));
if (price.compare("Prezzo", 6, TRUE) == 0)
{
TString16 colonna(price.sub(7,price.len()-1));
if (atoi(colonna) != 1)
riga.add(colonna);
TToken_string valori(key->get(1),',');
riga.add(valori.get(0));
riga.add(valori.get(1));
}
}
sf.check_row(i);
}
}
void TAttivazione_moduli::save_masklistino(TMask &msklistino)
{
TWait_cursor hourglass;
TInstall_ini ini;
ini.set_paragraph("Main");
ini.set("Listino",msklistino.get(F_DATALIST));
TSheet_field& sf = (TSheet_field&)msklistino.field(F_MODULILIST);
const int items=sf.items();
for (int i = 0; i < items; i++)
{
TToken_string& riga = sf.row(i);
TString tmpstr(riga.get(0));
ini.set_paragraph(tmpstr);
int nposti;
for (int col=0; col < 6; col++)
{
const char * p=riga.get(3*col+2);
if (p==NULL || (nposti=atoi(p))==0 )
break;
tmpstr = riga.get(3*col+3);
if (tmpstr.blank())
continue;
tmpstr << ',' << riga.get(3*col+4);
TString16 varname("Prezzo");
varname << '(' << nposti << ')';
ini.set(varname,tmpstr);
if (ini.new_paragraph())
ini.set("Descrizione",riga.get(1));
}
}
}
int TAttivazione_moduli::build_sheet(bool on)
{
int nmod = 0;
TSheet_field& sf = (TSheet_field&)_msk->field(F_MODULI);
for (int i = 0; i < MAX_AUT; i++)
{
if (*_im->get_name_by_order(i)=='\0')
break;
const TFixed_string d(_im->get_description_by_order(i));
if (d.blank())
continue;
TToken_string& riga = sf.row(i);
riga = d; riga.trim();
riga = d;
riga.trim();
const int module = _im->get_module_by_order(i);
const bool ics = module == 0 || (on && ::dongle().active(module));
@ -573,7 +744,7 @@ bool TAttivazione_moduli::aga_handler(TMask_field& fld, KEY key)
return TRUE;
}
void TAttivazione_moduli::generate_key()
void TAttivazione_moduli::init_mask()
{
const TDate oggi(TODAY);
const int nmod = build_sheet();
@ -591,6 +762,7 @@ void TAttivazione_moduli::generate_key()
garble(ud);
_msk->set(F_K1, format("%04X%04X%04X%04X", ud[0], ud[1], ud[2], ud[3]));
_msk->set_caption("Attivazione HARDLOCK");
}
else
{
@ -598,6 +770,7 @@ void TAttivazione_moduli::generate_key()
_msk->hide(F_K2);
_msk->hide(F_K3);
_msk->hide(F_K4);
_msk->set_caption("Attivazione EUTRON");
}
_msk->set(F_SN, ::dongle().number());
@ -789,6 +962,16 @@ bool TAttivazione_moduli::k_notify(TSheet_field& f, int r, KEY k)
return TRUE;
}
bool TAttivazione_moduli::modifica_listino_handler(TMask_field& fld, KEY key)
{
bool ok = TRUE;
if (key == K_SPACE)
{
app().update_listino();
}
return ok;
}
bool TAttivazione_moduli::aggiorna_listino_handler(TMask_field& fld, KEY key)
{
bool ok = TRUE;
@ -800,7 +983,7 @@ bool TAttivazione_moduli::aggiorna_listino_handler(TMask_field& fld, KEY key)
while (!name.exist())
{
TMask msk("Aggiornamento listino", 1, -1, -1, 60, 4);
msk.add_string(DLG_USER, 0, "Percorso", 1, 1, 50);
msk.add_string(DLG_USER, 0, "Percorso ", 1, 1, 50);
msk.add_button(DLG_CANCEL, 0, "", -12, -1, 10, 2);
msk.add_button(DLG_OK, 0, "", -22, -1, 10, 2);
msk.set(DLG_USER, name);
@ -810,7 +993,7 @@ bool TAttivazione_moduli::aggiorna_listino_handler(TMask_field& fld, KEY key)
{
ok = FALSE;
break;
}
}
}
if (ok)
ok = ini.update_prices(name);
@ -828,9 +1011,12 @@ void TAttivazione_moduli::print_request()
TForm_item& manut = form.find_field('B', odd_page, 105);
TInstall_ini ini;
ini.write_protect();
const bool special = _wanted_assist > ::dongle().year_assist() || _wanted_users != 0;
const word users = max(_wanted_users, ::dongle().max_users());
TWait_cursor hourglass;
TSheet_field& sheet = _msk->sfield(F_MODULI);
for (TDongleType owner = _aga_dongle;
owner <= _procom_dongle;
@ -841,7 +1027,8 @@ void TAttivazione_moduli::print_request()
FOR_EACH_SHEET_ROW(sheet, r, row)
{
const int module = _im->get_module_by_order(r);
//const int module = _im->get_module_by_order(r);
const int module = row->get_int(2) ;
const bool active = ::dongle().active(module);
const bool wanted = *row->get(1) > ' ';
@ -855,6 +1042,15 @@ void TAttivazione_moduli::print_request()
if (found == 0)
{
printer().open();
switch (owner)
{
case _procom_dongle:
form.find_field('H',odd_page,1).set("GEISOFT"); break;
case _prassi_dongle:
form.find_field('H',odd_page,1).set("PR.A.S.S.I."); break;
default: //case _aga_dongle:
form.find_field('H',odd_page,1).set("A.G.A."); break;
}
form.update_serno(_msk->get(F_SN));
form.update_dongle(::dongle());
}
@ -886,7 +1082,7 @@ void TAttivazione_moduli::print_request()
form.print(-1);
}
if (special && found > 0)
{
codice.set("");
@ -1018,16 +1214,19 @@ bool TAttivazione_moduli::create()
_msk->set_handler(F_CHANGEUSERS, change_users_handler);
_msk->set_handler(F_CHANGEASSIST, change_assist_handler);
_msk->set_handler(F_PRINT, print_handler);
_msk->set_handler(F_AGGLISTINO, aggiorna_listino_handler);
if (::dongle().type() == _aga_dongle)
{
_msk->show(F_AGA);
_msk->set_handler(F_AGA, aga_handler);
_msk->show(F_MODLISTINO);
_msk->set_handler(F_MODLISTINO, modifica_listino_handler);
}
TSheet_field& sf = _msk->sfield(F_MODULI);
sf.set_notify(k_notify);
const int un = _im->unassigned();
//const int un = _im->unassigned();
const TDongleType mydongle = ::dongle().type();
switch (mydongle)
{
@ -1042,7 +1241,7 @@ bool TAttivazione_moduli::create()
_msk->enable(F_DT);
_msk->set_handler(F_DT, date_hnd);
generate_key();
init_mask();
sf.enable_column(F_KEY, serno() != 0);
}
break;
@ -1058,18 +1257,18 @@ bool TAttivazione_moduli::create()
}
_msk->set_handler(F_SN, serno_hnd);
_msk->enable(F_SN);
init_mask();
sf.sheet_mask().field(F_ENABLE).set_handler(activate_hnd);
build_sheet(FALSE);
for (int i = un; i < MAX_AUT; i++)
for (int i = 0; i < MAX_AUT; i++)
{
const int af = _im->get_module_by_order(i);
const int index = i-un;
if (af == 0)
sf.disable_cell(index,1);
sf.disable_cell(i,1);
else
sf.enable_cell(index,1,_im->test_owner(af, mydongle));
sf.enable_cell(i,1,_im->test_owner(af, mydongle));
}
build_key_column();

View File

@ -17,8 +17,17 @@
#define F_CHANGEASSIST 217
#define F_PRINT 218
#define F_AGA 219
#define F_AGGLISTINO 220
#define F_MODLISTINO 221
#define F_NOMEMOD 101
#define F_ENABLE 102
#define F_CODE 103
#define F_KEY 104
#define FF_DATARICH 101
#define FF_DONGLE_HD 102
#define FF_DONGLE_SN 103
#define FF_YEAR 104
#define FF_NUTENTI 105

View File

@ -69,23 +69,36 @@ END
STRING F_K3 16
BEGIN
PROMPT 1 3 "Attivazione 2 "
PROMPT 1 2 "Attivazione 2 "
FLAGS "U"
END
STRING F_K4 16
BEGIN
PROMPT 35 3 ""
PROMPT 35 2 ""
FLAGS "U"
END
BUTTON F_AGGLISTINO 18
BEGID
PROMPT 1 3 "Aggiorna listino"
END
BUTTON F_MODLISTINO 18
BEGID
PROMPT 1 4 "Modifica listino"
FLAGS "H"
END
BUTTON F_AGA 14
BEGID
PROMPT 1 4 "Produttore"
PROMPT 22 4 " Produttore "
FLAGS "H"
END
SPREADSHEET F_MODULI 78
SPREADSHEET F_MODULI
BEGIN
PROMPT 1 5 "Moduli"
ITEM "Modulo@40"

34
ba/ba1500b.h Executable file
View File

@ -0,0 +1,34 @@
#define F_DATALIST 101
#define F_MODULILIST 102
#define F_COLONNA1 103
#define F_COLONNA2 104
#define F_COLONNA3 105
#define F_COLONNA4 106
#define F_COLONNA5 107
#define F_COLONNA6 108
#define F_COLONNA7 109
#define F_COLONNA8 110
#define F_COLONNA9 111
#define F_COLONNA10 112
#define F_NOMEMOD 101
#define F_DESCRMOD 102
#define F_POSTI1 103
#define F_ACQ1 104
#define F_AGG1 105
#define F_POSTI2 106
#define F_ACQ2 107
#define F_AGG2 108
#define F_POSTI3 109
#define F_ACQ3 110
#define F_AGG3 111
#define F_POSTI4 112
#define F_ACQ4 113
#define F_AGG4 114
#define F_POSTI5 115
#define F_ACQ5 116
#define F_AGG5 117
#define F_POSTI6 118
#define F_ACQ6 119
#define F_AGG6 120

260
ba/ba1500b.uml Executable file
View File

@ -0,0 +1,260 @@
#include "ba1500b.h"
TOOLBAR "" 0 20 0 2
BUTTON DLG_OK 10 2
BEGIN
PROMPT -12 -1 ""
END
BUTTON DLG_QUIT 10 2
BEGIN
PROMPT -22 -1 ""
END
ENDPAGE
PAGE "Modifica listino" -1 -1 79 21
DATE F_DATALIST
BEGIN
PROMPT 2 2 "Listino del "
FLAGS "A"
END
/*
TEXT DLG_NULL
BEGIN
PROMPT 18 3 "Col.1"
END
NUMBER F_COLONNA1 2
BEGIN
PROMPT 2 4 "Numero posti "
FLAGS "D"
END
TEXT DLG_NULL
BEGIN
PROMPT 28 3 "Col.2"
END
NUMBER F_COLONNA2 2
BEGIN
PROMPT 29 4 ""
MESSAGE ENABLE,F_COLONNA3
MESSAGE EMPTY DISABLE,F_COLONNA3
END
TEXT DLG_NULL
BEGIN
PROMPT 34 3 "Col.3"
END
NUMBER F_COLONNA3 2
BEGIN
PROMPT 35 4 ""
MESSAGE ENABLE,F_COLONNA4
MESSAGE EMPTY DISABLE,F_COLONNA4
END
TEXT DLG_NULL
BEGIN
PROMPT 44 3 "Col.4"
END
NUMBER F_COLONNA4 2
BEGIN
PROMPT 41 4 ""
MESSAGE ENABLE,F_COLONNA5
MESSAGE EMPTY DISABLE,F_COLONNA5
END
TEXT DLG_NULL
BEGIN
PROMPT 46 3 "Col.5"
END
NUMBER F_COLONNA5 2
BEGIN
PROMPT 47 4 ""
MESSAGE ENABLE,F_COLONNA6
MESSAGE EMPTY DISABLE,F_COLONNA6
END
TEXT DLG_NULL
BEGIN
PROMPT 52 3 "Col.6"
END
NUMBER F_COLONNA6 2
BEGIN
PROMPT 53 4 ""
// MESSAGE ENABLE,F_COLONNA7
// MESSAGE EMPTY DISABLE,F_COLONNA7
END
*/
SPREADSHEET F_MODULILIST
BEGIN
PROMPT 1 5 "Moduli"
ITEM "Modulo@F"
ITEM "Descrizione@40"
ITEM "Posti"
ITEM "Acquisto"
ITEM "Aggiornamento"
ITEM "Posti"
ITEM "Acquisto"
ITEM "Aggiornamento"
ITEM "Posti"
ITEM "Acquisto"
ITEM "Aggiornamento"
ITEM "Posti"
ITEM "Acquisto"
ITEM "Aggiornamento"
ITEM "Posti"
ITEM "Acquisto"
ITEM "Aggiornamento"
ITEM "Posti"
ITEM "Acquisto"
ITEM "Aggiornamento"
END
ENDPAGE
ENDMASK
PAGE "Campo" -1 -1 79 18
STRING F_NOMEMOD 2
BEGIN
PROMPT 1 1 "Codice modulo "
FLAGS "D"
END
STRING F_DESCRMOD 40
BEGIN
PROMPT 1 2 "Descrizione "
FLAGS "D"
END
NUMBER F_POSTI1 2
BEGIN
PROMPT 1 3 "Numero posti "
FLAGS "D"
END
NUMBER F_ACQ1 7
BEGIN
PROMPT 18 3 "Acquisto "
END
NUMBER F_AGG1 7
BEGIN
PROMPT 44 3 "Aggiornamento "
END
NUMBER F_POSTI2 2
BEGIN
PROMPT 1 4 "Numero posti "
MESSAGE ENABLE ,F_ACQ2|ENABLE ,F_AGG2 |ENABLE,F_POSTI3
MESSAGE EMPTY DISABLE ,F_ACQ2|DISABLE ,F_AGG2|CLEAR,F_POSTI3|CHECK,F_POSTI3
END
NUMBER F_ACQ2 7
BEGIN
PROMPT 18 4 "Acquisto "
END
NUMBER F_AGG2 7
BEGIN
PROMPT 44 4 "Aggiornamento "
END
NUMBER F_POSTI3 2
BEGIN
PROMPT 1 5 "Numero posti "
MESSAGE ENABLE ,F_ACQ3|ENABLE ,F_AGG3|ENABLE,F_POSTI4
MESSAGE EMPTY DISABLE ,F_ACQ3|DISABLE ,F_AGG3|CLEAR,F_POSTI4|CHECK,F_POSTI4
END
NUMBER F_ACQ3 7
BEGIN
PROMPT 18 5 "Acquisto "
END
NUMBER F_AGG3 7
BEGIN
PROMPT 44 5 "Aggiornamento "
END
NUMBER F_POSTI4 2
BEGIN
PROMPT 1 6 "Numero posti "
MESSAGE ENABLE ,F_ACQ4|ENABLE ,F_AGG4|ENABLE,F_POSTI5
MESSAGE EMPTY DISABLE ,F_ACQ4|DISABLE ,F_AGG4|CLEAR,F_POSTI5|CHECK,F_POSTI5
END
NUMBER F_ACQ4 7
BEGIN
PROMPT 18 6 "Acquisto "
END
NUMBER F_AGG4 7
BEGIN
PROMPT 44 6 "Aggiornamento "
END
NUMBER F_POSTI5 2
BEGIN
PROMPT 1 7 "Numero posti "
MESSAGE ENABLE ,F_ACQ5|ENABLE ,F_AGG5|ENABLE,F_POSTI6
MESSAGE EMPTY DISABLE ,F_ACQ5|DISABLE ,F_AGG5|CLEAR,F_POSTI6|CHECK,F_POSTI6
END
NUMBER F_ACQ5 7
BEGIN
PROMPT 18 7 "Acquisto "
END
NUMBER F_AGG5 7
BEGIN
PROMPT 44 7 "Aggiornamento "
END
NUMBER F_POSTI6 2
BEGIN
PROMPT 1 8 "Numero posti "
MESSAGE ENABLE ,F_ACQ6|ENABLE ,F_AGG6
MESSAGE EMPTY DISABLE ,F_ACQ6|DISABLE ,F_AGG6
END
NUMBER F_ACQ6 7
BEGIN
PROMPT 18 8 "Acquisto "
END
NUMBER F_AGG6 7
BEGIN
PROMPT 44 8 "Aggiornamento "
END
BUTTON DLG_OK 10 2
BEGIN
PROMPT -12 -1 ""
END
BUTTON DLG_CANCEL 10 2
BEGIN
PROMPT -22 -1 ""
END
ENDPAGE
ENDMASK

View File

@ -166,8 +166,8 @@ bool TInstall_ini::update_prices(const char* from)
CHECK(fexist(from), "Can't find listino prezzi");
TConfig from_ini(from);
from_ini.write_protect();
const TDate curr_date = get("Listino","Main");
const TDate from_date = from_ini.get("Listino","Main");
const TDate curr_date(get("Listino","Main"));
const TDate from_date(from_ini.get("Listino","Main"));
if (from_date < curr_date)
return FALSE;
@ -178,6 +178,7 @@ bool TInstall_ini::update_prices(const char* from)
FOR_EACH_ARRAY_ROW_BACK(modules, r, row) if (row->len() == 2)
{
TAssoc_array& prices = from_ini.list_variables(*row);
set_paragraph(*row);
FOR_EACH_ASSOC_STRING(prices, obj, key, str)
{
const TFixed_string price(key);
@ -287,10 +288,10 @@ TAuto_token_string& TAuto_token_string::create(const char* ts)
}
///////////////////////////////////////////////////////////
// Maschera modulo
// Maschera composizione del modulo
///////////////////////////////////////////////////////////
class TModule_mask : public TMask
class TMod_composition_msk : public TMask
{
protected:
static bool sheet_notify(TSheet_field& sf, int row, KEY key);
@ -307,12 +308,12 @@ public:
void load(const TString& module);
void save();
TModule_mask();
virtual ~TModule_mask() { }
TMod_composition_msk();
virtual ~TMod_composition_msk() { }
};
// Cerca un file nello sheet principale
bool TModule_mask::find(const TString& name) const
bool TMod_composition_msk::find(const TString& name) const
{
TSheet_field& sf = sfield(F_SHEET);
FOR_EACH_SHEET_ROW_BACK(sf, r, row)
@ -324,7 +325,7 @@ bool TModule_mask::find(const TString& name) const
}
// Toglie il file dallo sheet dei mancanti
bool TModule_mask::kill_missing(const char* name, bool update)
bool TMod_composition_msk::kill_missing(const char* name, bool update)
{
TSheet_field& miss = sfield(F_MISSING);
FOR_EACH_SHEET_ROW_BACK(miss, r, row)
@ -338,7 +339,7 @@ bool TModule_mask::kill_missing(const char* name, bool update)
return r >= 0;
}
bool TModule_mask::sheet_notify(TSheet_field& sf, int r, KEY key)
bool TMod_composition_msk::sheet_notify(TSheet_field& sf, int r, KEY key)
{
bool ok = TRUE;
switch(key)
@ -357,7 +358,7 @@ bool TModule_mask::sheet_notify(TSheet_field& sf, int r, KEY key)
if (items > 0)
{
TModule_mask& msk = (TModule_mask&)sf.mask();
TMod_composition_msk& msk = (TMod_composition_msk&)sf.mask();
TString16 module = sf.row(r).get(2);
if (module.len() < 3)
@ -426,7 +427,7 @@ bool TModule_mask::sheet_notify(TSheet_field& sf, int r, KEY key)
return ok;
}
bool TModule_mask::missing_notify(TSheet_field& sf, int r, KEY key)
bool TMod_composition_msk::missing_notify(TSheet_field& sf, int r, KEY key)
{
bool ok = TRUE;
if (key == K_INS)
@ -452,7 +453,7 @@ bool TModule_mask::missing_notify(TSheet_field& sf, int r, KEY key)
return ok;
}
bool TModule_mask::file_handler(TMask_field& f, KEY k)
bool TMod_composition_msk::file_handler(TMask_field& f, KEY k)
{
if (k == K_F9)
{
@ -493,14 +494,14 @@ bool TModule_mask::file_handler(TMask_field& f, KEY k)
if (k = K_TAB && f.focusdirty())
{
TModule_mask& msk = (TModule_mask&)f.mask().get_sheet()->mask();
TMod_composition_msk& msk = (TMod_composition_msk&)f.mask().get_sheet()->mask();
msk.kill_missing(f.get(), TRUE);
}
return TRUE;
}
bool TModule_mask::edit_handler(TMask_field& f, KEY k)
bool TMod_composition_msk::edit_handler(TMask_field& f, KEY k)
{
if (k == K_SPACE)
{
@ -517,7 +518,7 @@ bool TModule_mask::edit_handler(TMask_field& f, KEY k)
return TRUE;
}
bool TModule_mask::link_handler(TMask_field& f, KEY k)
bool TMod_composition_msk::link_handler(TMask_field& f, KEY k)
{
if (k == K_SPACE)
{
@ -542,7 +543,7 @@ bool TModule_mask::link_handler(TMask_field& f, KEY k)
return TRUE;
}
bool TModule_mask::deselect_handler(TMask_field& f, KEY k)
bool TMod_composition_msk::deselect_handler(TMask_field& f, KEY k)
{
if (k == K_SPACE)
{
@ -565,7 +566,7 @@ static int file_compare(const TObject** o1, const TObject** o2)
return cmp;
}
void TModule_mask::load(const TString& module)
void TMod_composition_msk::load(const TString& module)
{
TWait_cursor hourglass;
set(F_MODULE, module);
@ -619,7 +620,7 @@ void TModule_mask::load(const TString& module)
arr.sort();
}
void TModule_mask::save()
void TMod_composition_msk::save()
{
TWait_cursor hourglass;
TSheet_field& sheet = sfield(F_SHEET);
@ -667,7 +668,7 @@ void TModule_mask::save()
}
TModule_mask::TModule_mask()
TMod_composition_msk::TMod_composition_msk()
: TMask("ba1600b")
{
set_handler(F_DESELECT, deselect_handler);
@ -683,6 +684,22 @@ TModule_mask::TModule_mask()
miss.sheet_mask().set_handler(100, link_handler);
}
///////////////////////////////////////////////////////////
// Maschera del modulo
///////////////////////////////////////////////////////////
class TModule_mask : public TMask
{
bool _dirty_composition;
bool module_dependent(int row, TString_array &p_submodules, TString16 &sub_mod, TString16 &ver, int & patch) const ;
public:
bool check_needed() {return _dirty_composition;}
void need_check( bool val=TRUE ) {_dirty_composition=val;}
bool check_patchlevels( TMod_composition_msk &mm);
~TModule_mask() {}
};
///////////////////////////////////////////////////////////
// Maschera principale
///////////////////////////////////////////////////////////
@ -690,11 +707,12 @@ TModule_mask::TModule_mask()
class TFascicolator_mask : public TMask
{
protected:
static bool sheet_notify(TSheet_field& f, int row, KEY k);
static bool confirm_handler(TMask_field& f, KEY k);
static bool list_handler(TMask_field& f, KEY k);
static bool save_handler(TMask_field& f, KEY k);
static bool import_export_handler(TMask_field& f, KEY k);
static bool modules_notify(TSheet_field& f, int row, KEY k);
bool zip_file(const char* archive, const char* file) const;
int split_file(const TFilename& file, long size) const;
@ -714,29 +732,153 @@ public:
TFascicolator_mask();
virtual ~TFascicolator_mask() { }
};
bool TFascicolator_mask::sheet_notify(TSheet_field& f, int row, KEY k)
bool TFascicolator_mask::modules_notify(TSheet_field& f, int row, KEY k)
{
bool ok = TRUE;
if (k == K_INS || k == K_DEL)
ok = FALSE;
if (k == K_TAB)
{
TModule_mask &mm =(TModule_mask &)f.sheet_mask();
mm.need_check(FALSE);
}
return ok;
}
// controlla se il modulo in curr_row dipende da uno dei sottomoduli nell'array p_submodules
// e ne restituisce :
//TString16 &sub_mod, : il codice del (primo) sottomodulo da cui dipende
//TString16 &ver, : la propria versione
//int & patch : la propria patchlevel
bool TModule_mask::module_dependent(int rownum, TString_array &p_submodules, TString16 &sub_mod, TString16 &ver, int & patch) const
{
TSheet_field& modsheet = get_sheet()->mask().sfield(F_SHEET);
TToken_string& curr_row=modsheet.row(rownum);
TAuto_token_string ext_mod=curr_row.get(modsheet.cid2index(S_EXTERN));
const int smods = ext_mod.blank() ? 0 : ext_mod.items() ;
for (int c=0; c < smods; c++)
{
// is an external SUB module ?
sub_mod = ext_mod.get(c);
if (sub_mod[2]!='\0' )
{
// check patched submodules
const int pmods = p_submodules.items();
for (int p=0; p < pmods; p++)
{
if (p_submodules.row(p) == sub_mod)
{
ver=curr_row.get(modsheet.cid2index(S_VERSION));
patch=atoi(curr_row.get(modsheet.cid2index(S_PATCHLEVEL)));
return TRUE;
}
} // loop over patched modules
}
} // loop over external modules
return FALSE;
}
bool TModule_mask::check_patchlevels( TMod_composition_msk &mm)
{
const TString& module = get(S_MODULE);
const TString& version =get(S_VERSION);
const int patchlev = get_int(S_PATCHLEVEL);
// crea la lista dei sottomoduli
TSheet_field& sf = mm.sfield(F_SHEET);
TString_array patched_submodules,submodules;
FOR_EACH_SHEET_ROW(sf, idx, riga)
{
TToken_string& curr_row=sf.row(idx);
TString16 submod = curr_row.get(2);
if (*curr_row.get(1)>' ')
{
if (patched_submodules.find(submod)<0)
patched_submodules.add(submod);
} else {
if (submodules.find(submod)<0)
submodules.add(submod);
}
}
// cerca i moduli che includono i sottomoduli patchati
bool need_update(FALSE);
TString16 sub_mod, sub_ver;
int sub_patch;
TSheet_field& modsheet = get_sheet()->mask().sfield(F_SHEET);
FOR_EACH_SHEET_ROW(modsheet, midx, mriga)
{
TToken_string& curr_row=modsheet.row(midx);
TString16 mod_code(curr_row.get(modsheet.cid2index(S_MODULE)));
if (module_dependent(midx,patched_submodules, sub_mod, sub_ver, sub_patch))
{
if (version == sub_ver)
{
if ( patchlev > sub_patch
&& yesno_box("Il modulo '%s' dipende dal sottomodulo '%s'.\n Aggiorno il suo numero di patch a %d ?",(const char *)mod_code,(const char *)sub_mod,patchlev))
{
curr_row.add(patchlev , modsheet.cid2index(S_PATCHLEVEL));
curr_row.add(get(S_DATE) , modsheet.cid2index(S_DATE));
need_update=TRUE;
}
} else
if (!sub_ver.blank())
warning_box("Il modulo '%s', dipendente dal sottomodulo '%s' \nha codice di release %s",
(const char *)mod_code, (const char *)sub_mod,(const char *)sub_ver);
}
else if (module_dependent(midx,submodules, sub_mod, sub_ver, sub_patch))
{
if (version == sub_ver)
{
if ( patchlev > sub_patch
&& noyes_box("Il modulo '%s' dipende da sottomoduli del modulo '%s'.\n Aggiorno il suo numero di patch a %d ?",(const char *)mod_code,(const char *)module,patchlev))
{
curr_row.add(patchlev , modsheet.cid2index(S_PATCHLEVEL));
curr_row.add(get(S_DATE) , modsheet.cid2index(S_DATE));
need_update=TRUE;
}
} else
if (!sub_ver.blank())
warning_box("Il modulo '%s', dipendente da sottomoduli del modulo '%s'\nha codice di release %s",
(const char *)mod_code, (const char *)sub_mod,(const char *)sub_ver);
}
}
if (need_update)
modsheet.force_update();
return TRUE;
}
bool TFascicolator_mask::patchl_handler(TMask_field& f, KEY k)
{
if (k == K_TAB && f.focusdirty())
{
TModule_mask& m = (TModule_mask&)f.mask();
m.need_check();
}
return TRUE;
}
bool TFascicolator_mask::list_handler(TMask_field& f, KEY k)
{
if (k == K_SPACE)
{
const TMask& m = f.mask();
TModule_mask& m = (TModule_mask&)f.mask();
const TString& module = m.get(S_MODULE);
const int patchlev = m.get_int(S_PATCHLEVEL);
if (module.not_empty())
{
TModule_mask mm;
TMod_composition_msk mm;
mm.load(module);
if (mm.run() == K_ENTER)
mm.save();
}
}
m.need_check();
}
}
}
return TRUE;
}
@ -744,13 +886,14 @@ bool TFascicolator_mask::confirm_handler(TMask_field& f, KEY k)
{
if (k == K_SPACE)
{
TMask& m = f.mask();
TModule_mask& m = (TModule_mask& )f.mask();
const TString& module = m.get(S_MODULE);
const patchlevel=m.get_int(S_PATCHLEVEL);
{
TInstall_ini ini;
ini.set_paragraph(module);
ini.set("Versione", m.get(S_VERSION));
ini.set("Patch", m.get(S_PATCHLEVEL));
ini.set("Patch", patchlevel);
ini.set("Data", m.get(S_DATE));
ini.set("Moduli", m.get(S_EXTERN));
ini.set("PreProcess", m.get(S_PREPROCESS));
@ -768,6 +911,13 @@ bool TFascicolator_mask::confirm_handler(TMask_field& f, KEY k)
}
}
}
if (patchlevel>0 && m.check_needed())
{
// controlla le consistenze tra patch di moduli diversi intrinsecamente correlati
TMod_composition_msk mc;
mc.load(module);
m.check_patchlevels(mc);
}
}
return TRUE;
}
@ -1296,7 +1446,7 @@ TFascicolator_mask::TFascicolator_mask()
: TMask("ba1600a")
{
TSheet_field& s = sfield(F_SHEET);
s.set_notify(sheet_notify);
s.set_notify(modules_notify);
TMask& m = s.sheet_mask();
m.set_handler(DLG_OK, confirm_handler);

View File

@ -23,6 +23,7 @@
#define C_CURRDATAREL 8
#define C_ISPATCH 9
HIDDEN int compare_version(const char* v1, int p1, const char* v2, int p2)
{
TString16 ver1(v1), ver2(v2);
@ -78,6 +79,7 @@ protected:
bool can_install(const char* module, TInstall_ini& ini);
void install_selection();
bool install_patches(const TString& module, const TString& lastrelease, int lastpatch);
bool do_process(TToken_string& commands) const;
bool pre_process(TInstall_ini& ini, const char* module) const;
@ -277,9 +279,13 @@ bool TInstaller_mask::autoload()
found=(module == row(r).get(C_CODE) );
if (found)
{
const char * patchversion = ini.get("Versione");
if (mask_rows.row(r+1).get(C_RELEASE) == patchversion)
mask_rows.row(r+1).add(patchlevel, C_PATCH);
TString16 patchversion = ini.get("Versione");
if (patchversion == mask_rows.row(r+1).get(C_RELEASE) // se le versioni corrispondono ...
&& patchlevel > atoi(mask_rows.row(r+1).get(C_PATCH)) ) // ..e il patchlevel è superiore
{
mask_rows.row(r+1).add(patchlevel, C_PATCH); // aggiorna il patchlevel mostrato per il modulo
force_update(r+1);
}
} else
add_module(ini, module, TRUE);
}
@ -474,7 +480,9 @@ bool TInstaller_mask::move_module(const TString& module, TInstall_ini& ini, bool
bool TInstaller_mask::install(const TString& module, int patchlevel)
{
bool ok = FALSE;
TString16 lastrelease; // release che sto installando
int lastpatch=patchlevel; // patchlevel che sto installando
const TString& path = get(F_PATH);
TFilename ininame = path;
ininame.add(module);
@ -493,6 +501,8 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
TInstall_ini ini(ininame);
ini.write_protect();
lastpatch=ini.get_int("Patch",module);
lastrelease=ini.get("Versione",module);
if (!can_install(module, ini))
return FALSE;
@ -507,7 +517,7 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
ok = pre_process(ini, module);
if (!ok) return FALSE;
}
TString msg("Decompressione");
if (patchlevel > 0 )
msg << " della patch " << patchlevel ;
@ -599,6 +609,7 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
}
else
{
// non c'e' il .ini del modulo ma un unico "install.ini"
ininame = path;
ininame.add(TInstall_ini::default_name());
ok = fexist(ininame);
@ -606,6 +617,8 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
{
TInstall_ini ini(ininame);
ini.write_protect();
lastpatch=ini.get_int("Patch",module);
lastrelease=ini.get("Versione",module);
if (!can_install(module, ini))
return FALSE;
@ -640,16 +653,51 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
if (ok)
{
TInstall_ini ini;
ini.set("DiskPath", path);
ini.set("Data", TDate(TODAY), module);
ini.update_prices(ininame);
{
TInstall_ini ini;
ini.set("DiskPath", path);
ini.set("Data", TDate(TODAY), module);
ini.update_prices(ininame);
}
// Non togliere le parentesi graffe soprastanti per permettere l'aggiornamento fisico del .ini (CON LA CHIAMATA DEL DISTRUTTORE)
update_version();
}
// Non spostare nell'if precedente: permettere l'aggiornamento del .ini
if (ok)
update_version();
if (patchlevel == 0) // Se installo un modulo pricipale ...
{
// ... installo DOPO tutte le patches successive
install_patches(module, lastrelease, lastpatch);
}
return ok;
}
bool TInstaller_mask::install_patches(const TString& module, const TString& lastrelease, int lastpatch)
{
bool ok = FALSE;
TString_array modules;
TFilename ininame = get(F_PATH);
ininame.add(module);
ininame << "0???a.ini";
modules.destroy();
list_files(ininame, modules);
modules.sort(); // sort by patch number
FOR_EACH_ARRAY_ROW(modules, am, arow)
{
TString& ininame = *arow;
ininame.lower();
const int pos = ininame.find("a.ini");
CHECKS(pos >= 6, "Invalid installation configuration: ", (const char*)ininame);
const TString16 patchmodule = ininame.mid(pos-6, 2);
TConfig ini(ininame, patchmodule);
const int patchlevel = ini.get_int("Patch");
const char * patchversion = ini.get("Versione");
if (lastrelease == patchversion // installa solo le patch della stessa ver..
&& lastpatch < patchlevel) // ... e patch superiore
ok = install(module, patchlevel);
}
return ok;
}
@ -720,35 +768,17 @@ void TInstaller_mask::install_selection()
}
if (ok)
{
ok = install(modulo, is_patch ? newpatch : 0);
if (is_patch)
{
ok = install_patches(modulo, oldver, oldpatch); // installa tutte le patch
if (!ok)
ok = install(modulo, newpatch); // re-installa l'ultima per sicurezza ()
}
else
ok = install(modulo, 0); // installa il modulo
if (ok)
_installed = TRUE; // Setta il flag di almeno un modulo installato
if (!is_patch) // Se installo un modulo pricipale ...
{
// ... allora installo tutte le patches
TString_array modules;
TFilename ininame = get(F_PATH);
ininame.add("??0???a.ini");
modules.destroy();
list_files(ininame, modules);
modules.sort(); // sort by patch number
FOR_EACH_ARRAY_ROW(modules, am, arow)
{
TString& ininame = *arow;
ininame.lower();
const int pos = ininame.find("a.ini");
CHECKS(pos >= 6, "Invalid installation configuration: ", (const char*)ininame);
const TString16 patchmodule = ininame.mid(pos-6, 2);
if (patchmodule == modulo)
{
TConfig ini(ininame, patchmodule);
const int patchlevel = ini.get_int("Patch");
const char * patchversion = ini.get("Versione");
if (patchversion == newver) // installa solo le patch della stessa ver
ok = install(modulo, patchlevel);
}
}
}
if (ok)
check(r, FALSE);
}

View File

@ -250,22 +250,18 @@ char TGeneric_table_app::frequenza_versamenti(long firm, int year) const
HIDDEN bool coddel_handler(TMask_field& f, KEY k)
{
const TMask& m = f.mask();
TMask& m = f.mask();
if (!m.query_mode() && k == K_TAB)
{
const short id = f.dlg();
long cod;
if (id == F_BANCA1)
cod = m.get_long(F_BANCA1);
if (id == F_CONCESSIONE)
cod = m.get_long(F_CONCESSIONE);
const long cod = m.get_long(id == F_BANCA1 ? F_BANCA1 : F_CONCESSIONE);
if (id == F_BANCA1)
if (cod != 0)
f.mask().hide(F_CONCESSIONE);
//if (id == F_BANCA1)
// if (cod != 0)
// m.hide(F_CONCESSIONE);
if (id == F_CONCESSIONE)
//if (id == F_CONCESSIONE || id == F_BANCA1)
if (cod != 0)
{
const long firm = m.get_long(F_DITTA);
@ -281,15 +277,28 @@ HIDDEN bool coddel_handler(TMask_field& f, KEY k)
if (anag.read() == NOERR)
{
const bool titcf = anag.get_bool("TITCF");
if (!titcf)
const bool isdel = anag.get_long("TIPOSTDEL") == 0l;
if (titcf && isdel)
return TRUE; // Se e' titolare CF e ha scelto la delega vanno abilitati sia
// Il codice conc. che la banca
if (id == F_CONCESSIONE)
{
f.mask().hide(F_CONCESSIONE);
return f.error_box("Concessione non ammessa senza conto fiscale");
if (!titcf)
{
m.hide(F_CONCESSIONE);
f.error_box("Concessione non ammessa senza conto fiscale");
}
else
{
m.hide(F_BANCA1);
m.hide(F_BANCA2);
}
}
f.mask().hide(F_BANCA1);
f.mask().hide(F_BANCA2);
else
m.hide(F_CONCESSIONE);
}
}
}
}
}
return TRUE;

View File

@ -63,7 +63,6 @@ BEGIN
PROMPT 49 2 "Codice registro "
Help "Codice del registro"
FIELD CODREG
USE LF_TABREG
COPY ALL F_ANNO
FLAGS "GUZ"
KEY 1
@ -241,7 +240,7 @@ BEGIN
GROUP 2 3 4 5 6 7 10
FIELD CODULC
USE LF_UNLOC
JOIN LF_COMUNI TO LF_UNLOC KEY 1 INTO COM=COMULC
JOIN LF_COMUNI TO LF_UNLOC KEY 1 INTO COM=COMULC
INPUT CODDITTA F_CODDITTA SELECT
INPUT CODULC F_CODULC
DISPLAY "Codice" CODDITTA

View File

@ -26,7 +26,7 @@
#include "..\cg\cglib02.h"
#define usage "Errore - uso : bacnv [1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16] ditta"
#define usage "Errore - uso : bacnv [1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17] ditta"
///////////////////////////////////////////////////////////////////////////////////////////////////////
// Applicazione di conversione archivi XBase, valida per tutti e 4 i tipi di DLL
@ -186,6 +186,7 @@ public:
void convert_ucc() const;
void convert_cap() const;
void convert_uue() const;
void convert_pim2prm() const;
TConversione_archivi() : _oldditta(0), _codditta(0), _error(0) {}
};
@ -328,6 +329,10 @@ bool TConversione_archivi::menu(MENU_TAG)
convert_uue();
convert_cap();
break;
case 17:
if (_codditta > 0)
convert_pim2prm();
break;
default:
break;
}
@ -1610,6 +1615,26 @@ void TConversione_archivi::convert_cap() const
}
// Effettua copia dei PIM in PRM, come richiesto dalla PRASSI
void TConversione_archivi::convert_pim2prm() const
{
TTable pim("PIM");
TTable prm("PRM");
TString anno;
TProgind pi(0, "Copia progressi IVA / progressivi Registri...", FALSE, FALSE);
for (pim.first(); !pim.eof(); pim.next())
{
anno = pim.get("CODTAB").mid(0,4);
if (atoi(anno) > 1997)
{
prm.curr() = pim.curr();
prm.put("COD", "PRM");
prm.write(); // Ignora eventuali errori, li scrive solo se non ci sono
}
}
}
///////////////////////////////////////////////////////////
// Programma di conversione archivi speciale
///////////////////////////////////////////////////////////
@ -1618,7 +1643,7 @@ int main(int argc,char** argv)
{
const int r = (argc > 1) ? abs(atoi(argv[1])) : 0;
if (r < 0 || r > 16)
if (r < 0 || r > 17)
{
error_box(usage);
return 100;

206
ba/bainst.ini Executable file
View File

@ -0,0 +1,206 @@
[ba]
Data = 10-04-1998
Descrizione = Base
Dischi = 1
Moduli =
Patch = 304
PostProcess =
PreProcess =
Prezzo(1) = 500,180
Versione = 19980102
[ba0]
File(0) = ba00.bmp
File(1) = ba01.bmp
File(2) = ba02.bmp
File(3) = ba03.bmp
File(4) = ba04.bmp
File(5) = ba05.bmp
File(6) = ba06.bmp
File(7) = baprassi.men
Patch = 304
Versione = 19980102
[ba1]
File(8) = ba0.exe
File(9) = ba0100a.msk
File(10) = ba0200a.msk
File(11) = ba0300a.msk
File(12) = ba1.exe
File(13) = ba1100a.msk
File(14) = ba1100b.msk
File(15) = ba1100c.msk
File(16) = ba1100d.msk
File(17) = ba1100e.msk
File(18) = ba1100f.msk
File(19) = ba1100g.msk
File(20) = ba1300a.msk
File(21) = ba1300b.msk
File(22) = ba1400a.msk
File(23) = ba1500a.frm
File(24) = ba1500a.msk
File(25) = ba1600a.msk
File(26) = ba1600b.msk
File(27) = ba1700a.msk
File(28) = ba2.exe
File(29) = ba2100a.msk
File(30) = ba2100b.msk
File(31) = ba2100c.msk
File(32) = ba2100f.msk
File(33) = ba2100r.msk
File(34) = ba2100s.msk
File(35) = ba2100u.msk
File(36) = ba21dt.msk
File(37) = ba21fn.msk
File(38) = ba21nm.msk
File(39) = ba2200.msk
File(40) = ba2300a.msk
File(41) = ba2300b.msk
File(42) = ba2300c.msk
File(43) = ba2300d.msk
File(44) = ba2500a.msk
File(45) = ba3.exe
File(46) = ba3200a.msk
File(47) = ba3300a.msk
File(48) = ba3500a.msk
File(49) = ba3600a.msk
File(50) = ba3601a.msk
File(51) = ba3700a.msk
File(52) = ba3800a.msk
File(53) = ba3800b.msk
File(54) = ba3a00a.msk
File(55) = ba4.exe
File(56) = ba4100a.msk
File(57) = ba4200b.msk
File(58) = ba4200c.msk
File(59) = ba4300a.msk
File(60) = ba4400a.msk
File(61) = ba4500a.msk
File(62) = ba4600a.msk
File(63) = ba5.exe
File(64) = ba5000.msk
File(65) = ba6.exe
File(66) = ba6100a.msk
File(67) = ba6100b.msk
File(68) = ba6200a.msk
File(69) = bacnv.exe
File(70) = bafax.exe
File(71) = bafax01.msk
File(72) = bafax02.msk
File(73) = bagn001a.msk
File(74) = bagn002.msk
File(75) = bagn004.msk
File(76) = bagn005.msk
File(77) = bagn006.msk
File(78) = bainst.exe
File(79) = bainst01.msk
File(80) = bainst02.msk
File(81) = bastais.msk
File(82) = bastban.msk
File(83) = bastclr.msk
File(84) = bastcpg.msk
File(85) = bastcrs.msk
File(86) = bastitl.msk
File(87) = bastiva.msk
File(88) = bastlng.msk
File(89) = bastois.msk
File(90) = baststa.msk
File(91) = baststt.msk
File(92) = bastucc.msk
File(93) = bastucs.msk
File(94) = bastues.msk
File(95) = bastuid.msk
File(96) = bastuiv.msk
File(97) = basture.msk
File(98) = bastuue.msk
File(99) = bastval.msk
File(100) = batbais.msk
File(101) = batbais.rpt
File(102) = batbban.msk
File(103) = batbban.rpt
File(104) = batbclr.msk
File(105) = batbclr.rpt
File(106) = batbcpg.msk
File(107) = batbcpg.rpt
File(108) = batbcrs.msk
File(109) = batbcrs.rpt
File(110) = batbitl.msk
File(111) = batbitl.rpt
File(112) = batbiva.msk
File(113) = batbiva.rpt
File(114) = batblng.msk
File(115) = batblng.rpt
File(116) = batbois.msk
File(117) = batbois.rpt
File(118) = batbrgi.msk
File(119) = batbsta.msk
File(120) = batbsta.rpt
File(121) = batbstt.msk
File(122) = batbstt.rpt
File(123) = batbucc.msk
File(124) = batbucc.rpt
File(125) = batbucs.msk
File(126) = batbucs.rpt
File(127) = batbues.msk
File(128) = batbues.rpt
File(129) = batbuid.msk
File(130) = batbuid.rpt
File(131) = batbuiv.msk
File(132) = batbuiv.rpt
File(133) = batbure.msk
File(134) = batbure.rpt
File(135) = batbuue.msk
File(136) = batbuue.rpt
File(137) = batbval.msk
File(138) = batbval.rpt
File(139) = fconv.ini
File(140) = prassi.aut
File(141) = prassi.hlp
File(142) = prassice.men
File(143) = prassid.ini
File(144) = prassis.ini
File(145) = unzip.pif
File(146) = unzip32.exe
File(147) = zip.pif
File(148) = zip386.bat
File(149) = zip386.exe
File(182) = skeylink.dll|X
Patch = 304
Versione = 19980102
[ba2]
File(150) = recdesc\f10.dir
File(151) = recdesc\f10.trr
File(152) = recdesc\f105.dir
File(153) = recdesc\f105.trr
File(154) = recdesc\f11.dir
File(155) = recdesc\f11.trr
File(156) = recdesc\f12.dir
File(157) = recdesc\f12.trr
File(158) = recdesc\f13.dir
File(159) = recdesc\f13.trr
File(160) = recdesc\f15.dir
File(161) = recdesc\f15.trr
File(162) = recdesc\f2.dir
File(163) = recdesc\f2.trr
File(164) = recdesc\f3.dir
File(165) = recdesc\f3.trr
File(166) = recdesc\f4.dir
File(167) = recdesc\f4.trr
File(168) = recdesc\f5.dir
File(169) = recdesc\f5.trr
File(170) = recdesc\f50.dir
File(171) = recdesc\f50.trr
File(172) = recdesc\f54.dir
File(173) = recdesc\f54.trr
File(174) = recdesc\f6.dir
File(175) = recdesc\f6.trr
File(176) = recdesc\f7.dir
File(177) = recdesc\f7.trr
File(178) = recdesc\f8.dir
File(179) = recdesc\f8.trr
File(180) = recdesc\f9.dir
File(181) = recdesc\f9.trr
Patch = 304
Versione = 19980102

65
ba/bainst04.cpp Executable file
View File

@ -0,0 +1,65 @@
#include <applicat.h>
#include <mask.h>
#include <config.h>
#include <utility.h>
#include <execp.h>
#include "bainst04.h"
class TInstall_AT : public TSkeleton_application
{
TMask * _m;
protected:
virtual void main_loop() ;
virtual bool set_ditta() ; // setta i dati ditta
virtual bool set_environment() ; //
public:
virtual ~TInstall_AT () {}
};
// setta i dati ditta
bool TInstall_AT ::set_ditta()
{
return TRUE;
}
bool TInstall_AT ::set_environment()
{
bool ok=TRUE;
if (_m->get_bool(F_USAMENUAVIS))
ok=fcopy("agaat.men","baprassi.men");
if (_m->get_bool(F_LOADTAB))
{
TExternal_app rice("bacnv 1 5 attab.txt");
ok &= (rice.run()==0);
}
return ok;
}
void TInstall_AT::main_loop()
{
TConfig ini("install.ini","at");
const bool primainst=ini.get("Versione").blank();
_m = new TMask ("bainst04.msk");
if (!primainst)
_m->disable(-G_DITTA); // campi ditta
else
_m->set(F_LOADTAB,"X");
_m->field(F_USAMENUAVIS).set("X");
if (_m->run()!=K_QUIT)
{
if (primainst)
{
set_ditta();
}
set_environment();
}
}
int bainst04(int argc, char** argv)
{
TInstall_AT app;
app.run(argc, argv, "Installazione Avis Provinciale");
return 0;
}

5
ba/bainst04.h Executable file
View File

@ -0,0 +1,5 @@
#define F_USAMENUAVIS 101
#define F_LOADTAB 102
#define G_PREINST 1
#define G_POSTINST 2
#define G_DITTA 3

35
ba/bainst04.uml Executable file
View File

@ -0,0 +1,35 @@
#include "bainst04.h"
TOOLBAR "" 0 20 0 2
BUTTON DLG_OK 10 2
BEGIN
PROMPT -11 -1 "~Conferma"
MESSAGE EXIT,K_ENTER
PICTURE BMP_OK
END
ENDPAGE
PAGE "Installazione AT" -1 -1 78 8
// GROUP 1 = PRE-INSTALLATION
// GROUP 2 = POST-INSTALLATION
BOOL F_USAMENUAVIS
BEGIN
FLAGS "D"
PROMPT 2 2 "Usa menu' AVIS"
END
BOOL F_LOADTAB
BEGIN
PROMPT 2 4 "Carica dati standard"
END
/*GROUPBOX DLG_NULL 60 4
BEGIN
FLAG "H"
PROMPT 2 4 " Installazione dati ditta"
GROUP 2
END
*/
ENDPAGE
ENDMASK

View File

@ -1,3 +1,3 @@
3
1
%tabgen|0|0|795|0|Tabelle di studio|50||
%tabgen|0|0|885|0|Tabelle di studio|50||

View File

@ -1,5 +1,5 @@
3
58
63
COD|1|3|0|
CODTAB|1|25|0|
S0|1|70|0|
@ -42,6 +42,11 @@ R11|4|18|5|
R12|4|18|5|
R13|4|18|5|
R14|4|18|5|
R15|4|18|5|
R16|4|18|5|
R17|4|18|5|
R18|4|18|5|
R19|4|18|5|
D0|5|8|0|
D1|5|8|0|
D2|5|8|0|

View File

@ -1,3 +1,3 @@
4
1
%tabcom|0|0|795|0|Tabelle comuni|1500||
%tabcom|0|0|885|0|Tabelle comuni|1500||

View File

@ -1,5 +1,5 @@
4
58
63
COD|1|3|0|
CODTAB|1|25|0|
S0|1|70|0|
@ -42,6 +42,11 @@ R11|4|18|5|
R12|4|18|5|
R13|4|18|5|
R14|4|18|5|
R15|4|18|5|
R16|4|18|5|
R17|4|18|5|
R18|4|18|5|
R19|4|18|5|
D0|5|8|0|
D1|5|8|0|
D2|5|8|0|

View File

@ -1,3 +1,3 @@
5
0
$tab|0|0|795|0|Tabelle ditta|400||
$tab|0|0|885|0|Tabelle ditta|400||

View File

@ -1,5 +1,5 @@
5
58
63
COD|1|3|0|
CODTAB|1|25|0|
S0|1|70|0|
@ -42,6 +42,11 @@ R11|4|18|5|
R12|4|18|5|
R13|4|18|5|
R14|4|18|5|
R15|4|18|5|
R16|4|18|5|
R17|4|18|5|
R18|4|18|5|
R19|4|18|5|
D0|5|8|0|
D1|5|8|0|
D2|5|8|0|

View File

@ -35,5 +35,7 @@ ACNV(118)=77cnv 6
ACNV(119)=77cnv 1
[199516]
ACNV(13)=bacnv 16
[199517]
ACNV(5)=bacnv 17
[EOF]

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
199516
199517