From 858e323384bcd0cab19361f6bfbdfec88c4af8d2 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Sat, 12 Oct 2019 08:18:36 +0200 Subject: [PATCH] Update x redirect --- GPW_Smart/GPW_Smart.csproj | 8 ++++ GPW_Smart/Reset.aspx | 18 ++++++++ GPW_Smart/Reset.aspx.cs | 77 ++++++++++++++++++++++++++++++++ GPW_Smart/Reset.aspx.designer.cs | 33 ++++++++++++++ Jenkinsfile | 2 +- 5 files changed, 137 insertions(+), 1 deletion(-) create mode 100644 GPW_Smart/Reset.aspx create mode 100644 GPW_Smart/Reset.aspx.cs create mode 100644 GPW_Smart/Reset.aspx.designer.cs diff --git a/GPW_Smart/GPW_Smart.csproj b/GPW_Smart/GPW_Smart.csproj index fabe219..e6eda24 100644 --- a/GPW_Smart/GPW_Smart.csproj +++ b/GPW_Smart/GPW_Smart.csproj @@ -461,6 +461,7 @@ + @@ -659,6 +660,13 @@ regNewDevice.aspx + + Reset.aspx + ASPXCodeBehind + + + Reset.aspx + Site.Master ASPXCodeBehind diff --git a/GPW_Smart/Reset.aspx b/GPW_Smart/Reset.aspx new file mode 100644 index 0000000..6b82fd2 --- /dev/null +++ b/GPW_Smart/Reset.aspx @@ -0,0 +1,18 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Reset.aspx.cs" Inherits="GPW_Smart.Reset" %> + + + + + + + + + +
+
+

Reset applicativo

+ +
+
+ + diff --git a/GPW_Smart/Reset.aspx.cs b/GPW_Smart/Reset.aspx.cs new file mode 100644 index 0000000..9e198ee --- /dev/null +++ b/GPW_Smart/Reset.aspx.cs @@ -0,0 +1,77 @@ +using SteamWare; +using System; + +namespace GPW_Smart +{ + public partial class Reset : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + string paginaPrec = user_std.pagPrecedente; + string action = memLayer.ML.QSS("Action"); + string nextPage = memLayer.ML.StringSessionObj("nextPage"); + string testo = ""; + long recPrev = 0; + long recPost = 0; + if (action != "") + { + if (action.Contains("C")) + { + recPrev = Cache.Count; + // reset dati in cache... + memLayer.ML.flushRegisteredCache(); + recPost = Cache.Count; + testo += string.Format("
Reset Cache: {0} --> {1}
", recPrev, recPost); + } + if (action.Contains("D")) + { + recPrev = memLayer.ML.numRecAppConf; + // reset dati in cache x DbConfig... + memLayer.ML.resetAppConf(); + recPost = memLayer.ML.numRecAppConf; + testo += string.Format("
Reset DB AppConf: {0} --> {1}
", recPrev, recPost); + } + if (action.Contains("R")) + { + recPrev = memLayer.ML.numRecRedis; + // reset dati in cache x DbConfig... + memLayer.ML.redFlushKey("**"); + recPost = memLayer.ML.numRecRedis; + testo += string.Format("
Reset Redis: {0} --> {1}
", recPrev, recPost); + } + if (action.Contains("S")) + { + recPrev = Session.Count; + // reset dati in sessione... + Session.Clear(); + recPost = Session.Count; + testo += string.Format("
Reset Sessione: {0} --> {1}
", recPrev, recPost); + } + if (action.Contains("V")) + { + recPrev = DataWrap.DW.numRecVoc; + // aggiorno vocabolario + DataWrap.DW.resetVocabolario(); + recPost = DataWrap.DW.numRecVoc; + testo += string.Format("
Reset Vocabolario: {0} --> {1}
", recPrev, recPost); + } + } + lblOut.Text = testo; + if (nextPage != "") + { + logger.lg.scriviLog(string.Format("Reset {0} OK: redirect a pag {1}", action, nextPage), tipoLog.INFO); + Response.Redirect(nextPage); + } + else if (paginaPrec != "") + { + logger.lg.scriviLog(string.Format("Reset {0} OK: redirect a pag {1}", action, paginaPrec), tipoLog.INFO); + Response.Redirect(nextPage); + } + else + { + logger.lg.scriviLog(string.Format("Reset {0} OK: redirect a pag {1}", action, "Default"), tipoLog.INFO); + Response.Redirect("Default"); + } + } + } +} \ No newline at end of file diff --git a/GPW_Smart/Reset.aspx.designer.cs b/GPW_Smart/Reset.aspx.designer.cs new file mode 100644 index 0000000..689e18a --- /dev/null +++ b/GPW_Smart/Reset.aspx.designer.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace GPW_Smart { + + + public partial class Reset { + + /// + /// Controllo form1. + /// + /// + /// 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.HtmlForm form1; + + /// + /// Controllo lblOut. + /// + /// + /// 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 lblOut; + } +} diff --git a/Jenkinsfile b/Jenkinsfile index f69a6b3..6e40932 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=4085']) { + withEnv(['NEXT_BUILD_NUMBER=4087']) { // env.versionNumber = VersionNumber(versionNumberString : '2.5.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '2.5.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'GPW'