Merge branch 'release/TabReviewCookieExpiry'

This commit is contained in:
Samuele Locatelli
2021-09-09 16:09:16 +02:00
6 changed files with 145 additions and 121 deletions
+1 -1
View File
@@ -64,7 +64,7 @@
</ContentTemplate>
</asp:UpdatePanel>
<!-- /.container -->
<asp:UpdatePanel ID="uppFooter" runat="server">
<asp:UpdatePanel ID="uppFooter" runat="server" RenderMode="Block" UpdateMode="Conditional">
<ContentTemplate>
<uc1:mod_footer runat="server" ID="mod_footer" />
</ContentTemplate>
+59 -57
View File
@@ -1,122 +1,124 @@
//------------------------------------------------------------------------------
// <generato automaticamente>
// Codice generato da uno strumento.
// <auto-generated>
// 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.
// </generato automaticamente>
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebMasterPages {
public partial class Bootstrap {
namespace WebMasterPages
{
public partial class Bootstrap
{
/// <summary>
/// Controllo PlaceHolder1.
/// PlaceHolder1 control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder PlaceHolder1;
/// <summary>
/// Controllo BundleReference1.
/// BundleReference1 control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::Microsoft.AspNet.Web.Optimization.WebForms.BundleReference BundleReference1;
/// <summary>
/// Controllo BundleReference2.
/// BundleReference2 control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::Microsoft.AspNet.Web.Optimization.WebForms.BundleReference BundleReference2;
/// <summary>
/// Controllo HeadContent.
/// HeadContent control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::System.Web.UI.WebControls.ContentPlaceHolder HeadContent;
/// <summary>
/// Controllo form1.
/// form1 control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// Controllo ScriptManager1.
/// ScriptManager1 control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::System.Web.UI.ScriptManager ScriptManager1;
/// <summary>
/// Controllo mod_title.
/// mod_title control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::MoonProTablet.WebUserControls.mod_title mod_title;
/// <summary>
/// Controllo uppContainer.
/// uppContainer control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::System.Web.UI.UpdatePanel uppContainer;
/// <summary>
/// Controllo MainContent.
/// MainContent control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::System.Web.UI.WebControls.ContentPlaceHolder MainContent;
/// <summary>
/// Controllo uppFooter.
/// uppFooter control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::System.Web.UI.UpdatePanel uppFooter;
/// <summary>
/// Controllo mod_footer.
/// mod_footer control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::MoonProTablet.WebUserControls.mod_footer mod_footer;
/// <summary>
/// Controllo PlaceHolder2.
/// PlaceHolder2 control.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
protected global::System.Web.UI.WebControls.PlaceHolder PlaceHolder2;
}
+9 -7
View File
@@ -1,9 +1,11 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_footer.ascx.cs" Inherits="MoonProTablet.WebUserControls.mod_footer" %>
<footer class="navbar fixed-bottom navbar-dark bg-dark text-light p-0 px-2 m-0 bg-black " style="font-size: 1em; height: 1.5em;">
<div class="d-flex justify-content-start pl-1 text-left align-self-center small">
<strong><%: System.Web.Configuration.WebConfigurationManager.AppSettings["Environment"] %></strong> - v.<%: currVersion.ToString() %> [ <%: videoSize %> ]
</div>
<div class="d-flex justify-content-end pr-1 text-right align-self-center small">
<img src="./images/logoSteamware.png" height="20" /> Steamware&nbsp;&copy; <%: DateTime.Now.Year %>
</div>
</footer>
<div class="d-flex justify-content-start pl-1 text-left align-self-center small">
<strong><%: System.Web.Configuration.WebConfigurationManager.AppSettings["Environment"] %></strong> - v.<%: currVersion.ToString() %> [ <%: videoSize %> ] | <%: DateTime.Now %>
</div>
<div class="d-flex justify-content-end pr-1 text-right align-self-center small">
<img src="./images/logoSteamware.png" height="20" />
Steamware&nbsp;&copy; <%: DateTime.Now.Year %>
</div>
</footer>
+25 -10
View File
@@ -4,13 +4,8 @@ namespace MoonProTablet.WebUserControls
{
public partial class mod_footer : BaseUserControl
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
updateLabels();
}
}
#region Public Properties
/// <summary>
/// Versione corrente sw
/// </summary>
@@ -21,9 +16,7 @@ namespace MoonProTablet.WebUserControls
return System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
}
}
private void updateLabels()
{
}
/// <summary>
/// Dimensione schermata video attuale
/// </summary>
@@ -39,5 +32,27 @@ namespace MoonProTablet.WebUserControls
return answ;
}
}
#endregion Public Properties
#region Private Methods
private void updateLabels()
{
}
#endregion Private Methods
#region Protected Methods
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
updateLabels();
}
}
#endregion Protected Methods
}
}
+11 -9
View File
@@ -1,15 +1,17 @@
//------------------------------------------------------------------------------
// <generato automaticamente>
// Codice generato da uno strumento.
// <auto-generated>
// 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.
// </generato automaticamente>
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace MoonProTablet.WebUserControls {
public partial class mod_footer {
namespace MoonProTablet.WebUserControls
{
public partial class mod_footer
{
}
}
+40 -37
View File
@@ -162,42 +162,6 @@ namespace MapoDb
}
}
/// <summary>
/// Dati deroga SchedaTecnica serializzati in REDIS (get/set)
/// </summary>
public StCheckOverride getDerogaSt(int idxST)
{
StCheckOverride answ = new StCheckOverride() { IdxST = idxST };
string keyDerogaST = memLayer.ML.redHash($"DerogaSt:{user_std.UtSn.utente}:{idxST:000}");
string rawData = memLayer.ML.getRSV(keyDerogaST);
if (!string.IsNullOrEmpty(rawData))
{
try
{
answ = JsonConvert.DeserializeObject<StCheckOverride>(rawData);
}
catch
{ }
}
return answ;
}
public bool setDerogaSt(StCheckOverride deroga)
{
bool fatto = false;
try
{
string keyDerogaST = memLayer.ML.redHash($"DerogaSt:{user_std.UtSn.utente}:{deroga.IdxST:000}");
string rawData = JsonConvert.SerializeObject(deroga);
memLayer.ML.setRSV(keyDerogaST, rawData, 60*2);
fatto = true;
}
catch
{ }
return fatto;
}
/// <summary>
/// MatrOpr in sessione
/// </summary>
@@ -1707,7 +1671,11 @@ namespace MapoDb
UsrName = memLayer.ML.CRS("user");
}
string cookieName = memLayer.ML.CRS("cookieName");
DateTime expDate = DateTime.Now.AddDays(memLayer.ML.CRI("cookieDayExpire"));
//DateTime expDate = DateTime.Now.AddDays(memLayer.ML.CRI("cookieDayExpire"));
string cookieDayExpire = memLayer.ML.CRS("cookieDayExpire");
double dayExp = 1;
double.TryParse(cookieDayExpire, out dayExp);
DateTime expDate = DateTime.Now.AddDays(dayExp);
string Secret = authProxy.getSecret(Dominio, UsrName, matricola, DeviceName, adesso);
string devSecret = SteamCrypto.EncryptString(Secret, cookieName);
try
@@ -1817,6 +1785,26 @@ namespace MapoDb
return answ;
}
/// <summary>
/// Dati deroga SchedaTecnica serializzati in REDIS (get/set)
/// </summary>
public StCheckOverride getDerogaSt(int idxST)
{
StCheckOverride answ = new StCheckOverride() { IdxST = idxST };
string keyDerogaST = memLayer.ML.redHash($"DerogaSt:{user_std.UtSn.utente}:{idxST:000}");
string rawData = memLayer.ML.getRSV(keyDerogaST);
if (!string.IsNullOrEmpty(rawData))
{
try
{
answ = JsonConvert.DeserializeObject<StCheckOverride>(rawData);
}
catch
{ }
}
return answ;
}
/// <summary>
/// restituisce una tabella con tutte le transizioni degli ingressi per una data macchina
/// </summary>
@@ -3515,6 +3503,21 @@ namespace MapoDb
return answ;
}
public bool setDerogaSt(StCheckOverride deroga)
{
bool fatto = false;
try
{
string keyDerogaST = memLayer.ML.redHash($"DerogaSt:{user_std.UtSn.utente}:{deroga.IdxST:000}");
string rawData = JsonConvert.SerializeObject(deroga);
memLayer.ML.setRSV(keyDerogaST, rawData, 60 * 2);
fatto = true;
}
catch
{ }
return fatto;
}
/// <summary>
/// Salvataggio su della mappa di memoria dell'IOB x ulteriori impieghi
/// </summary>