From b20f400372af51d7e1a2fdaeaf72f46c11d8dcd1 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 10 Feb 2017 18:25:58 +0100 Subject: [PATCH] continuata integrazione con NUOVI componenti, ma ANCORA NON VA... 40+ errori... --- XPS/Web.config | 2 +- XPS/WebUserControls/mod_ULP.ascx.cs | 15 +- .../mod_anagraficaEventi.ascx.cs | 12 +- .../mod_anagraficaMappe.ascx.cs | 8 +- .../mod_anagraficaStati.ascx.cs | 14 +- .../mod_anagraficaStati.ascx.designer.cs | 3 +- XPS/WebUserControls/mod_barcode.ascx.cs | 2 +- XPS/WebUserControls/mod_chLang.ascx.cs | 11 +- XPS/WebUserControls/mod_dettComm.ascx.cs | 8 +- XPS/WebUserControls/mod_elencoComm.ascx.cs | 16 +- XPS/WebUserControls/mod_ev2stati.ascx.cs | 12 +- XPS/WebUserControls/mod_filtro.ascx.cs | 2 +- XPS/WebUserControls/mod_lemmiVocab.ascx.cs | 13 +- XPS/WebUserControls/mod_login.ascx.cs | 2 +- XPS/WebUserControls/mod_main_help.ascx.cs | 2 +- XPS/WebUserControls/mod_menuTop.ascx.cs | 178 ++++++++++++++++-- XPS/WebUserControls/mod_navPath.ascx.cs | 2 +- .../mod_pageTitleAndSearch.ascx.cs | 14 +- .../mod_ricercaGenerica.ascx.cs | 2 +- .../mod_scadenziarioCommesse.ascx.cs | 2 +- .../mod_selettore_ajax.ascx.cs | 2 +- XPS/WebUserControls/mod_vocabolario.ascx.cs | 14 +- XPS/login.aspx.cs | 24 +-- 23 files changed, 253 insertions(+), 107 deletions(-) diff --git a/XPS/Web.config b/XPS/Web.config index 777960f..2cdc712 100644 --- a/XPS/Web.config +++ b/XPS/Web.config @@ -136,7 +136,7 @@ - + diff --git a/XPS/WebUserControls/mod_ULP.ascx.cs b/XPS/WebUserControls/mod_ULP.ascx.cs index 5303d0e..5cb68d0 100644 --- a/XPS/WebUserControls/mod_ULP.ascx.cs +++ b/XPS/WebUserControls/mod_ULP.ascx.cs @@ -13,7 +13,7 @@ using XPS_data; namespace XPS.WebUserControls { - public partial class mod_ULP : ApplicationUserControl + public partial class mod_ULP : SteamWare.UserControl { #region area da NON modificare @@ -25,10 +25,9 @@ namespace XPS.WebUserControls /// /// aggiorna controlli datagrid e numero righe in pagina /// - protected override void aggiornaControlliDataGL() + protected void aggiornaControlliDataGL() { - base.aggiornaControlliDataGL(); - grView.PageSize = _righeDataGridMed; + grView.PageSize = righeDataGridMed; } /// /// traduce gli header delle colonne @@ -139,14 +138,10 @@ namespace XPS.WebUserControls protected override void OnInit(EventArgs e) { base.OnInit(e); + aggiornaControlliDataGL(); _idxGridView = "CodRow"; } - - protected override void bindControlli() - { - base.bindControlli(); - } - + /// /// determino se il pulsante di conferma tutto schedulato sia visibile... /// diff --git a/XPS/WebUserControls/mod_anagraficaEventi.ascx.cs b/XPS/WebUserControls/mod_anagraficaEventi.ascx.cs index ea97136..8545a69 100644 --- a/XPS/WebUserControls/mod_anagraficaEventi.ascx.cs +++ b/XPS/WebUserControls/mod_anagraficaEventi.ascx.cs @@ -12,7 +12,7 @@ using SteamWare; namespace XPS.WebUserControls { - public partial class mod_anagraficaEventi : ApplicationUserControl + public partial class mod_anagraficaEventi : SteamWare.UserControl { #region area da NON modificare @@ -85,10 +85,9 @@ namespace XPS.WebUserControls /// /// aggiorna controlli datagrid e numero righe in pagina /// - protected override void aggiornaControlliDataGL() + protected void aggiornaControlliDataGL() { - base.aggiornaControlliDataGL(); - grView.PageSize = _righeDataGridMed; + grView.PageSize = righeDataGridMed; } /// /// traduce gli header delle colonne @@ -165,9 +164,8 @@ namespace XPS.WebUserControls /// /// collega i controlli /// - protected override void bindControlli() + protected void bindControlli() { - base.bindControlli(); caricaTabelle(); } /// @@ -262,6 +260,8 @@ namespace XPS.WebUserControls protected override void OnInit(EventArgs e) { base.OnInit(e); + aggiornaControlliDataGL(); + bindControlli(); _idxGridView = "CodEvento"; } void Mod_filtro1_eh_selValore(object sender, EventArgs e) diff --git a/XPS/WebUserControls/mod_anagraficaMappe.ascx.cs b/XPS/WebUserControls/mod_anagraficaMappe.ascx.cs index e594d75..4567c67 100644 --- a/XPS/WebUserControls/mod_anagraficaMappe.ascx.cs +++ b/XPS/WebUserControls/mod_anagraficaMappe.ascx.cs @@ -13,7 +13,7 @@ using XPS_data; namespace XPS.WebUserControls { - public partial class mod_anagraficaMappe : ApplicationUserControl + public partial class mod_anagraficaMappe : SteamWare.UserControl { #region area da NON modificare @@ -55,10 +55,9 @@ namespace XPS.WebUserControls /// /// aggiorna controlli datagrid e numero righe in pagina /// - protected override void aggiornaControlliDataGL() + protected void aggiornaControlliDataGL() { - base.aggiornaControlliDataGL(); - grView.PageSize = _righeDataGridMed; + grView.PageSize = righeDataGridMed; } /// /// traduce gli header delle colonne @@ -205,6 +204,7 @@ namespace XPS.WebUserControls protected override void OnInit(EventArgs e) { base.OnInit(e); + aggiornaControlliDataGL(); _idxGridView = "CodMappe"; } void Mod_filtro1_eh_selValore(object sender, EventArgs e) diff --git a/XPS/WebUserControls/mod_anagraficaStati.ascx.cs b/XPS/WebUserControls/mod_anagraficaStati.ascx.cs index d00aa38..77e4829 100644 --- a/XPS/WebUserControls/mod_anagraficaStati.ascx.cs +++ b/XPS/WebUserControls/mod_anagraficaStati.ascx.cs @@ -12,7 +12,7 @@ using SteamWare; namespace XPS.WebUserControls { - public partial class mod_anagraficaStati : ApplicationUserControl + public partial class mod_anagraficaStati : SteamWare.UserControl { #region area da NON modificare @@ -85,10 +85,9 @@ namespace XPS.WebUserControls /// /// aggiorna controlli datagrid e numero righe in pagina /// - protected override void aggiornaControlliDataGL() - { - base.aggiornaControlliDataGL(); - grView.PageSize = _righeDataGridMed; + protected void aggiornaControlliDataGL() + { + grView.PageSize = righeDataGridMed; } /// /// traduce gli header delle colonne @@ -240,9 +239,8 @@ namespace XPS.WebUserControls /// /// traduco labels /// - protected override void traduciObj() + protected void traduciObj() { - base.traduciObj(); lblMappe.Text = traduci("lblMappe"); lblTipo.Text = traduci("lblTipo"); btnShowClona.Text = traduci("btnShowClona"); @@ -255,6 +253,8 @@ namespace XPS.WebUserControls protected override void OnInit(EventArgs e) { base.OnInit(e); + aggiornaControlliDataGL(); + traduciObj(); _idxGridView = "CodStato"; if (!Page.IsPostBack) { diff --git a/XPS/WebUserControls/mod_anagraficaStati.ascx.designer.cs b/XPS/WebUserControls/mod_anagraficaStati.ascx.designer.cs index 36fd6e7..a8bf6b5 100644 --- a/XPS/WebUserControls/mod_anagraficaStati.ascx.designer.cs +++ b/XPS/WebUserControls/mod_anagraficaStati.ascx.designer.cs @@ -1,10 +1,9 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4963 // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ diff --git a/XPS/WebUserControls/mod_barcode.ascx.cs b/XPS/WebUserControls/mod_barcode.ascx.cs index 5eb2bda..5a3a3f2 100644 --- a/XPS/WebUserControls/mod_barcode.ascx.cs +++ b/XPS/WebUserControls/mod_barcode.ascx.cs @@ -7,7 +7,7 @@ using SteamWare; namespace XPS.WebUserControls { - public partial class mod_barcode : ApplicationUserControl + public partial class mod_barcode : SteamWare.UserControl { #region area protected diff --git a/XPS/WebUserControls/mod_chLang.ascx.cs b/XPS/WebUserControls/mod_chLang.ascx.cs index 8347559..5adc811 100644 --- a/XPS/WebUserControls/mod_chLang.ascx.cs +++ b/XPS/WebUserControls/mod_chLang.ascx.cs @@ -12,7 +12,7 @@ using SteamWare; namespace XPS.WebUserControls { - public partial class mod_chLang : ApplicationUserControl + public partial class mod_chLang : SteamWare.UserControl { protected void dataListLingue_SelectedIndexChanged(object sender, EventArgs e) { @@ -21,10 +21,15 @@ namespace XPS.WebUserControls // salvo richiesta udpate in sessione... SteamWare.memLayer.ML.setSessionVal("doUpdateNow", "true"); user_std.UtSn.ricaricaMappaSito(); - Response.Redirect(_paginaCorrente); + Response.Redirect(devicesAuthProxy.pagCorrente); + } + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + traduciObj(); } - protected override void traduciObj() + protected void traduciObj() { lblScegli.Text = traduci("scegliLingua"); } diff --git a/XPS/WebUserControls/mod_dettComm.ascx.cs b/XPS/WebUserControls/mod_dettComm.ascx.cs index a40afde..a128462 100644 --- a/XPS/WebUserControls/mod_dettComm.ascx.cs +++ b/XPS/WebUserControls/mod_dettComm.ascx.cs @@ -13,7 +13,7 @@ using XPS_data; namespace XPS.WebUserControls { - public partial class mod_dettComm : ApplicationUserControl + public partial class mod_dettComm : SteamWare.UserControl { #region area da NON modificare @@ -25,10 +25,9 @@ namespace XPS.WebUserControls /// /// aggiorna controlli datagrid e numero righe in pagina /// - protected override void aggiornaControlliDataGL() + protected void aggiornaControlliDataGL() { - base.aggiornaControlliDataGL(); - grView.PageSize = _righeDataGridMed; + grView.PageSize = righeDataGridMed; } /// /// traduce gli header delle colonne @@ -130,6 +129,7 @@ namespace XPS.WebUserControls protected override void OnInit(EventArgs e) { base.OnInit(e); + aggiornaControlliDataGL(); _idxGridView = "CodRow"; updateNavBar(); mod_logStati1.eh_reset += new EventHandler(mod_logStati1_eh_reset); diff --git a/XPS/WebUserControls/mod_elencoComm.ascx.cs b/XPS/WebUserControls/mod_elencoComm.ascx.cs index e1e8ba9..0f093ba 100644 --- a/XPS/WebUserControls/mod_elencoComm.ascx.cs +++ b/XPS/WebUserControls/mod_elencoComm.ascx.cs @@ -13,7 +13,7 @@ using XPS_data; namespace XPS.WebUserControls { - public partial class mod_elencoComm : ApplicationUserControl + public partial class mod_elencoComm : SteamWare.UserControl { #region area da NON modificare @@ -25,11 +25,10 @@ namespace XPS.WebUserControls /// /// aggiorna controlli datagrid e numero righe in pagina /// - protected override void aggiornaControlliDataGL() + protected void aggiornaControlliDataGL() { - base.aggiornaControlliDataGL(); checkFixOds(); - grView.PageSize = _righeDataGridMed; + grView.PageSize = righeDataGridMed; } /// /// traduce gli header delle colonne @@ -138,6 +137,8 @@ namespace XPS.WebUserControls protected override void OnInit(EventArgs e) { base.OnInit(e); + SetUpByUserRight(); + aggiornaControlliDataGL(); _idxGridView = "CodDDT"; mf_clienti.eh_selValore += new EventHandler(mf_clienti_eh_selValore); mf_tipoFiltro.eh_selValore += new EventHandler(mf_tipoFiltro_eh_selValore); @@ -207,15 +208,14 @@ namespace XPS.WebUserControls pnlSetDueDate.Visible = false; } /// - /// sistemo permessi utente e in cascata sistemo visualizzaizone filtri e controlli + /// sistemo permessi utente e in cascata sistemo visualizzazione filtri e controlli /// - protected override void SetUpByUserRight() + protected void SetUpByUserRight() { - base.SetUpByUserRight(); if (!Page.IsPostBack) { // imposto la pag corrente nel controllo di filtraggio... - lblPag.Text = _paginaCorrente; + lblPag.Text = devicesAuthProxy.pagCorrente; mf_tipoFiltro.ods = odsTipoFiltro; mf_clienti.ods = odsFiltroClienti; fixControlliDaModoCorrente(); diff --git a/XPS/WebUserControls/mod_ev2stati.ascx.cs b/XPS/WebUserControls/mod_ev2stati.ascx.cs index 327c3b1..c14378b 100644 --- a/XPS/WebUserControls/mod_ev2stati.ascx.cs +++ b/XPS/WebUserControls/mod_ev2stati.ascx.cs @@ -13,7 +13,7 @@ using XPS_data; namespace XPS.WebUserControls { - public partial class mod_ev2stati : ApplicationUserControl + public partial class mod_ev2stati : SteamWare.UserControl { #region area da NON modificare @@ -55,10 +55,9 @@ namespace XPS.WebUserControls /// /// aggiorna controlli datagrid e numero righe in pagina /// - protected override void aggiornaControlliDataGL() + protected void aggiornaControlliDataGL() { - base.aggiornaControlliDataGL(); - grView.PageSize = _righeDataGridMed; + grView.PageSize = righeDataGridMed; } /// /// traduce gli header delle colonne @@ -205,6 +204,8 @@ namespace XPS.WebUserControls protected override void OnInit(EventArgs e) { base.OnInit(e); + traduciObj(); + aggiornaControlliDataGL(); _idxGridView = "CodStato"; if (!Page.IsPostBack) { @@ -214,9 +215,8 @@ namespace XPS.WebUserControls /// /// traduco labels /// - protected override void traduciObj() + protected void traduciObj() { - base.traduciObj(); btnShowClona.Text = traduci("btnShowClona"); btnClonaStati.Text = traduci("btnClonaStati"); } diff --git a/XPS/WebUserControls/mod_filtro.ascx.cs b/XPS/WebUserControls/mod_filtro.ascx.cs index e7ad27f..8bd6820 100644 --- a/XPS/WebUserControls/mod_filtro.ascx.cs +++ b/XPS/WebUserControls/mod_filtro.ascx.cs @@ -12,7 +12,7 @@ using SteamWare; namespace XPS.WebUserControls { - public partial class mod_filtro : ApplicationUserControl + public partial class mod_filtro : SteamWare.UserControl { protected ObjectDataSource _ods; protected string _valore diff --git a/XPS/WebUserControls/mod_lemmiVocab.ascx.cs b/XPS/WebUserControls/mod_lemmiVocab.ascx.cs index 22ab52f..c89f713 100644 --- a/XPS/WebUserControls/mod_lemmiVocab.ascx.cs +++ b/XPS/WebUserControls/mod_lemmiVocab.ascx.cs @@ -12,14 +12,19 @@ using SteamWare; namespace XPS.WebUserControls { - public partial class mod_lemmiVocab : ApplicationUserControl + public partial class mod_lemmiVocab : SteamWare.UserControl { #region protected - protected override void aggiornaControlliDataGL() + protected void aggiornaControlliDataGL() { - base.aggiornaControlliDataGL(); - grView.PageSize = _righeDataGridAnagr; + grView.PageSize = righeDataGridAnagr; + } + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + aggiornaControlliDataGL(); } protected void grView_DataBound(object sender, EventArgs e) diff --git a/XPS/WebUserControls/mod_login.ascx.cs b/XPS/WebUserControls/mod_login.ascx.cs index 99705bd..283f31f 100644 --- a/XPS/WebUserControls/mod_login.ascx.cs +++ b/XPS/WebUserControls/mod_login.ascx.cs @@ -15,7 +15,7 @@ namespace XPS.WebUserControls /// /// classe gestione login e forzatura login /// - public partial class mod_login : ApplicationUserControl + public partial class mod_login : SteamWare.UserControl { #region area protected/private diff --git a/XPS/WebUserControls/mod_main_help.ascx.cs b/XPS/WebUserControls/mod_main_help.ascx.cs index 7f8953f..e92c423 100644 --- a/XPS/WebUserControls/mod_main_help.ascx.cs +++ b/XPS/WebUserControls/mod_main_help.ascx.cs @@ -12,7 +12,7 @@ using SteamWare; namespace XPS.WebUserControls { - public partial class mod_main_help : ApplicationUserControl + public partial class mod_main_help : SteamWare.UserControl { #region inizializzazione generica & utility diff --git a/XPS/WebUserControls/mod_menuTop.ascx.cs b/XPS/WebUserControls/mod_menuTop.ascx.cs index e2472b5..6f84d54 100644 --- a/XPS/WebUserControls/mod_menuTop.ascx.cs +++ b/XPS/WebUserControls/mod_menuTop.ascx.cs @@ -13,7 +13,7 @@ using SteamWare; namespace XPS.WebUserControls { - public partial class mod_menuTop : ApplicationUserControl + public partial class mod_menuTop : SteamWare.UserControl { private string _titleString; @@ -23,9 +23,48 @@ namespace XPS.WebUserControls #endregion - protected override void Page_Load(object sender, EventArgs e) + protected void Page_Load(object sender, EventArgs e) { - base.Page_Load(sender, e); + if (!Page.IsPostBack) + { + Page.Title = Request.Url.ToString(); + // se ho cambiato pagina registro...) + if (devicesAuthProxy.pagPrecedente != titolo) + { + devicesAuthProxy.pagPrecedente = devicesAuthProxy.pagCorrente; + } + // salvo pagina corrente + devicesAuthProxy.pagCorrente = titolo; + } + // SOLO se la pagina NON E' "safe"... + if (memLayer.ML.confReadString("PageNoIndex").IndexOf(titolo) < 0) + { + bool userOk = checkUser(); + bool pageOk = checkPageIsAuth(); + // controllo se c'è utente in sessione.. + if ((userOk)) + { + // ora controllo pagina... + if (!pageOk) + { + if (devicesAuthProxy.stObj.isPageEnabled(devicesAuthProxy.pagPrecedente)) + { + Response.Redirect(devicesAuthProxy.pagPrecedente); + } + else + { + Response.Redirect("Default"); + } + } + } + else + { + // rimando pagina x registrazione devices + Response.Redirect("UserAdmin"); + } + } + +#if false btnLogOut.Visible = user_std.UtSn.isForcedUser; if (SteamWare.memLayer.ML.isInSessionObject("doUpdateNow")) { @@ -37,12 +76,131 @@ namespace XPS.WebUserControls { updateTreeMenu(); } + if (!Page.IsPostBack) + { + _titleString = SteamWare.memLayer.ML.StringSessionObj("_titleString"); + } +#endif + } + /// + /// verifica che la pagina sia tra quelle autorizzate x l'utente + /// + /// + private bool checkPageIsAuth() + { + bool allOk = false; + bool pageSafe = (memLayer.ML.confReadString("PageNoIndex").IndexOf(titolo) >= 0); + bool pageAuth = devicesAuthProxy.stObj.isPageEnabled(titolo); + allOk = (pageSafe || pageAuth); + return allOk; + } + /// + /// verifica presenza utente autorizzato in sessione + /// + private bool checkUser() + { + bool allOk = devicesAuthProxy.stObj.isAuth; + //if (!devicesAuthProxy.stObj.isAuth) + //{ + // controllo cookie device... + allOk = checkAuthCookie(); + if (!allOk) + { + ResetUser(); + } + //} + return allOk; + } + /// + /// Restituisce cognome/nome da sessione... + /// + public string CognomeNome + { + get + { + string answ = "-"; + try + { + answ = SteamWare.devicesAuthProxy.stObj.CognomeNome; + } + catch + { } + return answ; + } + } + /// + /// verifica la presenza di un cookie VALIDO per autorizzare il device ed avvia utente... + /// + private bool checkAuthCookie() + { + bool answ = false; + try + { + HttpCookie cookie = Request.Cookies[devicesAuthProxy.AuthCookieName]; + if (!(cookie == null || cookie.Value == "")) + { + // ricavo utente da cookie... + string userAgent = ""; + string postazione_IP = ""; + string devSecret = cookie.Value; + DS_Auth.AnagDevicesRow device = null; + // cerco il device...ogni dipendente può averne + di 1 registrato a suo nome... + string email = ""; + try + { + device = devicesAuthProxy.stObj.taAnagDev.getByDeviceSecret(devSecret)[0]; + email = device.USER_NAME; + } + catch + { } + if (email != "") + { + // aggiorno descrizione (user agent) ed IP... + userAgent = Request.UserAgent; + postazione_IP = Request.UserHostAddress; + // controllo IP e DeviceDescription x eventuale update + if ((device.lastIPv4 != postazione_IP) || (device.Description != userAgent)) + { + // salvo ultimo "contatto" del device aggiornando descrizione ed IP + devicesAuthProxy.stObj.taAnagDev.updateIP(device.IdxDevice, DateTime.Now, postazione_IP, userAgent); + } + // salvo in sessione utente + memLayer.ML.setSessionVal("email", email); + // avvio utente... + devicesAuthProxy.stObj.startUpUtente(email); + // salvo gruppo... + if (devicesAuthProxy.stObj.isAuth) + { + // se tutto ok + memLayer.ML.setSessionVal("Gruppo", devicesAuthProxy.stObj.rigaUtente.CodGruppo); + answ = true; + } + + } + } + } + catch (Exception exc) + { + logger.lg.scriviLog(string.Format("Errore in checkAuthCookie:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION); + } + return answ; + } + + private void ResetUser() + { + devicesAuthProxy.stObj.clearAllUserData(); + // svuoto cookie... + memLayer.ML.setCookieVal(devicesAuthProxy.AuthCookieName, ""); + memLayer.ML.emptyCookieVal(devicesAuthProxy.AuthCookieName); } protected void btnLogOut_Click(object sender, EventArgs e) { Session.Abandon(); - Response.Redirect("forceUser.aspx"); +#if false + Response.Redirect("forceUser.aspx"); +#endif + ResetUser(); } protected void btnUpdate_Click(object sender, EventArgs e) { @@ -86,16 +244,10 @@ namespace XPS.WebUserControls eh_reqUpdateMenu(this, new EventArgs()); } - Response.Redirect(_paginaCorrente); + Response.Redirect(devicesAuthProxy.pagCorrente); } - - protected override void loadSessionData() - { - base.loadSessionData(); - _titleString = SteamWare.memLayer.ML.StringSessionObj("_titleString"); - } - - protected override void bindControlli() + + protected void bindControlli() { if (!Page.IsPostBack) { diff --git a/XPS/WebUserControls/mod_navPath.ascx.cs b/XPS/WebUserControls/mod_navPath.ascx.cs index 62f5d0a..355cdd6 100644 --- a/XPS/WebUserControls/mod_navPath.ascx.cs +++ b/XPS/WebUserControls/mod_navPath.ascx.cs @@ -12,7 +12,7 @@ using SteamWare; namespace XPS.WebUserControls { - public partial class mod_navPath : SteamWare.ApplicationUserControl + public partial class mod_navPath : SteamWare.UserControl { /// /// link alla pagina precedente... diff --git a/XPS/WebUserControls/mod_pageTitleAndSearch.ascx.cs b/XPS/WebUserControls/mod_pageTitleAndSearch.ascx.cs index c27a975..e9f1452 100644 --- a/XPS/WebUserControls/mod_pageTitleAndSearch.ascx.cs +++ b/XPS/WebUserControls/mod_pageTitleAndSearch.ascx.cs @@ -12,14 +12,20 @@ using SteamWare; namespace XPS.WebUserControls { - public partial class mod_pageTitleAndSearch : ApplicationUserControl + public partial class mod_pageTitleAndSearch : SteamWare.UserControl { #region area protected - protected string _titolo; - protected override void traduciObj() + protected override void OnInit(EventArgs e) { - DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", _paginaCorrente))[0]; + base.OnInit(e); + traduciObj(); + } + + protected string _titolo; + protected void traduciObj() + { + DataLayer_AnagGen.PermessiRow riga = (DataLayer_AnagGen.PermessiRow)user_std.UtSn.permessi.Select(string.Format("URL = '{0}'", devicesAuthProxy.pagCorrente))[0]; _titolo = riga.NOME; lblTitolo.Text = traduci(_titolo); } diff --git a/XPS/WebUserControls/mod_ricercaGenerica.ascx.cs b/XPS/WebUserControls/mod_ricercaGenerica.ascx.cs index f6be371..cc34415 100644 --- a/XPS/WebUserControls/mod_ricercaGenerica.ascx.cs +++ b/XPS/WebUserControls/mod_ricercaGenerica.ascx.cs @@ -12,7 +12,7 @@ using SteamWare; namespace XPS.WebUserControls { - public partial class mod_ricercaGenerica : ApplicationUserControl + public partial class mod_ricercaGenerica : SteamWare.UserControl { #region gestione eventi diff --git a/XPS/WebUserControls/mod_scadenziarioCommesse.ascx.cs b/XPS/WebUserControls/mod_scadenziarioCommesse.ascx.cs index 8e11d95..35f7a8f 100644 --- a/XPS/WebUserControls/mod_scadenziarioCommesse.ascx.cs +++ b/XPS/WebUserControls/mod_scadenziarioCommesse.ascx.cs @@ -12,7 +12,7 @@ using SteamWare; namespace XPS.WebUserControls { - public partial class mod_scadenziarioCommesse : ApplicationUserControl + public partial class mod_scadenziarioCommesse : SteamWare.UserControl { protected override void traduciObj() { diff --git a/XPS/WebUserControls/mod_selettore_ajax.ascx.cs b/XPS/WebUserControls/mod_selettore_ajax.ascx.cs index bd8ee15..c43e957 100644 --- a/XPS/WebUserControls/mod_selettore_ajax.ascx.cs +++ b/XPS/WebUserControls/mod_selettore_ajax.ascx.cs @@ -13,7 +13,7 @@ using SteamWare; namespace XPS.WebUserControls { [ValidationProperty("valore")] - public partial class mod_selettore_ajax : ApplicationUserControl + public partial class mod_selettore_ajax : SteamWare.UserControl { protected bool _chkVisibile = false; diff --git a/XPS/WebUserControls/mod_vocabolario.ascx.cs b/XPS/WebUserControls/mod_vocabolario.ascx.cs index 5b105f5..ad7f83c 100644 --- a/XPS/WebUserControls/mod_vocabolario.ascx.cs +++ b/XPS/WebUserControls/mod_vocabolario.ascx.cs @@ -12,7 +12,7 @@ using SteamWare; namespace XPS.WebUserControls { - public partial class mod_vocabolario : ApplicationUserControl + public partial class mod_vocabolario : SteamWare.UserControl { #region gestione eventi @@ -57,16 +57,20 @@ namespace XPS.WebUserControls // aggiorno il vocabolario in memoria... DataWrap.DW.resetVocabolario(); // riparto... - Response.Redirect(_paginaCorrente); + Response.Redirect(devicesAuthProxy.pagCorrente); } } - protected override void aggiornaControlliDataGL() + protected void aggiornaControlliDataGL() { - base.aggiornaControlliDataGL(); - grView.PageSize = _righeDataGridAnagr; + grView.PageSize = righeDataGridAnagr; ods.DataBind(); } + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + aggiornaControlliDataGL(); + } protected void grView_DataBound(object sender, EventArgs e) { diff --git a/XPS/login.aspx.cs b/XPS/login.aspx.cs index 267207f..738023b 100644 --- a/XPS/login.aspx.cs +++ b/XPS/login.aspx.cs @@ -67,26 +67,6 @@ namespace XPS Response.Redirect("UserAdmin"); } } -#if false - // controllo cookie... - bool cookieLogin = false; - if (memLayer.ML.confReadBool("enableCookie")) - { - cookieLogin = authProxy.tryAuthByCookie(memLayer.ML.confReadString("AuthCookie")); - } - if (!cookieLogin) - { - // compongo stringa x sito auth - string authPage = "./unauthorized.aspx"; - try - { - authPage = string.Format("{0}login.aspx?AuthCookie={1}&jumpPage={2}", memLayer.ML.confReadString("authSite"), memLayer.ML.confReadString("AuthCookie"), memLayer.ML.confReadString("currSite")); - } - catch - { } - Response.Redirect(authPage); - } -#endif // setto modalità login mod_login1.modoLogin = SteamWare.loginMode.normale; } @@ -122,7 +102,7 @@ namespace XPS //if (!devicesAuthProxy.stObj.isAuth) //{ // controllo cookie device... - allOk = checkAuthCookieScheMe(); + allOk = checkAuthCookie(); if (!allOk) { ResetUser(); @@ -150,7 +130,7 @@ namespace XPS /// /// verifica la presenza di un cookie VALIDO per autorizzare il device ed avvia utente... /// - private bool checkAuthCookieScheMe() + private bool checkAuthCookie() { bool answ = false; try