56 lines
1.6 KiB
C#
56 lines
1.6 KiB
C#
using SteamWare;
|
|
using System;
|
|
using System.Configuration;
|
|
|
|
namespace NKC_WF.WebUserControls
|
|
{
|
|
public partial class cmp_footer : BaseUserControl, IDisposable
|
|
{
|
|
#region Private Methods
|
|
|
|
private void setClock()
|
|
{
|
|
lblDateTime.Text = DateTime.Now.ToString("ddd dd.MM.yyyy, HH:mm:ss");
|
|
lblCodOperatore.Text = $"{user_std.UtSn.CognomeNome} ({Page.User.Identity.Name})";
|
|
}
|
|
|
|
public override void Dispose()
|
|
{
|
|
Timer1.Tick -= Timer1_Tick;
|
|
Timer1.Dispose();
|
|
base.Dispose();
|
|
}
|
|
|
|
/// <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()
|
|
{
|
|
int intUpdatePagina_ms = memLayer.ML.CRI("intUpdatePagina_ms");
|
|
Timer1.Interval = 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);
|
|
setTimer();
|
|
setClock();
|
|
}
|
|
}
|
|
|
|
protected void Timer1_Tick(object sender, EventArgs e)
|
|
{
|
|
setClock();
|
|
raiseEvent();
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
}
|
|
} |