Ok display site/tab x attuale versione allarmi

This commit is contained in:
Samuele Locatelli
2022-07-01 17:17:33 +02:00
parent b45e40c3f2
commit 0cf48e0f98
10 changed files with 122 additions and 22 deletions
+24 -3
View File
@@ -11,7 +11,7 @@ namespace MP_SITE.WebUserControls
/// <summary>
/// Oggetto datalayer specifico
/// </summary>
private DataLayer DataLayerObj = new DataLayer();
internal DataLayer DataLayerObj = new DataLayer();
#endregion Private Fields
@@ -65,7 +65,7 @@ namespace MP_SITE.WebUserControls
_resoconti = new resoconti();
if (!Page.IsPostBack)
{
aggiornamento();
doUpdate();
}
}
@@ -73,7 +73,7 @@ namespace MP_SITE.WebUserControls
#region Public Methods
public virtual void aggiornamento()
public virtual void doUpdate()
{
}
@@ -106,6 +106,27 @@ namespace MP_SITE.WebUserControls
return user_std.UtSn.TraduciEn(lemma);
}
/// <summary>
/// Conversione a bool del valore
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
public bool getBool(object value)
{
bool answ = false;
string rawVal = $"{value}".ToUpper();
// se è 1/0 --> len 1
if (rawVal.Length == 1)
{
answ = rawVal == "1" || rawVal == "S" || rawVal == "Y";
}
else
{
bool.TryParse($"{value}", out answ);
}
return answ;
}
#endregion Public Methods
}
}