diff --git a/GMW/WebUserControls/mod_testata.ascx b/GMW/WebUserControls/mod_testata.ascx
index 8c4df100..cc202822 100644
--- a/GMW/WebUserControls/mod_testata.ascx
+++ b/GMW/WebUserControls/mod_testata.ascx
@@ -1,58 +1,92 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_testata.ascx.cs" Inherits="GMW.WebUserControls.mod_testata" %>
<%if (false)
- { %>
+ { %>
<%} %>
-
+
+
+
+
+ postazione: <%: SteamWare.memLayer.ML.StringSessionObj("postazione_name") %>
+
+
+ stampante: <%: SteamWare.memLayer.ML.StringSessionObj("postazione_printer") %>
+
+
+
diff --git a/GMW/WebUserControls/mod_testata.ascx.cs b/GMW/WebUserControls/mod_testata.ascx.cs
index f3e5d2db..653e63a0 100644
--- a/GMW/WebUserControls/mod_testata.ascx.cs
+++ b/GMW/WebUserControls/mod_testata.ascx.cs
@@ -6,214 +6,214 @@ using System.Web.UI;
namespace GMW.WebUserControls
{
- public partial class mod_testata : System.Web.UI.UserControl
+ public partial class mod_testata : System.Web.UI.UserControl
+ {
+ ///
+ /// caricamento pagina
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
{
- ///
- /// caricamento pagina
- ///
- ///
- ///
- protected void Page_Load(object sender, EventArgs e)
+ if (!Page.IsPostBack)
+ {
+ // se l'utente NON c'è torno a login...
+ if (!user_std.UtSn.isAuth)
{
- if (!Page.IsPostBack)
- {
- // se l'utente NON c'è torno a login...
- if (!user_std.UtSn.isAuth)
- {
- string lastPage = Request.Url.LocalPath.Split('/').Last();
- if (lastPage != "" && lastPage != "login.aspx")
- {
- Session["nextPage"] = lastPage;
- }
- Response.Redirect("login.aspx");
- }
- else
- {
- PagCorrente();
- updateTreeMenu();
- }
- // fix componenti
- hlHome.DataBind();
- hlUser.DataBind();
- }
+ string lastPage = Request.Url.LocalPath.Split('/').Last();
+ if (lastPage != "" && lastPage != "login.aspx")
+ {
+ Session["nextPage"] = lastPage;
+ }
+ Response.Redirect("login.aspx");
+ }
+ else
+ {
+ PagCorrente();
+ updateTreeMenu();
+ }
+ // fix componenti
+ hlHome.DataBind();
+ hlUser.DataBind();
+ }
+ }
+
+ public string cssIconPag
+ {
+ get
+ {
+ string answ = "";
+ try
+ {
+ DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", user_std.pagCorrente))[0];
+ answ = traduci(riga.DESCRIZIONE);
+ }
+ catch
+ { }
+ return answ;
+ }
+ }
+ public string nomePag
+ {
+ get
+ {
+ string answ = "";
+ try
+ {
+ DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", user_std.pagCorrente))[0];
+ answ = traduci(riga.NOME);
+ }
+ catch
+ { }
+ return answ;
+ }
+ }
+ ///
+ /// wrapper traduzione
+ ///
+ ///
+ ///
+ public string traduci(object lemma)
+ {
+ return user_std.UtSn.Traduci(lemma.ToString());
+ }
+ ///
+ /// aggiornamento del menù
+ ///
+ private void updateTreeMenu()
+ {
+ try
+ {
+ if (user_std.UtSn.mappaSito == "")
+ {
+ Response.Redirect("default.aspx");
}
- public string cssIconPag
+ XmlMenu.Data = user_std.UtSn.mappaSito;
+ XmlMenu.XPath = "mainMenu/menu";
+ XmlMenu.DataBind();
+ }
+ catch
+ {
+ Response.Redirect(user_std.pagCorrente);
+ }
+ }
+ ///
+ /// forza l'update del menù sx
+ ///
+ public void forzaUpdateMenu()
+ {
+ user_std.UtSn.ricaricaMappaSito();
+ updateTreeMenu();
+ }
+ public string liClass(string nomeElem)
+ {
+ string answ = "";
+ try
+ {
+ if (user_std.pagCorrente.IndexOf(nomeElem) >= 0) answ = "active";
+ }
+ catch
+ { }
+ return answ;
+ }
+ ///
+ /// tooltip che indica se user autorizzato
+ ///
+ public string usrAuthToolTip
+ {
+ get
+ {
+ string answ = "";
+ try
{
- get
- {
- string answ = "";
- try
- {
- DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", user_std.pagCorrente))[0];
- answ = traduci(riga.DESCRIZIONE);
- }
- catch
- { }
- return answ;
- }
+ if (userAuthOk)
+ {
+ answ = string.Format("{0} - {1}", traduci("UserAuthOk"), OpAuth.currAuth.CognomeNome);
+ }
+ else
+ {
+ answ = traduci("UserAuthKo");
+ }
}
- public string nomePag
+ catch
+ { }
+ return answ;
+ }
+ }
+ ///
+ /// text x user autorizzato
+ ///
+ public string usrAuthText
+ {
+ get
+ {
+ string answ = "...";
+ try
{
- get
- {
- string answ = "";
- try
- {
- DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", user_std.pagCorrente))[0];
- answ = traduci(riga.NOME);
- }
- catch
- { }
- return answ;
- }
+ if (userAuthOk)
+ {
+ answ = OpAuth.currAuth.CognomeNome;
+ }
+ else
+ {
+ answ = "...";
+ }
}
- ///
- /// wrapper traduzione
- ///
- ///
- ///
- public string traduci(object lemma)
+ catch
+ { }
+ return answ;
+ }
+ }
+ ///
+ /// css x colore icona user auth
+ ///
+ public string usrAuthCss
+ {
+ get
+ {
+ string answ = "";
+ try
{
- return user_std.UtSn.Traduci(lemma.ToString());
+ if (userAuthOk)
+ {
+ answ = "checkOk";
+ }
+ else
+ {
+ answ = "checkKo";
+ }
}
- ///
- /// aggiornamento del menù
- ///
- private void updateTreeMenu()
- {
- try
- {
- if (user_std.UtSn.mappaSito == "")
- {
- Response.Redirect("default.aspx");
- }
-
- XmlMenu.Data = user_std.UtSn.mappaSito;
- XmlMenu.XPath = "mainMenu/menu";
- XmlMenu.DataBind();
- }
- catch
- {
- Response.Redirect(user_std.pagCorrente);
- }
- }
- ///
- /// forza l'update del menù sx
- ///
- public void forzaUpdateMenu()
- {
- user_std.UtSn.ricaricaMappaSito();
- updateTreeMenu();
- }
- public string liClass(string nomeElem)
- {
- string answ = "";
- try
- {
- if (user_std.pagCorrente.IndexOf(nomeElem) >= 0) answ = "active";
- }
- catch
- { }
- return answ;
- }
- ///
- /// tooltip che indica se user autorizzato
- ///
- public string usrAuthToolTip
- {
- get
- {
- string answ = "";
- try
- {
- if (userAuthOk)
- {
- answ = string.Format("{0} - {1}", traduci("UserAuthOk"), OpAuth.currAuth.CognomeNome);
- }
- else
- {
- answ = traduci("UserAuthKo");
- }
- }
- catch
- { }
- return answ;
- }
- }
- ///
- /// text x user autorizzato
- ///
- public string usrAuthText
- {
- get
- {
- string answ = "...";
- try
- {
- if (userAuthOk)
- {
- answ = OpAuth.currAuth.CognomeNome;
- }
- else
- {
- answ = "...";
- }
- }
- catch
- { }
- return answ;
- }
- }
- ///
- /// css x colore icona user auth
- ///
- public string usrAuthCss
- {
- get
- {
- string answ = "";
- try
- {
- if (userAuthOk)
- {
- answ = "checkOk";
- }
- else
- {
- answ = "checkKo";
- }
- }
- catch
- { }
- return answ;
- }
- }
- protected bool userAuthOk
- {
- get
- {
- return OpAuth.isAuth;
- }
- }
- ///
- /// salva in variabile pagina il nome della pagina corrente
- ///
- protected void PagCorrente()
- {
- string[] uri = Request.Url.LocalPath.Split('/');
- // salvo pagina corrente
- user_std.pagCorrente = uri.Last();
- if (user_std.pagPrecedente == "")
- {
- user_std.pagPrecedente = user_std.pagCorrente;
- }
- }
- ///
- /// effettua un update completo dei valori in sessione
- ///
- private void doFullDataUpdate()
- {
+ catch
+ { }
+ return answ;
+ }
+ }
+ protected bool userAuthOk
+ {
+ get
+ {
+ return OpAuth.isAuth;
+ }
+ }
+ ///
+ /// salva in variabile pagina il nome della pagina corrente
+ ///
+ protected void PagCorrente()
+ {
+ string[] uri = Request.Url.LocalPath.Split('/');
+ // salvo pagina corrente
+ user_std.pagCorrente = uri.Last();
+ if (user_std.pagPrecedente == "")
+ {
+ user_std.pagPrecedente = user_std.pagCorrente;
+ }
+ }
+ ///
+ /// effettua un update completo dei valori in sessione
+ ///
+ private void doFullDataUpdate()
+ {
#if false
// salvo i dati attuali...
string cod_cdc = SteamWare.memLayer.ML.StringSessionObj("valRicercaCdC");
@@ -225,8 +225,8 @@ namespace GMW.WebUserControls
Dictionary sessionParam = SteamWare.memLayer.ML.valSess2SurvUpd;
#endif // false
- // svuoto session e cache per rileggere i dati da Db
- Session.RemoveAll();
+ // svuoto session e cache per rileggere i dati da Db
+ Session.RemoveAll();
#if false
SteamWare.memLayer.ML.flushRegisteredCache();
@@ -244,26 +244,26 @@ namespace GMW.WebUserControls
SteamWare.memLayer.ML.setSessionVal(kvp.Key, kvp.Value, true);
}
#endif // false
- memLayer.ML.setSessionVal("nextPage", user_std.pagCorrente);
- //Response.Redirect(user_std.pagCorrente);
- Response.Redirect("login.aspx");
- }
- ///
- /// click su pagina corrente, fa update!
- ///
- ///
- ///
- protected void lbnUpdate_Click(object sender, EventArgs e)
- {
- doFullDataUpdate();
- }
-
- protected void lbShowNumKey_Click(object sender, EventArgs e)
- {
- // cambio valore boolean di visualizzazione tastiera numerica a video...
- memLayer.ML.setSessionVal("showNumKey", !memLayer.ML.BoolSessionObj("showNumKey"));
- // ricarico
- Response.Redirect(user_std.pagCorrente);
- }
+ memLayer.ML.setSessionVal("nextPage", user_std.pagCorrente);
+ //Response.Redirect(user_std.pagCorrente);
+ Response.Redirect("login.aspx");
}
+ ///
+ /// click su pagina corrente, fa update!
+ ///
+ ///
+ ///
+ protected void lbnUpdate_Click(object sender, EventArgs e)
+ {
+ doFullDataUpdate();
+ }
+
+ protected void lbShowNumKey_Click(object sender, EventArgs e)
+ {
+ // cambio valore boolean di visualizzazione tastiera numerica a video...
+ memLayer.ML.setSessionVal("showNumKey", !memLayer.ML.BoolSessionObj("showNumKey"));
+ // ricarico
+ Response.Redirect(user_std.pagCorrente);
+ }
+ }
}
\ No newline at end of file
diff --git a/GMW/WebUserControls/mod_testata.ascx.designer.cs b/GMW/WebUserControls/mod_testata.ascx.designer.cs
index 056ffd5d..9e4a65fa 100644
--- a/GMW/WebUserControls/mod_testata.ascx.designer.cs
+++ b/GMW/WebUserControls/mod_testata.ascx.designer.cs
@@ -1,105 +1,104 @@
//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
+//
+// Codice generato da uno strumento.
//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
+// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
+// il codice viene rigenerato.
+//
//------------------------------------------------------------------------------
-namespace GMW.WebUserControls
-{
-
-
+namespace GMW.WebUserControls {
+
+
public partial class mod_testata {
///
- /// BundleReference1 control.
+ /// Controllo BundleReference1.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::Microsoft.AspNet.Web.Optimization.WebForms.BundleReference BundleReference1;
///
- /// BundleReference2 control.
+ /// Controllo BundleReference2.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::Microsoft.AspNet.Web.Optimization.WebForms.BundleReference BundleReference2;
///
- /// hlHome control.
+ /// Controllo hlHome.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.HyperLink hlHome;
///
- /// hlUser control.
+ /// Controllo hlUser.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.HyperLink hlUser;
///
- /// lblMatr control.
+ /// Controllo lblMatr.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Label lblMatr;
///
- /// lbnUpdate control.
+ /// Controllo lbnUpdate.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.LinkButton lbnUpdate;
///
- /// itemPlaceholderContainer control.
+ /// Controllo itemPlaceholderContainer.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.HtmlControls.HtmlGenericControl itemPlaceholderContainer;
///
- /// menu control.
+ /// Controllo menu.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.Repeater menu;
///
- /// lbShowNumKey control.
+ /// Controllo lbShowNumKey.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.LinkButton lbShowNumKey;
///
- /// XmlMenu control.
+ /// Controllo XmlMenu.
///
///
- /// Auto-generated field.
- /// To modify move field declaration from designer file to code-behind file.
+ /// Campo generato automaticamente.
+ /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
///
protected global::System.Web.UI.WebControls.XmlDataSource XmlMenu;
}