From 600e9787d274494341499a689c60187f4e33618a Mon Sep 17 00:00:00 2001 From: villa Date: Thu, 16 May 1996 10:44:00 +0000 Subject: [PATCH] Aggiustamenti maschere git-svn-id: svn://10.65.10.50/trunk@2843 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ba/ba1400a.uml | 10 +++++----- ba/ba1500.cpp | 26 ++++++++++++++++++++++++-- ba/ba1500a.uml | 10 +++++----- ba/ba5.cpp | 2 +- ba/ba6100.cpp | 2 +- 5 files changed, 36 insertions(+), 14 deletions(-) diff --git a/ba/ba1400a.uml b/ba/ba1400a.uml index df724b3f7..7bca6a3a0 100755 --- a/ba/ba1400a.uml +++ b/ba/ba1400a.uml @@ -6,6 +6,11 @@ ENDPAGE PAGE "Gestione moduli" -1 -1 35 7 +GROUPBOX DLG_NULL 78 15 +BEGIN + PROMPT 0 4 "Moduli" +END + STRING F_USER 8 BEGIN PROMPT 1 1 "Utente " @@ -267,11 +272,6 @@ BEGIN FIELD AUTSTR[38,38] END -GROUPBOX DLG_NULL 78 15 -BEGIN - PROMPT 0 4 "Moduli" -END - ENDPAGE ENDMASK diff --git a/ba/ba1500.cpp b/ba/ba1500.cpp index 31fcf86b9..ca5582d95 100755 --- a/ba/ba1500.cpp +++ b/ba/ba1500.cpp @@ -25,6 +25,16 @@ enum KeyType { _user_key, _aga_key, _prassi_key}; #define BITTEST(w,p) (((w) & (0x0001 << (p))) != 0) #define BITSET(w,p,v) ((v) ? ((w) |= (0x0001 << (p))) : ((w) &= (~(0x0001 << (p))))) +class TError_application : public TApplication +{ + TString _errmess; + virtual bool create() + { fatal_box(_errmess); return FALSE; } + public: + TError_application(const char* err) : _errmess(err) {} +}; + + class TAttivazione_moduli : public TApplication { TMask* _msk; @@ -386,7 +396,19 @@ bool TAttivazione_moduli::menu(MENU_TAG) int ba1500(int argc, char** argv) { - TAttivazione_moduli a ; - a.run(argc, argv, "Attivazione moduli"); + // dipende dalla check_parameters fatta in main() + TString user(user()); + if (user == "PRASSI") + { + TAttivazione_moduli a ; + a.run(argc, argv, "Attivazione moduli"); + } + else + { + TString err(80); + err.format("L'utente %s non e' abilitato all'esecuzione di questo programma", (const char*)user); + TError_application e(err); + e.run(argc, argv, "Attivazione moduli"); + } return 0; } diff --git a/ba/ba1500a.uml b/ba/ba1500a.uml index 902cf06b3..76e0a2484 100755 --- a/ba/ba1500a.uml +++ b/ba/ba1500a.uml @@ -17,6 +17,11 @@ ENDPAGE PAGE "Attivazione Moduli" -1 -1 79 21 +GROUPBOX DLG_NULL 78 15 +BEGIN + PROMPT 0 4 "Moduli" +END + STRING F_K1 16 BEGIN PROMPT 1 1 "Attivazione 1 " @@ -243,11 +248,6 @@ BEGIN PROMPT 1 17 "Statistiche e Provvigioni" END -GROUPBOX DLG_NULL 78 15 -BEGIN - PROMPT 0 4 "Moduli" -END - ENDPAGE ENDMASK diff --git a/ba/ba5.cpp b/ba/ba5.cpp index 76cdd5f48..24abab1c7 100755 --- a/ba/ba5.cpp +++ b/ba/ba5.cpp @@ -209,7 +209,7 @@ bool TQuery_application::do_query() TRectype& ditte = _ditte->curr(); soci.zero(); - _mask->autosave(_soci); + _mask->autosave(*_soci); for (_soci->read(_isgteq); !_soci->eof(); _soci->next()) // Fill sheet { if (query.test(soci) == 0) diff --git a/ba/ba6100.cpp b/ba/ba6100.cpp index c1687da69..25909083e 100755 --- a/ba/ba6100.cpp +++ b/ba/ba6100.cpp @@ -459,7 +459,7 @@ bool TAnaprint_app::user_create() _bk_ditta = _bk_ana = _bk_socio = _bk_attiv = _bk_registro = _bk_unloc = -1; TToken_string rxp(40); - TProgind p(5, "Preparazione archivi\nPrego attendere", FALSE, TRUE, 30); + TProgind p(5, "Preparazione archivi\rPrego attendere", FALSE, TRUE, 30); // setup relation _rel_fis = new TRelation(LF_ANAG);