diff --git a/GPW_Smart/BaseUserControl.cs b/GPW_Smart/BaseUserControl.cs new file mode 100644 index 0000000..42d5e18 --- /dev/null +++ b/GPW_Smart/BaseUserControl.cs @@ -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); + } + } + /// + /// idx dipendente loggato + /// + protected int IdxDipendente + { + get + { + int idx = 0; + try + { + idx = memLayer.ML.IntSessionObj("IdxDipendente"); + } + catch + { } + return idx; + } + set + { + memLayer.ML.setSessionVal("IdxDipendente", value.ToString()); + } + } + } +} \ No newline at end of file