Fix display errore licenza su footer

This commit is contained in:
Samuele Locatelli
2021-11-09 12:38:48 +01:00
parent 6c3869e511
commit c7b3bc7a2e
3 changed files with 89 additions and 50 deletions
+16 -12
View File
@@ -1,20 +1,24 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="cmp_footer.ascx.cs" Inherits="GPW_Admin.WebUserControls.cmp_footer" %>
<footer class="fixed-bottom bg-dark text-light textCondens">
<div class="row">
<div class="col-1"></div>
<footer class="fixed-bottom bg-dark text-light textCondens px-2">
<div class="row" runat="server" id="divFooter">
<div class="col-6 text-left">
<asp:Label ID="lblDateTime" runat="server" Text="..." />
&nbsp;|&nbsp;<asp:Label ID="lblCodOperatore" runat="server" Text="-" />
</div>
<div class="col-1 text-right">
<asp:UpdateProgress ID="UpdateProgressDisplay" runat="server">
<ProgressTemplate>
<i class="fa fa-circle-o-notch fa-spin" aria-hidden="true"></i>
</ProgressTemplate>
</asp:UpdateProgress>
</div>
<div class="col-3 text-left">
<asp:Label runat="server" ID="lblApp" Text="." />
<div class="col-6 text-right">
<div class="d-flex flex-row-reverse">
<div class="px-2">
<asp:Label runat="server" ID="lblCheckLic">Attenzione: problema di licenza, MR mode attivo! <i class="fa fa-exclamation-triangle" aria-hidden="true"></i></asp:Label>
<asp:Label runat="server" ID="lblApp" Text="." />
</div>
<div class="px-2">
<asp:UpdateProgress ID="UpdateProgressDisplay" runat="server">
<ProgressTemplate>
<i class="fa fa-circle-o-notch fa-spin" aria-hidden="true"></i>
</ProgressTemplate>
</asp:UpdateProgress>
</div>
</div>
</div>
</div>
<asp:Timer ID="Timer1" runat="server" Interval="10000" OnTick="Timer1_Tick">
+34 -17
View File
@@ -1,4 +1,5 @@
using SteamWare;
using GPW_data;
using SteamWare;
using System;
using System.Collections.Generic;
using System.Configuration;
@@ -19,23 +20,16 @@ namespace GPW_Admin.WebUserControls
lblCodOperatore.Text = $"{user_std.UtSn.CognomeNome} ({Page.User.Identity.Name})";
}
/// <summary>
/// imposta il tempo di scadenza del timer x il refresh della pagina (della parte top) per evitare che la sessione sul server scada
/// </summary>
private void setTimer()
private void setCss()
{
Timer1.Interval = SteamWare.memLayer.ML.confReadInt("intUpdatePagina_ms");
}
#endregion Private Methods
#region Protected Methods
protected void Page_Load(object sender, EventArgs e)
{
setLabel();
setTimer();
setClock();
divFooter.Attributes.Clear();
string cssClass = "row";
if (!licenzeGPW.checkPayload)
{
cssClass += " text-warning bg-danger";
}
lblCheckLic.Visible = !licenzeGPW.checkPayload;
divFooter.Attributes.Add("class", cssClass);
}
private void setLabel()
@@ -51,6 +45,29 @@ namespace GPW_Admin.WebUserControls
lblApp.Text = appInfo;
}
/// <summary>
/// imposta il tempo di scadenza del timer x il refresh della pagina (della parte top) per evitare che la sessione sul server scada
/// </summary>
private void setTimer()
{
Timer1.Interval = SteamWare.memLayer.ML.confReadInt("intUpdatePagina_ms");
}
#endregion Private Methods
#region Protected Methods
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
setCss();
setLabel();
}
setTimer();
setClock();
}
protected void Timer1_Tick(object sender, EventArgs e)
{
setClock();
+39 -21
View File
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
// <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 GPW_Admin.WebUserControls
@@ -15,47 +15,65 @@ namespace GPW_Admin.WebUserControls
{
/// <summary>
/// Controllo lblDateTime.
/// divFooter 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.HtmlGenericControl divFooter;
/// <summary>
/// lblDateTime control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblDateTime;
/// <summary>
/// Controllo lblCodOperatore.
/// lblCodOperatore 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.Label lblCodOperatore;
/// <summary>
/// Controllo UpdateProgressDisplay.
/// lblCheckLic 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.UpdateProgress UpdateProgressDisplay;
protected global::System.Web.UI.WebControls.Label lblCheckLic;
/// <summary>
/// Controllo lblApp.
/// lblApp 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.Label lblApp;
/// <summary>
/// Controllo Timer1.
/// UpdateProgressDisplay 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.UpdateProgress UpdateProgressDisplay;
/// <summary>
/// Timer1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.Timer Timer1;
}