diff --git a/ba/ba0.cpp b/ba/ba0.cpp index 434a6f1f6..93a15af0a 100755 --- a/ba/ba0.cpp +++ b/ba/ba0.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -445,16 +446,17 @@ bool TMenu_application::check_user() { TMask m("ba0100a"); TLocalisamfile users(LF_USER); - TString16 utente, pwd; - // TString16 utente(user()), pwd; + TString16 utente(user()), pwd; - bool ok = FALSE; for (int i = 0 ; i < 3 && !ok; i++) { - // m.set(F_USER, utente); - // if (utente.not_empty()) - // m.first_focus(F_PASSWORD); + if (utente.not_empty() && utente != "PRASSI") + { + m.set(F_USER, utente); + m.first_focus(F_PASSWORD); + } + if (m.run() == K_ESC) break; @@ -511,7 +513,21 @@ bool TMenu_application::check_user() else users.read(_isequal, _unlock); } } - + +#if XVT_OS == XVT_OS_WIN + if (ok && utente != "PRASSI") + { + TDDE dde; + if (dde.initiate("PROGMAN", "PROGMAN")) + { + dde.execute("[ReplaceItem(PR.A.S.S.I.)]"); + TString80 cmd("[AddItem("); + cmd << argv(0) << " /u" << utente << ",PR.A.S.S.I.)]"; + dde.execute(cmd); + } + } +#endif + return ok; } @@ -580,8 +596,7 @@ bool TMenu_application::menu(MENU_TAG) else { const TString16 module(cmd2name(option)); - - if (get_firm() == 0 && module.left(2) == "cg") // Chiede ditta se necessario + 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); diff --git a/ba/ba2100r.uml b/ba/ba2100r.uml index 6da0ed745..34ae17b5e 100755 --- a/ba/ba2100r.uml +++ b/ba/ba2100r.uml @@ -66,7 +66,6 @@ STRING 106 50 BEGIN PROMPT 1 5 "Espr. " FLAGS "U" - CHECKTYPE REQUIRED END BUTTON DLG_OK 10 2