Update x redirect

This commit is contained in:
Samuele E. Locatelli
2019-10-12 08:18:36 +02:00
parent 89497037c4
commit 858e323384
5 changed files with 137 additions and 1 deletions
+8
View File
@@ -461,6 +461,7 @@
<Content Include="Properties\PublishProfiles\IIS02-ETS.pubxml.user" />
<Content Include="Properties\PublishProfiles\IIS02.pubxml.user" />
<Content Include="Properties\PublishProfiles\SPS.pubxml.user" />
<Content Include="Reset.aspx" />
<Content Include="Scripts\bootstrap.bundle.js" />
<Content Include="Scripts\bootstrap.bundle.min.js" />
<Content Include="Scripts\bootstrap.js" />
@@ -659,6 +660,13 @@
<Compile Include="regNewDevice.aspx.designer.cs">
<DependentUpon>regNewDevice.aspx</DependentUpon>
</Compile>
<Compile Include="Reset.aspx.cs">
<DependentUpon>Reset.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Reset.aspx.designer.cs">
<DependentUpon>Reset.aspx</DependentUpon>
</Compile>
<Compile Include="Site.Master.cs">
<DependentUpon>Site.Master</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
+18
View File
@@ -0,0 +1,18 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Reset.aspx.cs" Inherits="GPW_Smart.Reset" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h1>Reset applicativo</h1>
<asp:Label runat="server" ID="lblOut" />
</div>
</form>
</body>
</html>
+77
View File
@@ -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("<hr/>Reset Cache: {0} --> {1}</br>", 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("<hr/>Reset DB AppConf: {0} --> {1}</br>", 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("<hr/>Reset Redis: {0} --> {1}</br>", recPrev, recPost);
}
if (action.Contains("S"))
{
recPrev = Session.Count;
// reset dati in sessione...
Session.Clear();
recPost = Session.Count;
testo += string.Format("<hr/>Reset Sessione: {0} --> {1}</br>", recPrev, recPost);
}
if (action.Contains("V"))
{
recPrev = DataWrap.DW.numRecVoc;
// aggiorno vocabolario
DataWrap.DW.resetVocabolario();
recPost = DataWrap.DW.numRecVoc;
testo += string.Format("<hr/>Reset Vocabolario: {0} --> {1}</br>", 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");
}
}
}
}
+33
View File
@@ -0,0 +1,33 @@
//------------------------------------------------------------------------------
// <generato automaticamente>
// Codice generato da uno strumento.
//
// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se
// il codice viene rigenerato.
// </generato automaticamente>
//------------------------------------------------------------------------------
namespace GPW_Smart {
public partial class Reset {
/// <summary>
/// Controllo form1.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// Controllo lblOut.
/// </summary>
/// <remarks>
/// Campo generato automaticamente.
/// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblOut;
}
}
Vendored
+1 -1
View File
@@ -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'