Aggiunta BaseUserControl x ereditarietà

This commit is contained in:
Samuele E. Locatelli
2020-09-02 21:20:22 +02:00
parent 9f71f88c3c
commit 3fd157fdf1
+119
View File
@@ -0,0 +1,119 @@
using GPW_data;
using GPW_Smart;
using SteamWare;
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace GPW_Smart
{
public class BaseUserControl : System.Web.UI.UserControl
{
public string hashEmail
{
get
{
return memLayer.ML.StringSessionObj("hashEmail");
}
}
public string email
{
get
{
return memLayer.ML.StringSessionObj("email");
}
}
public string cognomeNome
{
get
{
return memLayer.ML.StringSessionObj("cognomeNome");
}
}
public string IP
{
get
{
return Request.UserHostName;
}
}
public int numColEU
{
get
{
return memLayer.ML.IntSessionObj("numColEU");
}
set
{
memLayer.ML.setSessionVal("numColEU", value);
}
}
public int numRowTimb
{
get
{
return memLayer.ML.IntSessionObj("numRowTimb");
}
set
{
memLayer.ML.setSessionVal("numRowTimb", value);
}
}
public bool abilitaAll
{
get
{
bool answ = false;
try
{
string rawData = memLayer.ML.getRSV("abilitaAll");
bool.TryParse(rawData, out answ);
}
catch
{ }
return answ;
}
set
{
int ttlSec = value ? memLayer.ML.CRI("ttlAbilitaAll") : 0;
memLayer.ML.setRSV("abilitaAll", value.ToString(), ttlSec);
}
}
public string textSize
{
get
{
string answ=memLayer.ML.StringSessionObj("textSize");
if (string.IsNullOrEmpty(answ))
answ = "1.2em";
return answ;
}
set
{
memLayer.ML.setSessionVal("textSize", value);
}
}
/// <summary>
/// idx dipendente loggato
/// </summary>
protected int IdxDipendente
{
get
{
int idx = 0;
try
{
idx = memLayer.ML.IntSessionObj("IdxDipendente");
}
catch
{ }
return idx;
}
set
{
memLayer.ML.setSessionVal("IdxDipendente", value.ToString());
}
}
}
}