Files
GPW/GPW_Commesse/WebUserControls/mod_menuBottomFullpage.ascx.cs
Samuele Locatelli c3bc2d1cea Commesse
Fix bootstrap5
2024-02-29 15:57:33 +01:00

80 lines
2.4 KiB
C#

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using SteamWare;
using GPW_data;
namespace GPW_Commesse.WebUserControls
{
public partial class mod_menuBottomFullpage : System.Web.UI.UserControl
{
#region Private Methods
private void setClock()
{
string postazione_IP = Request.UserHostName;
lblDateTime.Text = DateTime.Now.ToString("HH:mm:ss");
lblInfo.Text = "";
try
{
lblInfo.Text += string.Format("{0}", dnsUtils.DetermineCompName(postazione_IP));
}
catch
{ }
try
{
lblInfo.Text += string.Format(" ({0})", postazione_IP);
}
catch
{ }
}
/// <summary>
/// imposta il tempo di scadenza del timer x il refresh della pagina per refresh orario mostrato
/// </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)
{
// sistemo le stringhe...
lblApp.Text = string.Format("<b>{0}</b> v.{1}", ConfigurationManager.AppSettings.Get("appName"), System.Reflection.Assembly.GetExecutingAssembly().GetName().Version);
lblCopyRight.Text = string.Format("<b>{0}</b>", ConfigurationManager.AppSettings.Get("copyRight"));
}
setTimer();
setClock();
if (licenzeGPW.checkLicenze)
{
pnlCheck.CssClass = "btnVerdeGrad ui-corner-all shadowBox w-100";
}
else
{
pnlCheck.CssClass = "btnRossoGrad ui-corner-all shadowBox w-100";
lblWarning.Text = "Attenzione: numero licenze superato! MR attiva.";
lblWarning.Visible = true;
}
}
protected void Timer1_Tick(object sender, EventArgs e)
{
setClock();
}
#endregion Protected Methods
}
}