diff --git a/GPW_Admin/WebUserControls/cmp_homeButtons.ascx b/GPW_Admin/WebUserControls/cmp_homeButtons.ascx index 0104329..b40abff 100644 --- a/GPW_Admin/WebUserControls/cmp_homeButtons.ascx +++ b/GPW_Admin/WebUserControls/cmp_homeButtons.ascx @@ -2,7 +2,7 @@
-
+
diff --git a/GPW_Admin/WebUserControls/cmp_homeButtons.ascx.designer.cs b/GPW_Admin/WebUserControls/cmp_homeButtons.ascx.designer.cs index b286687..a67a1b4 100644 --- a/GPW_Admin/WebUserControls/cmp_homeButtons.ascx.designer.cs +++ b/GPW_Admin/WebUserControls/cmp_homeButtons.ascx.designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ -// -// Codice generato da uno strumento. +// +// This code was generated by a tool. // -// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se -// il codice viene rigenerato. -// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// //------------------------------------------------------------------------------ namespace GPW_Admin.WebUserControls @@ -15,20 +15,20 @@ namespace GPW_Admin.WebUserControls { /// - /// Controllo menu. + /// menu control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.Repeater menu; /// - /// Controllo XmlMenu. + /// XmlMenu control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.XmlDataSource XmlMenu; } diff --git a/GPW_Admin/WebUserControls/cmp_menuTop.ascx b/GPW_Admin/WebUserControls/cmp_menuTop.ascx index a5b5994..81e5b14 100644 --- a/GPW_Admin/WebUserControls/cmp_menuTop.ascx +++ b/GPW_Admin/WebUserControls/cmp_menuTop.ascx @@ -2,7 +2,7 @@
diff --git a/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx.cs b/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx.cs index 4f23db4..f3e9c2f 100644 --- a/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx.cs +++ b/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx.cs @@ -266,6 +266,23 @@ namespace GPW_Admin.WebUserControls grView.DataBind(); } + protected void lbtRegenUserKey_Click(object sender, EventArgs e) + { + // rigenera TUTTE le userkey utente + var elencoDip = licenzeGPW.getDipAttivi().ToList(); + // ciclo x ogni utente... + foreach (var dipendente in elencoDip) + { + DateTime adesso = DateTime.Now; + string newKey = $"{dipendente.CF}-{adesso:yyMMdd-HHmmss}"; + string md5UserAuthKey = SteamCrypto.EncryptString(newKey, "AuthGPW"); + // aggiorno su DB + DataProxy.DP.taDipendenti.stp_Dip_setAuthKey(dipendente.idxDipendente, md5UserAuthKey); + // chiama resync dati licenza (cod impiego / codAuth) + bool fatto = licenzeGPW.tryRefreshActivation(DataProxy.DP.hashCodImpiego(dipendente), md5UserAuthKey).Result; + } + } + /// /// Richiesta selezione utente /// @@ -350,11 +367,8 @@ namespace GPW_Admin.WebUserControls grView.EditIndex = -1; grView.DataBind(); } - } } - - } } } diff --git a/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx.designer.cs b/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx.designer.cs index 7dd66a5..666cf79 100644 --- a/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx.designer.cs +++ b/GPW_Admin/WebUserControls/mod_adminDipendenti.ascx.designer.cs @@ -59,6 +59,15 @@ namespace GPW_Admin.WebUserControls /// protected global::System.Web.UI.WebControls.LinkButton lbtShowTickets; + /// + /// lbtRegenUserKey control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.LinkButton lbtRegenUserKey; + /// /// chkshowAll control. /// diff --git a/GPW_Admin/WebUserControls/mod_adminFasi.ascx b/GPW_Admin/WebUserControls/mod_adminFasi.ascx index 3642f13..266fc82 100644 --- a/GPW_Admin/WebUserControls/mod_adminFasi.ascx +++ b/GPW_Admin/WebUserControls/mod_adminFasi.ascx @@ -12,14 +12,12 @@ Progetti
- +
- + diff --git a/GPW_Admin/WebUserControls/mod_adminFasi.ascx.cs b/GPW_Admin/WebUserControls/mod_adminFasi.ascx.cs index d3d3350..413eedc 100644 --- a/GPW_Admin/WebUserControls/mod_adminFasi.ascx.cs +++ b/GPW_Admin/WebUserControls/mod_adminFasi.ascx.cs @@ -146,6 +146,7 @@ namespace GPW_Admin.WebUserControls set { memLayer.ML.setSessionVal(string.Format("idxProj_{0}", sessionUid), value); + filtroPrj.valore = $"{value}"; } } diff --git a/GPW_Admin/WebUserControls/mod_adminProgetti.ascx.cs b/GPW_Admin/WebUserControls/mod_adminProgetti.ascx.cs index a673a19..84aeee7 100644 --- a/GPW_Admin/WebUserControls/mod_adminProgetti.ascx.cs +++ b/GPW_Admin/WebUserControls/mod_adminProgetti.ascx.cs @@ -98,6 +98,30 @@ namespace GPW_Admin.WebUserControls } } + protected int idxCliSel + { + get + { + return memLayer.ML.IntSessionObj("idxCli_sel"); + } + set + { + memLayer.ML.setSessionVal("idxCli_sel", $"{value}"); + } + } + + protected int idxProjSel + { + get + { + return memLayer.ML.IntSessionObj("idxProgetto_sel"); + } + set + { + memLayer.ML.setSessionVal("idxProgetto_sel", $"{value}"); + } + } + #endregion Protected Properties #region Public Properties @@ -178,14 +202,7 @@ namespace GPW_Admin.WebUserControls /// private void filtroCli_eh_selValore(object sender, EventArgs e) { - if (filtroCli.isChecked) - { - memLayer.ML.setSessionVal("idxCli_sel", filtroCli.valoreInt); - } - else - { - memLayer.ML.setSessionVal("idxCli_sel", 0); - } + idxCliSel = filtroCli.isChecked ? filtroCli.valoreInt : 0; // salvo! var tempFilt = currFiltProj; tempFilt.filtCli = filtroCli.isChecked; @@ -245,6 +262,7 @@ namespace GPW_Admin.WebUserControls showVuoti = currFilt.showEmpty; showOnlyStarred = currFilt.onlyStarred; filtroCli.isChecked = currFilt.filtCli; + idxCliSel = filtroCli.isChecked ? filtroCli.valoreInt : 0; filtroGrp.isChecked = currFilt.filtGrp; // se deselezionato --> svuoto if (!currFilt.filtGrp) @@ -386,35 +404,21 @@ namespace GPW_Admin.WebUserControls if (e != null) { // salvo progetto sel - memLayer.ML.setSessionVal("idxProgetto_sel", e.Keys["idxProgetto"]); + saveProjSel(e.Keys["idxProgetto"]); // quale comando? string _comando = ""; - if (SteamWare.memLayer.ML.isInSessionObject("nextObjCommand")) + if (memLayer.ML.isInSessionObject("nextObjCommand")) { - _comando = SteamWare.memLayer.ML.StringSessionObj("nextObjCommand"); - SteamWare.memLayer.ML.emptySessionVal("nextObjCommand"); + _comando = memLayer.ML.StringSessionObj("nextObjCommand"); + memLayer.ML.emptySessionVal("nextObjCommand"); } // verifico il tipo di richiesta (clona o update normale) switch (_comando) { case "dettFasi": - // salvo idxCli... - int idxCli = 0; - try - { - idxCli = DataProxy.DP.taAP.getByIdxPrj(memLayer.ML.IntSessionObj("idxProgetto_sel"))[0].idxCliente; - } - catch - { } - memLayer.ML.setSessionVal("idxCli_sel", idxCli); - // preseleziono filtro cliente... - var tempFilt = currFiltProj; - tempFilt.filtCli = true; - currFiltProj = tempFilt; - filtroCli.valore = $"{idxCli}"; - Response.Redirect("fasi"); // blocco update! e.Cancel = true; + Response.Redirect("fasi"); break; default: @@ -431,7 +435,9 @@ namespace GPW_Admin.WebUserControls /// protected void grView_SelectedIndexChanged(object sender, EventArgs e) { - memLayer.ML.setSessionVal("idxProgetto_sel", grView.SelectedDataKey["idxProgetto"]); + int idxProj = 0; + int.TryParse($"{grView.SelectedDataKey["idxProgetto"]}", out idxProj); + mod_dettaglioProgetto1.IdxProgetto = idxProj; mod_dettaglioProgetto1.Visible = true; raiseEvent(); } @@ -580,6 +586,42 @@ namespace GPW_Admin.WebUserControls } } + /// + /// Effettua salvataggio dati x progetto selezionato in sessione (cliente + progetto) + /// + /// + /// + protected bool saveProjSel(object idxProj) + { + bool fatto = false; + if (idxProj != null) + { + int idxProgetto = 0; + int.TryParse($"{idxProj}", out idxProgetto); + if (idxProgetto > 0) + { + try + { + // salvo progetto sel + idxProjSel = idxProgetto; + // salvo idxCli... + int idxCli = 0; + try + { + idxCli = DataProxy.DP.taAP.getByIdxPrj(idxProgetto)[0].idxCliente; + idxCliSel = idxCli; + } + catch + { } + fatto = true; + } + catch + { } + } + } + return fatto; + } + #endregion Protected Methods #region Public Methods diff --git a/GPW_Admin/WebUserControls/mod_dettaglioProgetto.ascx b/GPW_Admin/WebUserControls/mod_dettaglioProgetto.ascx index bd6dc23..95734c4 100644 --- a/GPW_Admin/WebUserControls/mod_dettaglioProgetto.ascx +++ b/GPW_Admin/WebUserControls/mod_dettaglioProgetto.ascx @@ -92,18 +92,19 @@
-
+ <%--
-
+
--%> - + - \ No newline at end of file + + \ No newline at end of file diff --git a/GPW_Admin/WebUserControls/mod_dettaglioProgetto.ascx.cs b/GPW_Admin/WebUserControls/mod_dettaglioProgetto.ascx.cs index eeeee42..557f66d 100644 --- a/GPW_Admin/WebUserControls/mod_dettaglioProgetto.ascx.cs +++ b/GPW_Admin/WebUserControls/mod_dettaglioProgetto.ascx.cs @@ -21,6 +21,22 @@ namespace GPW_Admin.WebUserControls /// public string _paginaCorrente { get; set; } + public int IdxProgetto + { + get + { + //memLayer.ML.IntSessionObj("idxProgetto_sel") + int answ = 0; + int.TryParse(hfIdxProgetto.Value, out answ); + return answ; + } + set + { + hfIdxProgetto.Value = $"{value}"; + + } + } + #endregion Public Properties #region Protected Methods @@ -32,7 +48,7 @@ namespace GPW_Admin.WebUserControls /// protected void btnFasi_Click(object sender, EventArgs e) { - Response.Redirect("fasi.aspx"); + Response.Redirect("fasi"); } /// @@ -46,7 +62,7 @@ namespace GPW_Admin.WebUserControls { // chiamo update attivo/non attivo... CheckBox chkBox = (CheckBox)sender; - DataProxy.DP.taAP.updateAttivo(chkBox.Checked, memLayer.ML.IntSessionObj("idxProgetto_sel")); + DataProxy.DP.taAP.updateAttivo(chkBox.Checked, IdxProgetto); fmView.DataBind(); if (eh_nuovoValore != null) { @@ -66,7 +82,7 @@ namespace GPW_Admin.WebUserControls { // chiamo update attivo/non attivo... CheckBox chkBox = (CheckBox)sender; - DataProxy.DP.taAP.updateStarred(chkBox.Checked, memLayer.ML.IntSessionObj("idxProgetto_sel")); + DataProxy.DP.taAP.updateStarred(chkBox.Checked, IdxProgetto); fmView.DataBind(); if (eh_nuovoValore != null) { diff --git a/GPW_Admin/WebUserControls/mod_dettaglioProgetto.ascx.designer.cs b/GPW_Admin/WebUserControls/mod_dettaglioProgetto.ascx.designer.cs index e9c8853..9b3612b 100644 --- a/GPW_Admin/WebUserControls/mod_dettaglioProgetto.ascx.designer.cs +++ b/GPW_Admin/WebUserControls/mod_dettaglioProgetto.ascx.designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ -// -// Codice generato da uno strumento. +// +// This code was generated by a tool. // -// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se -// il codice viene rigenerato. -// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// //------------------------------------------------------------------------------ namespace GPW_Admin.WebUserControls @@ -15,21 +15,30 @@ namespace GPW_Admin.WebUserControls { /// - /// Controllo fmView. + /// fmView control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.FormView fmView; /// - /// Controllo ods. + /// ods control. /// /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.ObjectDataSource ods; + + /// + /// hfIdxProgetto control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HiddenField hfIdxProgetto; } } diff --git a/GPW_Admin/fasi.aspx.cs b/GPW_Admin/fasi.aspx.cs index f39e8af..f7f8a0f 100644 --- a/GPW_Admin/fasi.aspx.cs +++ b/GPW_Admin/fasi.aspx.cs @@ -19,8 +19,8 @@ namespace GPW_Admin protected void Page_Load(object sender, EventArgs e) { // imposto fasi selezionate! - mod_adminFasi1.idxProgetto = memLayer.ML.IntSessionObj("idxProgetto_sel"); mod_adminFasi1.idxCliente = memLayer.ML.IntSessionObj("idxCli_sel"); + mod_adminFasi1.idxProgetto = memLayer.ML.IntSessionObj("idxProgetto_sel"); mod_pageSize.eh_nuovaSize += Mod_pageSize_eh_nuovaSize; }