ba0.cpp Aggiunta gestione programmi protetti da password
ba2100b.uml Modificata maschera scelta profili ba2100f.uml Abilitato campo testo fisso nei campi ba2200.cpp Controllato meglio il cambio disco da parte dell'utente ba2400.cpp Aggiornato uso della funzione TForm::validate ba3100.cpp Corretta gestione annullamento configurazione stampa registri ba3300.cpp Aggiunta chiamata on_firm_change della classe madre prassi.mnu Aggiunto flag di protezione da password ad alcuni programmi git-svn-id: svn://10.65.10.50/trunk@1612 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
8285ab7fec
commit
fdae1a4bdb
32
ba/ba0.cpp
32
ba/ba0.cpp
@ -606,13 +606,31 @@ bool TMenu_application::menu(MENU_TAG)
|
||||
}
|
||||
else
|
||||
{
|
||||
const TString16 module(cmd2name(option));
|
||||
if (get_firm() == 0 && module.compare("cg", 2, TRUE) == 0) // Chiede ditta se necessario
|
||||
set_firm();
|
||||
prefix().set(NULL); // Chiude prefix
|
||||
TExternal_app a(option);
|
||||
a.run();
|
||||
prefix().set("DEF"); // Aggiorna prefix
|
||||
const TString16 flags(row.get());
|
||||
if (flags.find('P') >= 0)
|
||||
{
|
||||
TMask mask("ba0100a");
|
||||
mask.disable(F_USER);
|
||||
mask.set(F_USER, "SERVIZIO");
|
||||
ok = FALSE;
|
||||
if (mask.run() == K_ENTER)
|
||||
{
|
||||
const TDate oggi(TODAY);
|
||||
TString16 pwd; pwd << "PRASSI" << (oggi.month() + oggi.day());
|
||||
ok = pwd == mask.get(F_PASSWORD);
|
||||
}
|
||||
if (!ok) error_box("Password di servizio errata!\nAccesso negato.");
|
||||
}
|
||||
if (ok)
|
||||
{
|
||||
const TString16 module(cmd2name(option));
|
||||
if (get_firm() == 0 && module.compare("cg", 2, TRUE) == 0) // Chiede ditta se necessario
|
||||
set_firm();
|
||||
prefix().set(NULL); // Chiude prefix
|
||||
TExternal_app a(option);
|
||||
a.run();
|
||||
prefix().set("DEF"); // Aggiorna prefix
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "ba2100.h"
|
||||
|
||||
PAGE "Scelta profilo" -1 -1 67 6
|
||||
PAGE "Scelta profilo" -1 -1 75 6
|
||||
|
||||
STRING F_BASE 8
|
||||
BEGIN
|
||||
@ -13,7 +13,7 @@ BEGIN
|
||||
DISPLAY "Descrizione@50" DESC
|
||||
OUTPUT F_BASE TIPOPROF
|
||||
OUTPUT F_DESC DESC
|
||||
VALIDATE NOTEMPTY_FUNC
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
NUMBER F_CODE 5
|
||||
@ -33,7 +33,7 @@ BEGIN
|
||||
OUTPUT F_DESC DESC
|
||||
END
|
||||
|
||||
STRING F_DESC 40
|
||||
STRING F_DESC 50
|
||||
BEGIN
|
||||
PROMPT 2 3 "Descrizione "
|
||||
HELP "Descrizione profilo utente"
|
||||
@ -53,7 +53,7 @@ BEGIN
|
||||
END
|
||||
|
||||
|
||||
BUTTON DLG_CANCEL 10 2
|
||||
BUTTON DLG_QUIT 10 2
|
||||
BEGIN
|
||||
PROMPT -33 -1 ""
|
||||
END
|
||||
|
@ -91,68 +91,67 @@ END
|
||||
|
||||
STRING F_PROMPT 80 60
|
||||
BEGIN
|
||||
PROMPT 1 5 "Testo "
|
||||
PROMPT 1 5 "Testo fisso "
|
||||
HELP "Eventuale testo fisso da stampare"
|
||||
GROUP 7
|
||||
END
|
||||
|
||||
// Gruppo 8 per edit formato data
|
||||
GROUPBOX DLG_NULL 78 5
|
||||
BEGIN
|
||||
PROMPT 1 6 "Formato data"
|
||||
GROUP 8
|
||||
PROMPT 1 6 "Formato data"
|
||||
GROUP 8
|
||||
END
|
||||
|
||||
LIST F_DFORMAT 16
|
||||
BEGIN
|
||||
PROMPT 3 7 "Tipo data "
|
||||
ITEM "1|Giorno Mese Anno"
|
||||
ITEM "2|Mese Anno Giorno"
|
||||
ITEM "3|Anno Giorno Mese"
|
||||
ITEM "7|Mese Anno"
|
||||
ITEM "4|Anno"
|
||||
ITEM "5|Mese"
|
||||
ITEM "6|Giorno"
|
||||
GROUP 8
|
||||
PROMPT 3 7 "Tipo data "
|
||||
ITEM "1|Giorno Mese Anno"
|
||||
ITEM "2|Mese Anno Giorno"
|
||||
ITEM "3|Anno Giorno Mese"
|
||||
ITEM "7|Mese Anno"
|
||||
ITEM "4|Anno"
|
||||
ITEM "5|Mese"
|
||||
ITEM "6|Giorno"
|
||||
GROUP 8
|
||||
END
|
||||
|
||||
LIST F_DDAY 16
|
||||
BEGIN
|
||||
PROMPT 42 7 "Formato giorno "
|
||||
ITEM "4|Con zeri(es. 02)"
|
||||
ITEM "2|Normale (es. 2)"
|
||||
ITEM "5|In lettere"
|
||||
ITEM "6|Giorno settimana"
|
||||
GROUP 8
|
||||
PROMPT 42 7 "Formato giorno "
|
||||
ITEM "4|Con zeri(es. 02)"
|
||||
ITEM "2|Normale (es. 2)"
|
||||
ITEM "5|In lettere"
|
||||
ITEM "6|Giorno settimana"
|
||||
GROUP 8
|
||||
END
|
||||
|
||||
LIST F_DMONTH 16
|
||||
BEGIN
|
||||
PROMPT 3 8 "Formato mese "
|
||||
ITEM "4|Con zeri(es. 02)"
|
||||
ITEM "2|Normale (es. 2)"
|
||||
ITEM "5|In lettere"
|
||||
ITEM "7|Trimestre"
|
||||
GROUP 8
|
||||
PROMPT 3 8 "Formato mese "
|
||||
ITEM "4|Con zeri(es. 02)"
|
||||
ITEM "2|Normale (es. 2)"
|
||||
ITEM "5|In lettere"
|
||||
ITEM "7|Trimestre"
|
||||
GROUP 8
|
||||
END
|
||||
|
||||
LIST F_DYEAR 16
|
||||
BEGIN
|
||||
PROMPT 42 8 "Formato anno "
|
||||
ITEM "2|Breve (2 cifre)"
|
||||
ITEM "4|Lungo (4 cifre)"
|
||||
GROUP 8
|
||||
PROMPT 42 8 "Formato anno "
|
||||
ITEM "2|Breve (2 cifre)"
|
||||
ITEM "4|Lungo (4 cifre)"
|
||||
GROUP 8
|
||||
END
|
||||
|
||||
LIST F_DSEP 5
|
||||
BEGIN
|
||||
PROMPT 3 9 "Separatore "
|
||||
ITEM "-|-"
|
||||
ITEM "/|/"
|
||||
ITEM ".|."
|
||||
ITEM ",|,"
|
||||
ITEM "S|Spazio"
|
||||
GROUP 8
|
||||
PROMPT 3 9 "Separatore "
|
||||
ITEM "-|-"
|
||||
ITEM "/|/"
|
||||
ITEM ".|."
|
||||
ITEM ",|,"
|
||||
ITEM "S|Spazio"
|
||||
GROUP 8
|
||||
END
|
||||
|
||||
STRING F_DEXAMPLE 40
|
||||
|
@ -69,9 +69,25 @@ public:
|
||||
|
||||
FILE* TArchive::ask_disk(TFilename& name, int disk, char floppy, bool lettura) const
|
||||
{
|
||||
message_box("Inserire il disco %d nel drive %c:", disk, floppy);
|
||||
TFilename prev(name);
|
||||
prev.ext(format("%03d", disk-1)); // File precedente
|
||||
bool first = TRUE;
|
||||
do
|
||||
{
|
||||
if (first)
|
||||
{
|
||||
message_box("Inserire il disco %d nel drive %c:", disk, floppy);
|
||||
first = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
const bool ok = yesno_box("Inserire il disco %d nel drive %c\n"
|
||||
"Estrarre il disco %d e continuare?", disk, floppy, disk-1);
|
||||
if (!ok) return NULL;
|
||||
}
|
||||
} while (fexist(prev)); // Non facciamo i furbetti!
|
||||
|
||||
name.ext(format("%03d", disk));
|
||||
name.ext(format("%03d", disk)); // File attuale
|
||||
|
||||
FILE* f = NULL;
|
||||
bool retry = TRUE;
|
||||
@ -197,39 +213,22 @@ bool TArchive::fsplit(const char* filename, char floppy, const char* desc) const
|
||||
TFilename parag(work.name()); parag.ext("");
|
||||
TFilename ini("a:/backup.ini"); ini[0] = floppy;
|
||||
|
||||
bool asked = FALSE;
|
||||
while (!asked)
|
||||
if (fexist(ini))
|
||||
{
|
||||
if (fexist(ini))
|
||||
TConfig c(ini, parag);
|
||||
const int d = c.get_int("Disk");
|
||||
if (d == disk)
|
||||
{
|
||||
TConfig c(ini, parag);
|
||||
const int d = c.get_int("Disk");
|
||||
if (d == disk)
|
||||
{
|
||||
ok = yesno_box("Il disco %d contiene gia' un backup del direttorio %s del %s"
|
||||
"\nSi desidera continuare?",
|
||||
disk, (const char*)parag, (const char*)c.get("Date"));
|
||||
asked = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (d > 0)
|
||||
{
|
||||
ok = yesno_box("Inserire il disco %d nel drive %c:"
|
||||
"\nSi desidera continuare?", disk, floppy);
|
||||
if (!ok) break;
|
||||
}
|
||||
else
|
||||
asked = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FILE* i = fopen(ini, "w"); // Crea il file backup.ini
|
||||
fclose(i);
|
||||
asked = TRUE;
|
||||
ok = yesno_box("Il disco %d contiene gia' un backup del direttorio %s del %s"
|
||||
"\nSi desidera continuare?",
|
||||
disk, (const char*)parag, (const char*)c.get("Date"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
FILE* i = fopen(ini, "w"); // Crea il file backup.ini per evitare messaggi
|
||||
fclose(i);
|
||||
}
|
||||
if (!ok) break;
|
||||
|
||||
TConfig c(ini, parag);
|
||||
|
@ -15,7 +15,7 @@ class TTab_form : public TForm
|
||||
TString256 _result;
|
||||
|
||||
protected:
|
||||
virtual const char* validate(const char* v, TToken_string& s);
|
||||
virtual bool validate(TForm_item& f, TToken_string& s);
|
||||
virtual word set_body(word p, bool u);
|
||||
|
||||
public:
|
||||
@ -47,7 +47,7 @@ word TTab_form::set_body(word p, bool u)
|
||||
}
|
||||
|
||||
|
||||
const char* TTab_form::validate(const char* v, TToken_string& s)
|
||||
bool TTab_form::validate(TForm_item& fld, TToken_string& s)
|
||||
{
|
||||
const TString16 code(s.get(0));
|
||||
|
||||
@ -102,9 +102,10 @@ const char* TTab_form::validate(const char* v, TToken_string& s)
|
||||
_result = " ";
|
||||
_result << " " << desc;
|
||||
|
||||
return _result;
|
||||
fld.set(_result);
|
||||
return TRUE;
|
||||
}
|
||||
return TForm::validate(v, s);
|
||||
return TForm::validate(fld, s);
|
||||
}
|
||||
|
||||
|
||||
|
@ -21,7 +21,7 @@ protected: // TRelation_application
|
||||
virtual bool protected_record(TRectype& rec) ;
|
||||
virtual void init_insert_mode(TMask& m) ;
|
||||
virtual void init_modify_mode(TMask& m);
|
||||
virtual int write(TMask& m);
|
||||
virtual int rewrite(const TMask& m);
|
||||
|
||||
public:
|
||||
bool exist_journal() {return _exist_journal;}
|
||||
@ -175,7 +175,7 @@ bool TGeneric_table_app::user_create()
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int TGeneric_table_app::write(TMask& m)
|
||||
int TGeneric_table_app::rewrite(const TMask& m)
|
||||
{
|
||||
if (get_tabname() == "REG" && !m.get_bool(F_CONFIG))
|
||||
{
|
||||
@ -188,7 +188,7 @@ int TGeneric_table_app::write(TMask& m)
|
||||
ini.set("Type", -1);
|
||||
}
|
||||
|
||||
return Tab_application::write(m);
|
||||
return Tab_application::rewrite(m);
|
||||
}
|
||||
|
||||
int ba3100(int argc, char* argv[])
|
||||
|
@ -144,6 +144,8 @@ void BA3300_application::set_page(int , int counter)
|
||||
void BA3300_application::on_firm_change()
|
||||
|
||||
{
|
||||
TPrintapp::on_firm_change();
|
||||
|
||||
_msk->reset();
|
||||
_nditte->setkey(1);
|
||||
_codice_ditta = get_firm();
|
||||
|
@ -144,11 +144,11 @@
|
||||
16|Servizio|
|
||||
16|Copia Archivi|cg4 -1
|
||||
16|Ripristino stampa registri|cg5 -4
|
||||
16|Aggiornamento tipo conto|cg1 -2 T
|
||||
16|Aggiornamento tipo attivita'|cg1 -2 A
|
||||
16|Aggiornamento flag op.intrac.|cg1 -2 I
|
||||
16|Aggiornamento codice attivita'|cg1 -2 C
|
||||
16|Rinumerazione n° protocollo|cg1 -2 P
|
||||
16|Aggiornamento tipo conto|cg1 -2 T|P
|
||||
16|Aggiornamento tipo attivita'|cg1 -2 A|P
|
||||
16|Aggiornamento flag op.intrac.|cg1 -2 I|P
|
||||
16|Aggiornamento codice attivita'|cg1 -2 C|P
|
||||
16|Rinumerazione n. protocollo|cg1 -2 P|P
|
||||
17|Modello 770|5
|
||||
17|Immissione dichiarazione|776mod -1
|
||||
17|Manutenzione dichiarazione|776mod -0
|
||||
|
Loading…
x
Reference in New Issue
Block a user