diff --git a/GMW/GMW_Term/GMW_Term.csproj b/GMW/GMW_Term/GMW_Term.csproj
index 09a274b4..845c391e 100644
--- a/GMW/GMW_Term/GMW_Term.csproj
+++ b/GMW/GMW_Term/GMW_Term.csproj
@@ -203,6 +203,7 @@
+
diff --git a/GMW/GMW_Term/GMW_Term.csproj.user b/GMW/GMW_Term/GMW_Term.csproj.user
index 92c01509..7fcbd05a 100644
--- a/GMW/GMW_Term/GMW_Term.csproj.user
+++ b/GMW/GMW_Term/GMW_Term.csproj.user
@@ -3,7 +3,7 @@
- Login.aspx
+ Default.aspx
SpecificPage
True
False
diff --git a/GMW/GMW_Term/WebUserControls/mod_barcode.ascx.cs b/GMW/GMW_Term/WebUserControls/mod_barcode.ascx.cs
index ceddc39e..c75ce9d3 100644
--- a/GMW/GMW_Term/WebUserControls/mod_barcode.ascx.cs
+++ b/GMW/GMW_Term/WebUserControls/mod_barcode.ascx.cs
@@ -21,16 +21,8 @@ namespace GMW_Term.WebUserControls
btnLoginPage.Text = "Login";
btnButtonsHome.Text = "Home";
- /*
- * se c'è in sessione uno username valido:
- * non mostra login - non mostra label login - mostra username in alto -
- * mostra due pulsanti per andare a Home pulsanti e per fare nuovo login
- *
- * se non c'è in sessione username
- * mostra login con label - mostra solo un pulsante cioè fai login
- */
- // se username è vuoto
+ // se username è valorizzato...
if (verificaOperatoreInSessione())
{
btnLoginPage.Text = "Rifai Login";
@@ -38,7 +30,7 @@ namespace GMW_Term.WebUserControls
btnButtonsHome.Visible = true;
lblData.Text = "Your data here...";
}
-
+ // se non è valorizzato chiede di effettuare login...
else
{
// sistema visualizzazione
@@ -62,8 +54,32 @@ namespace GMW_Term.WebUserControls
lblData.Text = "Inserire Operatore!";
break;
case tipoCodiceBarcode.Operatore:
- memLayer.ML.setSessionVal("username", txtInput.Text);
- Response.Redirect("Home.aspx");
+ // codice per ricavare user e dominio
+ string dominio = TermClass.termin.getDominioDaCodSoggetto(txtInput.Text);
+ string username = TermClass.termin.getUserDaCodSoggetto(txtInput.Text);
+ user_std _utente = new user_std();
+ user_std.UtSn.isForcedUser = true;
+ bool fatto = _utente.startUpUtente(dominio, username);
+ if (fatto)
+ {
+ memLayer.ML.setSessionVal("username", txtInput.Text);
+ string _rigaLog = String.Format("User {0} has forced user identity ok: logged as \t {1}\\{2}", Page.User.Identity.Name, dominio, username);
+ SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.INFO);
+ //if (Login_ok != null)
+ //{
+ // Login_ok(this, new EventArgs());
+ //}
+
+ Response.Redirect("Home.aspx");
+ }
+
+ else
+ {
+ // avvisa che il codice è errato
+ lblData.Text = "Utente " + txtInput.Text + " non registrato nel database utenti";
+ txtInput.Text = "";
+ }
+
break;
case tipoCodiceBarcode.ListaPrelievo:
lblData.Text = "Inserire Operatore!";
@@ -91,8 +107,30 @@ namespace GMW_Term.WebUserControls
lblData.Text = "Codice non riconosciuto: " + txtInput.Text;
break;
case tipoCodiceBarcode.Operatore:
- memLayer.ML.setSessionVal("username", txtInput.Text);
- Response.Redirect("Home.aspx");
+ string dominio = TermClass.termin.getDominioDaCodSoggetto(txtInput.Text);
+ string username = TermClass.termin.getUserDaCodSoggetto(txtInput.Text);
+ user_std _utente = new user_std();
+ user_std.UtSn.isForcedUser = true;
+ bool fatto = _utente.startUpUtente(dominio, username);
+ if (fatto)
+ {
+ memLayer.ML.setSessionVal("username", txtInput.Text);
+ string _rigaLog = String.Format("User {0} has forced user identity ok: logged as \t {1}\\{2}", Page.User.Identity.Name, dominio, username);
+ SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.INFO);
+ //if (Login_ok != null)
+ //{
+ // Login_ok(this, new EventArgs());
+ //}
+
+ Response.Redirect("Home.aspx");
+ }
+
+ else
+ {
+ // avvisa che il codice è errato
+ lblData.Text = "Utente " + txtInput.Text + " non registrato nel database utenti";
+ txtInput.Text = "";
+ }
break;
case tipoCodiceBarcode.ListaPrelievo:
lblData.Text = "Codice Lista Prelievo: " + txtInput.Text;
diff --git a/GMW/GMW_Term/WebUserControls/mod_userBar.ascx.cs b/GMW/GMW_Term/WebUserControls/mod_userBar.ascx.cs
index ce91eed0..ebaa2b57 100644
--- a/GMW/GMW_Term/WebUserControls/mod_userBar.ascx.cs
+++ b/GMW/GMW_Term/WebUserControls/mod_userBar.ascx.cs
@@ -18,8 +18,19 @@ namespace GMW_Term.WebUserControls
// ricava dalla sessione il valore nome utente
//string nomeUtente = (string)(Session["loginName"]);
- string nomeUtente = memLayer.ML.StringSessionObj("username");
+ // string nomeUtente = memLayer.ML.StringSessionObj("username");
+ string nomeUtente = "";
+ try
+ {
+ nomeUtente = String.Format("{0}", user_std.UtSn.CognomeNome);
+
+ }
+
+ catch
+ {
+
+ }
// se non vuoto scrive altrimenti no
if (!(String.IsNullOrEmpty(nomeUtente)))
{
diff --git a/GMW/GMW_Term/bin/GMW_Term.dll b/GMW/GMW_Term/bin/GMW_Term.dll
index 1491e2ff..e7263aa9 100644
Binary files a/GMW/GMW_Term/bin/GMW_Term.dll and b/GMW/GMW_Term/bin/GMW_Term.dll differ
diff --git a/GMW/GMW_Term/bin/GMW_data.dll b/GMW/GMW_Term/bin/GMW_data.dll
index fbe0cd1c..09966164 100644
Binary files a/GMW/GMW_Term/bin/GMW_data.dll and b/GMW/GMW_Term/bin/GMW_data.dll differ
diff --git a/GMW/GMW_Term/logs/20100729.txt b/GMW/GMW_Term/logs/20100729.txt
new file mode 100644
index 00000000..40155ef2
--- /dev/null
+++ b/GMW/GMW_Term/logs/20100729.txt
@@ -0,0 +1,9 @@
+29/07/2010 17:10:28 [INFO] - User STEAMWAREWIN\ermanno has forced user identity ok: logged as STEAMWAREWIN\ermanno
+29/07/2010 17:24:05 [INFO] - User STEAMWAREWIN\ermanno has forced user identity ok: logged as STEAMWAREWIN\ermanno
+29/07/2010 17:26:03 [INFO] - User STEAMWAREWIN\ermanno has forced user identity ok: logged as STEAMWAREWIN\ermanno
+29/07/2010 17:27:10 [INFO] - User STEAMWAREWIN\ermanno has forced user identity ok: logged as STEAMWAREWIN\ermanno
+29/07/2010 17:28:35 [INFO] - User STEAMWAREWIN\ermanno has forced user identity ok: logged as STEAMWAREWIN\ermanno
+29/07/2010 17:29:58 [INFO] - User STEAMWAREWIN\ermanno has forced user identity ok: logged as STEAMWAREWIN\ermanno
+29/07/2010 17:30:12 [INFO] - User STEAMWAREWIN\ermanno has forced user identity ok: logged as STEAMWAREWIN\marco
+29/07/2010 17:30:20 [INFO] - User STEAMWAREWIN\ermanno has forced user identity ok: logged as STEAMWAREWIN\samuele
+29/07/2010 17:30:24 [INFO] - User STEAMWAREWIN\ermanno has forced user identity ok: logged as STEAMWAREWIN\marco
diff --git a/GMW/GMW_Term/obj/Debug/GMW_Term.dll b/GMW/GMW_Term/obj/Debug/GMW_Term.dll
index 1491e2ff..e7263aa9 100644
Binary files a/GMW/GMW_Term/obj/Debug/GMW_Term.dll and b/GMW/GMW_Term/obj/Debug/GMW_Term.dll differ
diff --git a/GMW/GMW_Term/obj/Debug/ResolveAssemblyReference.cache b/GMW/GMW_Term/obj/Debug/ResolveAssemblyReference.cache
index 22773c8d..2bb2b67d 100644
Binary files a/GMW/GMW_Term/obj/Debug/ResolveAssemblyReference.cache and b/GMW/GMW_Term/obj/Debug/ResolveAssemblyReference.cache differ