diff --git a/MP-TAB/About.aspx.cs b/MP-TAB/About.aspx.cs
index 19000aa3..e419e816 100644
--- a/MP-TAB/About.aspx.cs
+++ b/MP-TAB/About.aspx.cs
@@ -10,324 +10,319 @@ using Microsoft.VisualBasic.Devices;
namespace MoonProTablet
{
- public partial class About : System.Web.UI.Page
- {
- protected Assembly assembly = Assembly.GetExecutingAssembly();
- protected void Page_Load(object sender, EventArgs e)
+ public partial class About : BasePage
{
- if (!Page.IsPostBack)
- {
- // faccio reset... sessioni e vocabolario..
- doReset();
- }
- }
-
- private void doReset()
- {
- string action = memLayer.ML.QSS("Action");
- string testo = "
Reset Actions
";
- long recPrev = 0;
- long recPost = 0;
- if (action != "")
- {
- if (action.Contains("C"))
+ protected Assembly assembly = Assembly.GetExecutingAssembly();
+ protected void Page_Load(object sender, EventArgs e)
{
- recPrev = Cache.Count;
- // reset dati in cache...
- memLayer.ML.flushRegisteredCache();
- recPost = Cache.Count;
- testo += string.Format("Reset Cache: {0} --> {1}", recPrev, recPost);
- }
- if (action.Contains("D"))
- {
- recPrev = memLayer.ML.numRecAppConf;
- // reset dati in cache x DbConfig...
- memLayer.ML.resetAppConf();
- recPost = memLayer.ML.numRecAppConf;
- testo += string.Format("Reset DB AppConf: {0} --> {1}", recPrev, recPost);
- }
- if (action.Contains("R"))
- {
- recPrev = memLayer.ML.numRecRedis;
- // reset dati in cache x DbConfig...
- memLayer.ML.redFlushKey("**");
- recPost = memLayer.ML.numRecRedis;
- testo += string.Format("Reset Redis: {0} --> {1}", recPrev, recPost);
- }
- if (action.Contains("S"))
- {
- recPrev = Session.Count;
- // reset dati in sessione...
- Session.Clear();
- recPost = Session.Count;
- testo += string.Format("Reset Sessione: {0} --> {1}", recPrev, recPost);
- }
- if (action.Contains("V"))
- {
- recPrev = DataWrap.DW.numRecVoc;
- // aggiorno vocabolario
- DataWrap.DW.resetVocabolario();
- recPost = DataWrap.DW.numRecVoc;
- testo += string.Format("Reset Vocabolario: {0} --> {1}", recPrev, recPost);
- }
- }
- lblOut.Text = testo;
- }
- ///
- /// Restitusice l'elenco pareto (decrescente) delle dimensioni FINESTRA browser registrate
- ///
- public string paretoBrowserSize
- {
- get
- {
- StringBuilder sb = new StringBuilder();
- string redHash = memLayer.ML.redHash("COUNT:wh:*");
- int numRec = memLayer.ML.redCountKey(redHash);
- List> kvp = memLayer.ML.redGetCounterByKey(redHash, memLayer.kvpOrderBy.ValDesc);
- // riordino elenco
-
- sb.AppendLine(string.Format("Trovate {0} combinazioni", numRec));
- foreach (var item in kvp)
- {
- sb.AppendLine(string.Format("{0}: {1}", item.Key.Replace(memLayer.ML.redHash("COUNT:wh:"), ""), item.Value));
- }
- return sb.ToString();
- }
- }
- ///
- /// Restitusice l'elenco pareto (decrescente) delle dimensioni SCHERMO registrate
- ///
- public string paretoScreenSize
- {
- get
- {
- StringBuilder sb = new StringBuilder();
- string redHash = memLayer.ML.redHash("COUNT:scr:*");
- int numRec = memLayer.ML.redCountKey(redHash);
- List> kvp = memLayer.ML.redGetCounterByKey(redHash, memLayer.kvpOrderBy.ValDesc);
- // riordino elenco
-
- sb.AppendLine(string.Format("Trovate {0} combinazioni", numRec));
- foreach (var item in kvp)
- {
- sb.AppendLine(string.Format("{0}: {1}", item.Key.Replace(memLayer.ML.redHash("COUNT:scr:"), ""), item.Value));
- }
- return sb.ToString();
- }
- }
- ///
- /// Restitusice l'elenco pareto (decrescente) delle dimensioni FINESTRA browser + PIXEL ratio registrate
- ///
- public string paretoWinPixRat
- {
- get
- {
- StringBuilder sb = new StringBuilder();
- string redHash = memLayer.ML.redHash("COUNT:wpr:*");
- int numRec = memLayer.ML.redCountKey(redHash);
- List> kvp = memLayer.ML.redGetCounterByKey(redHash, memLayer.kvpOrderBy.ValDesc);
- // riordino elenco
-
- sb.AppendLine(string.Format("Trovate {0} combinazioni", numRec));
- foreach (var item in kvp)
- {
- sb.AppendLine(string.Format("{0}: {1}", item.Key.Replace(memLayer.ML.redHash("COUNT:wpr:"), ""), item.Value));
- }
- return sb.ToString();
- }
- }
- ///
- /// Formatta un numero da int a size in Kb/Mb/Gb/Tb
- ///
- ///
- ///
- public string memFormat(double rawSize)
- {
- string[] sizes = { "B", "KB", "MB", "GB", "TB" };
- int order = 0;
- while (rawSize >= 1024 && order < sizes.Length - 1)
- {
- order++;
- rawSize = rawSize / 1024;
- }
-
- // Adjust the format string to your preferences. For example "{0:0.#}{1}" would
- // show a single decimal place, and no space.
- return String.Format("{0:0.##} {1}", rawSize, sizes[order]);
- }
- ///
- /// Dati sui server redis...
- ///
- public string redisServersData
- {
- get
- {
- StringBuilder sb = new StringBuilder();
- try
- {
- var servData = memLayer.ML.redServInfo();
- foreach (var item in servData)
- {
- sb.AppendLine(string.Format("Server: {0} | {1} | {2}", item, item.Version, item.ServerType));
- // da completare con altre info?!?
- var srvInfo = item.Info();
- // esporto un pò di info x gruppo...
- foreach (IGrouping> capitolo in srvInfo)
+ if (!Page.IsPostBack)
{
- sb.AppendLine("----------------------------------------------");
- sb.AppendLine(string.Format("Capitolo: {0}", capitolo.Key));
- sb.AppendLine("----------------------------------------------");
- foreach (var kvp in capitolo)
- {
- sb.AppendLine(string.Format("{0}:{1}", kvp.Key, kvp.Value));
- }
-
- sb.AppendLine();
+ // faccio reset... sessioni e vocabolario..
+ doReset();
}
- }
}
- catch (Exception exc)
- {
- logger.lg.scriviLog(string.Format("Errore in redisServersData{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
- }
- return sb.ToString();
- }
- }
- ///
- /// Stringa timing
- ///
- ///
- ///
- public string ToDateString(TimeSpan time)
- {
- return string.Format("{0}gg, {1:00}:{2:00}:{3:00} (h:m:s)", time.Days, time.Hours, time.Minutes, time.Seconds);
- }
- ///
- /// Statistiche server
- ///
- public string ServerStats
- {
- get
- {
- StringBuilder sb = new StringBuilder();
- try
- {
- // calcoli preliminari
- TimeSpan uptime;
- using (var uptimeCounter = new PerformanceCounter("System", "System Up Time"))
- {
- uptimeCounter.NextValue();
- uptime = TimeSpan.FromSeconds(uptimeCounter.NextValue());
- }
- var computer = new ComputerInfo();
- // compongo output
- sb.AppendLine(string.Format("NAME: {0}", Environment.MachineName));
- sb.AppendLine(Environment.OSVersion.VersionString);
- sb.AppendLine(string.Format("OS 64bit: {0} | PROC 64bit: {1}", Environment.Is64BitOperatingSystem, Environment.Is64BitProcess));
- sb.AppendLine(string.Format("SYS UPTIME: {0}", ToDateString(uptime)));
- sb.AppendLine(string.Format("CPU: {0}", Environment.ProcessorCount));
- sb.AppendLine(string.Format("RAM: {0}", memFormat(computer.TotalPhysicalMemory)));
- sb.AppendLine(string.Format("Virtual Memory: {0}", memFormat(computer.TotalVirtualMemory)));
- sb.AppendLine(string.Format("Available RAM: {0}", memFormat(computer.AvailablePhysicalMemory)));
- sb.AppendLine(string.Format("Available Virtual Memory: {0}", memFormat(computer.AvailableVirtualMemory)));
- sb.AppendLine(string.Format("DIR: {0}", Environment.CurrentDirectory));
- sb.AppendLine(string.Format("USER: {0} | USER: {1}", Environment.UserDomainName, Environment.UserName));
- }
- catch (Exception exc)
+ private void doReset()
{
- logger.lg.scriviLog(string.Format("Errore in ServerStats{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
+ string action = memLayer.ML.QSS("Action");
+ string testo = "Reset Actions
";
+ long recPrev = 0;
+ long recPost = 0;
+ if (action != "")
+ {
+ if (action.Contains("C"))
+ {
+ recPrev = Cache.Count;
+ // reset dati in cache...
+ memLayer.ML.flushRegisteredCache();
+ recPost = Cache.Count;
+ testo += string.Format("Reset Cache: {0} --> {1}", recPrev, recPost);
+ }
+ if (action.Contains("D"))
+ {
+ recPrev = memLayer.ML.numRecAppConf;
+ // reset dati in cache x DbConfig...
+ memLayer.ML.resetAppConf();
+ recPost = memLayer.ML.numRecAppConf;
+ testo += string.Format("Reset DB AppConf: {0} --> {1}", recPrev, recPost);
+ }
+ if (action.Contains("R"))
+ {
+ recPrev = memLayer.ML.numRecRedis;
+ // reset dati in cache x DbConfig...
+ memLayer.ML.redFlushKey("**");
+ recPost = memLayer.ML.numRecRedis;
+ testo += string.Format("Reset Redis: {0} --> {1}", recPrev, recPost);
+ }
+ if (action.Contains("S"))
+ {
+ recPrev = Session.Count;
+ // reset dati in sessione...
+ Session.Clear();
+ recPost = Session.Count;
+ testo += string.Format("Reset Sessione: {0} --> {1}", recPrev, recPost);
+ }
+ if (action.Contains("V"))
+ {
+ recPrev = DataWrap.DW.numRecVoc;
+ // aggiorno vocabolario
+ DataWrap.DW.resetVocabolario();
+ recPost = DataWrap.DW.numRecVoc;
+ testo += string.Format("Reset Vocabolario: {0} --> {1}", recPrev, recPost);
+ }
+ }
+ lblOut.Text = testo;
}
- return sb.ToString();
- }
- }
- public string IISStats
- {
- get
- {
- StringBuilder sb = new StringBuilder();
- using (var iis = Process.GetCurrentProcess())
+ ///
+ /// Restitusice l'elenco pareto (decrescente) delle dimensioni FINESTRA browser registrate
+ ///
+ public string paretoBrowserSize
{
- //Process iis = Process.GetCurrentProcess();
- sb.AppendLine(string.Format("UPTIME: {0}", ToDateString(DateTime.Now - iis.StartTime)));
- sb.AppendLine(string.Format("Priority: {0}", iis.PriorityClass));
- sb.AppendLine(string.Format("Physical Memory Used: {0}", memFormat(iis.WorkingSet64)));
- sb.AppendLine(string.Format("Virtual Memory Used: {0}", memFormat(iis.VirtualMemorySize64)));
- }
- return sb.ToString();
- }
- }
- public string mainAssembly
- {
- get
- {
- string answ = "";
- try
- {
- answ = assembly.FullName;
- }
- catch
- { }
- return answ;
- }
- }
- public string runtimeImg
- {
- get
- {
- string answ = "";
- try
- {
- answ = assembly.ImageRuntimeVersion;
- }
- catch
- { }
- return answ;
- }
- }
- public string librariesVers
- {
- get
- {
- string answ = "";
- try
- {
- AssemblyName[] referencedAssemblyNames = assembly.GetReferencedAssemblies();
- foreach (AssemblyName referencedAssemblyName in referencedAssemblyNames.OrderBy(n => n.Name))
- {
- answ += referencedAssemblyName.FullName + Environment.NewLine;
- }
- }
- catch
- { }
- return answ;
- }
- }
- ///
- /// Num di librerie inserite
- ///
- public int numLibraries
- {
- get
- {
- int numLib = 0; ;
- try
- {
- AssemblyName[] referencedAssemblyNames = assembly.GetReferencedAssemblies();
- foreach (AssemblyName referencedAssemblyName in referencedAssemblyNames.OrderBy(n => n.Name))
- {
- numLib++;
- }
- }
- catch
- { }
- return numLib;
- }
- }
+ get
+ {
+ StringBuilder sb = new StringBuilder();
+ string redHash = memLayer.ML.redHash("COUNT:wh:*");
+ int numRec = memLayer.ML.redCountKey(redHash);
+ List> kvp = memLayer.ML.redGetCounterByKey(redHash, memLayer.kvpOrderBy.ValDesc);
+ // riordino elenco
+ sb.AppendLine(string.Format("Trovate {0} combinazioni", numRec));
+ foreach (var item in kvp)
+ {
+ sb.AppendLine(string.Format("{0}: {1}", item.Key.Replace(memLayer.ML.redHash("COUNT:wh:"), ""), item.Value));
+ }
+ return sb.ToString();
+ }
+ }
+ ///
+ /// Restitusice l'elenco pareto (decrescente) delle dimensioni SCHERMO registrate
+ ///
+ public string paretoScreenSize
+ {
+ get
+ {
+ StringBuilder sb = new StringBuilder();
+ string redHash = memLayer.ML.redHash("COUNT:scr:*");
+ int numRec = memLayer.ML.redCountKey(redHash);
+ List> kvp = memLayer.ML.redGetCounterByKey(redHash, memLayer.kvpOrderBy.ValDesc);
+ // riordino elenco
+ sb.AppendLine(string.Format("Trovate {0} combinazioni", numRec));
+ foreach (var item in kvp)
+ {
+ sb.AppendLine(string.Format("{0}: {1}", item.Key.Replace(memLayer.ML.redHash("COUNT:scr:"), ""), item.Value));
+ }
+ return sb.ToString();
+ }
+ }
+ ///
+ /// Restitusice l'elenco pareto (decrescente) delle dimensioni FINESTRA browser + PIXEL ratio registrate
+ ///
+ public string paretoWinPixRat
+ {
+ get
+ {
+ StringBuilder sb = new StringBuilder();
+ string redHash = memLayer.ML.redHash("COUNT:wpr:*");
+ int numRec = memLayer.ML.redCountKey(redHash);
+ List> kvp = memLayer.ML.redGetCounterByKey(redHash, memLayer.kvpOrderBy.ValDesc);
+ // riordino elenco
+ sb.AppendLine(string.Format("Trovate {0} combinazioni", numRec));
+ foreach (var item in kvp)
+ {
+ sb.AppendLine(string.Format("{0}: {1}", item.Key.Replace(memLayer.ML.redHash("COUNT:wpr:"), ""), item.Value));
+ }
+ return sb.ToString();
+ }
+ }
+ ///
+ /// Formatta un numero da int a size in Kb/Mb/Gb/Tb
+ ///
+ ///
+ ///
+ public string memFormat(double rawSize)
+ {
+ string[] sizes = { "B", "KB", "MB", "GB", "TB" };
+ int order = 0;
+ while (rawSize >= 1024 && order < sizes.Length - 1)
+ {
+ order++;
+ rawSize = rawSize / 1024;
+ }
+ // Adjust the format string to your preferences. For example "{0:0.#}{1}" would
+ // show a single decimal place, and no space.
+ return String.Format("{0:0.##} {1}", rawSize, sizes[order]);
+ }
+ ///
+ /// Dati sui server redis...
+ ///
+ public string redisServersData
+ {
+ get
+ {
+ StringBuilder sb = new StringBuilder();
+ try
+ {
+ var servData = memLayer.ML.redServInfo();
+ foreach (var item in servData)
+ {
+ sb.AppendLine(string.Format("Server: {0} | {1} | {2}", item, item.Version, item.ServerType));
+ // da completare con altre info?!?
+ var srvInfo = item.Info();
+ // esporto un pò di info x gruppo...
+ foreach (IGrouping> capitolo in srvInfo)
+ {
+ sb.AppendLine("----------------------------------------------");
+ sb.AppendLine(string.Format("Capitolo: {0}", capitolo.Key));
+ sb.AppendLine("----------------------------------------------");
+ foreach (var kvp in capitolo)
+ {
+ sb.AppendLine(string.Format("{0}:{1}", kvp.Key, kvp.Value));
+ }
- }
+ sb.AppendLine();
+ }
+ }
+ }
+ catch (Exception exc)
+ {
+ logger.lg.scriviLog(string.Format("Errore in redisServersData{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
+ }
+ return sb.ToString();
+ }
+ }
+ ///
+ /// Stringa timing
+ ///
+ ///
+ ///
+ public string ToDateString(TimeSpan time)
+ {
+ return string.Format("{0}gg, {1:00}:{2:00}:{3:00} (h:m:s)", time.Days, time.Hours, time.Minutes, time.Seconds);
+ }
+ ///
+ /// Statistiche server
+ ///
+ public string ServerStats
+ {
+ get
+ {
+ StringBuilder sb = new StringBuilder();
+ try
+ {
+ // calcoli preliminari
+ TimeSpan uptime;
+ using (var uptimeCounter = new PerformanceCounter("System", "System Up Time"))
+ {
+ uptimeCounter.NextValue();
+ uptime = TimeSpan.FromSeconds(uptimeCounter.NextValue());
+ }
+ var computer = new ComputerInfo();
+
+ // compongo output
+ sb.AppendLine(string.Format("NAME: {0}", Environment.MachineName));
+ sb.AppendLine(Environment.OSVersion.VersionString);
+ sb.AppendLine(string.Format("OS 64bit: {0} | PROC 64bit: {1}", Environment.Is64BitOperatingSystem, Environment.Is64BitProcess));
+ sb.AppendLine(string.Format("SYS UPTIME: {0}", ToDateString(uptime)));
+ sb.AppendLine(string.Format("CPU: {0}", Environment.ProcessorCount));
+ sb.AppendLine(string.Format("RAM: {0}", memFormat(computer.TotalPhysicalMemory)));
+ sb.AppendLine(string.Format("Virtual Memory: {0}", memFormat(computer.TotalVirtualMemory)));
+ sb.AppendLine(string.Format("Available RAM: {0}", memFormat(computer.AvailablePhysicalMemory)));
+ sb.AppendLine(string.Format("Available Virtual Memory: {0}", memFormat(computer.AvailableVirtualMemory)));
+ sb.AppendLine(string.Format("DIR: {0}", Environment.CurrentDirectory));
+ sb.AppendLine(string.Format("USER: {0} | USER: {1}", Environment.UserDomainName, Environment.UserName));
+ }
+ catch (Exception exc)
+ {
+ logger.lg.scriviLog(string.Format("Errore in ServerStats{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
+ }
+ return sb.ToString();
+ }
+ }
+ public string IISStats
+ {
+ get
+ {
+ StringBuilder sb = new StringBuilder();
+ using (var iis = Process.GetCurrentProcess())
+ {
+ //Process iis = Process.GetCurrentProcess();
+ sb.AppendLine(string.Format("UPTIME: {0}", ToDateString(DateTime.Now - iis.StartTime)));
+ sb.AppendLine(string.Format("Priority: {0}", iis.PriorityClass));
+ sb.AppendLine(string.Format("Physical Memory Used: {0}", memFormat(iis.WorkingSet64)));
+ sb.AppendLine(string.Format("Virtual Memory Used: {0}", memFormat(iis.VirtualMemorySize64)));
+ }
+ return sb.ToString();
+ }
+ }
+ public string mainAssembly
+ {
+ get
+ {
+ string answ = "";
+ try
+ {
+ answ = assembly.FullName;
+ }
+ catch
+ { }
+ return answ;
+ }
+ }
+ public string runtimeImg
+ {
+ get
+ {
+ string answ = "";
+ try
+ {
+ answ = assembly.ImageRuntimeVersion;
+ }
+ catch
+ { }
+ return answ;
+ }
+ }
+ public string librariesVers
+ {
+ get
+ {
+ string answ = "";
+ try
+ {
+ AssemblyName[] referencedAssemblyNames = assembly.GetReferencedAssemblies();
+ foreach (AssemblyName referencedAssemblyName in referencedAssemblyNames.OrderBy(n => n.Name))
+ {
+ answ += referencedAssemblyName.FullName + Environment.NewLine;
+ }
+ }
+ catch
+ { }
+ return answ;
+ }
+ }
+ ///
+ /// Num di librerie inserite
+ ///
+ public int numLibraries
+ {
+ get
+ {
+ int numLib = 0; ;
+ try
+ {
+ AssemblyName[] referencedAssemblyNames = assembly.GetReferencedAssemblies();
+ foreach (AssemblyName referencedAssemblyName in referencedAssemblyNames.OrderBy(n => n.Name))
+ {
+ numLib++;
+ }
+ }
+ catch
+ { }
+ return numLib;
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/MP-TAB/BasePage.cs b/MP-TAB/BasePage.cs
new file mode 100644
index 00000000..9e4c150c
--- /dev/null
+++ b/MP-TAB/BasePage.cs
@@ -0,0 +1,119 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using MapoDb;
+using SteamWare;
+
+namespace MoonProTablet
+{
+ public class BasePage : UserPage
+ {
+ ///
+ /// Oggetto datalayer specifico
+ ///
+ internal DataLayer DataLayerObj = new DataLayer();
+
+
+ ///
+ /// idx macchina selezionata
+ ///
+ public string idxMacchina
+ {
+ get
+ {
+ return memLayer.ML.StringSessionObj("IdxMacchina");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("IdxMacchina", value);
+ }
+ }
+ ///
+ /// Sotto sistema (macchina) selezionato
+ ///
+ public string subMaccSel
+ {
+ get
+ {
+ return memLayer.ML.StringSessionObj("subMaccSel");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("subMaccSel", value);
+ }
+ }
+ ///
+ /// Verifica se la macchina MAIN sia MULTI (da DatiMacchina / redis...)
+ ///
+ protected bool isMulti
+ {
+ get
+ {
+ bool answ = false;
+ answ = DataLayerObj.isMulti(idxMacchina);
+ return answ;
+ }
+ }
+ ///
+ /// idxODL corrente
+ ///
+ public int idxODL
+ {
+ get
+ {
+ return memLayer.ML.IntSessionObj("idxODL");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("idxODL", value);
+ }
+ }
+
+ ///
+ /// Verifica (su tab config) se sia abilitata la gestione flusso RPO (Richieste - Promesse - ODL)
+ ///
+ protected bool enableRPO
+ {
+ get
+ {
+ return memLayer.ML.cdvb("enableRPO");
+ }
+ }
+ ///
+ /// Prox pagina da aprire
+ ///
+ protected string _nextPage
+ {
+ get
+ {
+ string pagina = memLayer.ML.StringSessionObj("nextPage");
+ if (string.IsNullOrEmpty(pagina))
+ {
+ pagina = "menu.aspx";
+ }
+ return pagina;
+ }
+ }
+
+ ///
+ /// effettua traduzione del lemma
+ ///
+ ///
+ ///
+ public string traduci(string lemma)
+ {
+ return user_std.UtSn.Traduci(lemma);
+ }
+
+ ///
+ /// effettua traduzione in inglese del lemma
+ ///
+ ///
+ ///
+ public string traduciEn(string lemma)
+ {
+ return user_std.UtSn.TraduciEn(lemma);
+ }
+ }
+}
\ No newline at end of file
diff --git a/MP-TAB/Commenti.aspx.cs b/MP-TAB/Commenti.aspx.cs
index e1f77c4d..a7a5ef71 100644
--- a/MP-TAB/Commenti.aspx.cs
+++ b/MP-TAB/Commenti.aspx.cs
@@ -3,70 +3,67 @@ using System;
namespace MoonProTablet
{
- public partial class Commenti : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
+ public partial class Commenti : BasePage
{
- Session["TipoLink"] = "EditMacch";
- //mod_commenti1.eh_newVal += mod_commenti1_eh_newVal;
- //mod_commenti1.eh_reset += mod_commenti1_eh_reset;
- //mod_dichiarazione1.eh_newVal += mod_dichiarazione1_eh_newVal;
- mod_insComm1.eh_newVal += mod_insComm1_eh_newVal;
- mod_insComm1.eh_reset += mod_insComm1_eh_reset;
- mod_insComm1.eh_inserting += mod_insComm1_eh_inserting;
- mod_commenti1.eh_reqEdit += mod_commenti1_eh_reqEdit;
- mod_fermate1.eh_reqEdit += mod_fermate1_eh_reqEdit;
- }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ Session["TipoLink"] = "EditMacch";
+ mod_insComm1.eh_newVal += mod_insComm1_eh_newVal;
+ mod_insComm1.eh_reset += mod_insComm1_eh_reset;
+ mod_insComm1.eh_inserting += mod_insComm1_eh_inserting;
+ mod_commenti1.eh_reqEdit += mod_commenti1_eh_reqEdit;
+ mod_fermate1.eh_reqEdit += mod_fermate1_eh_reqEdit;
+ }
- void mod_fermate1_eh_reqEdit(object sender, EventArgs e)
- {
- // avendo in sessione inizio fermata DEVO andare a pagina DichFermi, in modalità "ritroso", precompilare data/ora ed eventuale descizione...
- Response.Redirect("Fermate.aspx");
- }
+ void mod_fermate1_eh_reqEdit(object sender, EventArgs e)
+ {
+ // avendo in sessione inizio fermata DEVO andare a pagina DichFermi, in modalità "ritroso", precompilare data/ora ed eventuale descizione...
+ Response.Redirect("Fermate.aspx");
+ }
- void mod_insComm1_eh_inserting(object sender, EventArgs e)
- {
- }
+ void mod_insComm1_eh_inserting(object sender, EventArgs e)
+ {
+ }
- void mod_commenti1_eh_reqEdit(object sender, EventArgs e)
- {
- mod_insComm1.caricaCommento();
- }
+ void mod_commenti1_eh_reqEdit(object sender, EventArgs e)
+ {
+ mod_insComm1.caricaCommento();
+ }
- void mod_insComm1_eh_reset(object sender, EventArgs e)
- {
- showPnlDichiaraz(false);
- mod_commenti1.doUpdate();
- }
+ void mod_insComm1_eh_reset(object sender, EventArgs e)
+ {
+ showPnlDichiaraz(false);
+ mod_commenti1.doUpdate();
+ }
- void mod_insComm1_eh_newVal(object sender, EventArgs e)
- {
- mod_commenti1.doUpdate();
- }
+ void mod_insComm1_eh_newVal(object sender, EventArgs e)
+ {
+ mod_commenti1.doUpdate();
+ }
- void mod_dichiarazione1_eh_newVal(object sender, EventArgs e)
- {
- // ricarico tutto!
- Response.Redirect("Commenti.aspx");
- }
+ void mod_dichiarazione1_eh_newVal(object sender, EventArgs e)
+ {
+ // ricarico tutto!
+ Response.Redirect("Commenti.aspx");
+ }
- void mod_commenti1_eh_reset(object sender, EventArgs e)
- {
- showPnlDichiaraz(false);
- }
- ///
- /// richiesta ins nuovo evento...
- ///
- ///
- ///
- void mod_commenti1_eh_newVal(object sender, EventArgs e)
- {
- showPnlDichiaraz(true);
- }
+ void mod_commenti1_eh_reset(object sender, EventArgs e)
+ {
+ showPnlDichiaraz(false);
+ }
+ ///
+ /// richiesta ins nuovo evento...
+ ///
+ ///
+ ///
+ void mod_commenti1_eh_newVal(object sender, EventArgs e)
+ {
+ showPnlDichiaraz(true);
+ }
- private void showPnlDichiaraz(bool showDich)
- {
- pnlEventi.Visible = !showDich;
+ private void showPnlDichiaraz(bool showDich)
+ {
+ pnlEventi.Visible = !showDich;
+ }
}
- }
}
\ No newline at end of file
diff --git a/MP-TAB/Controlli.aspx.cs b/MP-TAB/Controlli.aspx.cs
index 421673dc..95ef97d2 100644
--- a/MP-TAB/Controlli.aspx.cs
+++ b/MP-TAB/Controlli.aspx.cs
@@ -8,23 +8,23 @@ using SteamWare;
namespace MoonProTablet
{
- public partial class Controlli : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
+ public partial class Controlli : BasePage
{
- mod_controlliProd.eh_newVal += Mod_controlliProd_eh_newVal;
- mod_controlliProd.eh_reset += Mod_controlliProd_eh_reset;
- }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ mod_controlliProd.eh_newVal += Mod_controlliProd_eh_newVal;
+ mod_controlliProd.eh_reset += Mod_controlliProd_eh_reset;
+ }
- private void Mod_controlliProd_eh_reset(object sender, EventArgs e)
- {
- mod_elencoControlli.doUpdate();
- }
+ private void Mod_controlliProd_eh_reset(object sender, EventArgs e)
+ {
+ mod_elencoControlli.doUpdate();
+ }
- private void Mod_controlliProd_eh_newVal(object sender, EventArgs e)
- {
- // ricarica pagina...
- Response.Redirect(devicesAuthProxy.pagCorrente);
+ private void Mod_controlliProd_eh_newVal(object sender, EventArgs e)
+ {
+ // ricarica pagina...
+ Response.Redirect(devicesAuthProxy.pagCorrente);
+ }
}
- }
}
\ No newline at end of file
diff --git a/MP-TAB/Default.aspx.cs b/MP-TAB/Default.aspx.cs
index c85a090c..3ebaf43d 100644
--- a/MP-TAB/Default.aspx.cs
+++ b/MP-TAB/Default.aspx.cs
@@ -3,11 +3,11 @@ using System;
namespace MoonProTablet
{
- public partial class Default : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
+ public partial class Default : System.Web.UI.Page
{
- Response.Redirect(memLayer.ML.CRS("mainPage"));
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ Response.Redirect(memLayer.ML.CRS("mainPage"));
+ }
}
- }
}
\ No newline at end of file
diff --git a/MP-TAB/DettaglioMacchina.aspx.cs b/MP-TAB/DettaglioMacchina.aspx.cs
index 19591386..941cb8fb 100644
--- a/MP-TAB/DettaglioMacchina.aspx.cs
+++ b/MP-TAB/DettaglioMacchina.aspx.cs
@@ -4,70 +4,56 @@ using System.Web.UI;
namespace MoonProTablet
{
- public partial class DettaglioMacchina : System.Web.UI.Page
- {
- ///
- /// idx macchina selezionata
- ///
- public string idxMacchina
+ public partial class DettaglioMacchina : BasePage
{
- get
- {
- return memLayer.ML.StringSessionObj("IdxMacchina");
- }
- set
- {
- memLayer.ML.setSessionVal("IdxMacchina", value);
- }
- }
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!Page.IsPostBack)
- {
- memLayer.ML.setSessionVal("TipoLink", "DetMacc");
- hlScarti.Visible = enableScarti;
- hlControlli.Visible = enableControlli;
- }
- mod_confProd1.eh_newVal += mod_confProd1_eh_newVal;
- mod_confProd1.eh_reset += mod_confProd1_eh_reset;
- }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ memLayer.ML.setSessionVal("TipoLink", "DetMacc");
+ hlScarti.Visible = enableScarti;
+ hlControlli.Visible = enableControlli;
+ }
+ mod_confProd1.eh_newVal += mod_confProd1_eh_newVal;
+ mod_confProd1.eh_reset += mod_confProd1_eh_reset;
+ }
- void mod_confProd1_eh_reset(object sender, EventArgs e)
- {
- }
+ void mod_confProd1_eh_reset(object sender, EventArgs e)
+ {
+ }
- void mod_confProd1_eh_newVal(object sender, EventArgs e)
- {
- }
+ void mod_confProd1_eh_newVal(object sender, EventArgs e)
+ {
+ }
- ///
- /// evento timer
- ///
- ///
- ///
- protected void Timer1_Tick(object sender, EventArgs e)
- {
- mod_dettMacchina1.doUpdate();
+ ///
+ /// evento timer
+ ///
+ ///
+ ///
+ protected void Timer1_Tick(object sender, EventArgs e)
+ {
+ mod_dettMacchina1.doUpdate();
+ }
+ ///
+ /// Verifica abilitazione gestione scarti
+ ///
+ public bool enableScarti
+ {
+ get
+ {
+ return memLayer.ML.cdvb("enableScarti");
+ }
+ }
+ ///
+ /// Verifica abilitazione gestione scarti
+ ///
+ public bool enableControlli
+ {
+ get
+ {
+ return memLayer.ML.cdvb("enableControlli");
+ }
+ }
}
- ///
- /// Verifica abilitazione gestione scarti
- ///
- public bool enableScarti
- {
- get
- {
- return memLayer.ML.cdvb("enableScarti");
- }
- }
- ///
- /// Verifica abilitazione gestione scarti
- ///
- public bool enableControlli
- {
- get
- {
- return memLayer.ML.cdvb("enableControlli");
- }
- }
- }
}
\ No newline at end of file
diff --git a/MP-TAB/Fermate.aspx.cs b/MP-TAB/Fermate.aspx.cs
index fc1c4128..2f2665ca 100644
--- a/MP-TAB/Fermate.aspx.cs
+++ b/MP-TAB/Fermate.aspx.cs
@@ -4,59 +4,59 @@ using System.Web.UI;
namespace MoonProTablet
{
- public partial class Fermate : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
+ public partial class Fermate : System.Web.UI.Page
{
- if (!Page.IsPostBack)
- {
- Session["TipoLink"] = "EditMacch";
- // se c'è una data/ora in sessione la imposto...
- if (memLayer.ML.isInSessionObject("inizioStato"))
+ protected void Page_Load(object sender, EventArgs e)
{
- try
- {
- DateTime dataOraEv = Convert.ToDateTime(memLayer.ML.objSessionObj("inizioStato"));
- mod_insComm.dataEv = dataOraEv;
- memLayer.ML.emptySessionVal("inizioStato");
- }
- catch
- { }
+ if (!Page.IsPostBack)
+ {
+ Session["TipoLink"] = "EditMacch";
+ // se c'è una data/ora in sessione la imposto...
+ if (memLayer.ML.isInSessionObject("inizioStato"))
+ {
+ try
+ {
+ DateTime dataOraEv = Convert.ToDateTime(memLayer.ML.objSessionObj("inizioStato"));
+ mod_insComm.dataEv = dataOraEv;
+ memLayer.ML.emptySessionVal("inizioStato");
+ }
+ catch
+ { }
+ }
+ }
+ mod_dichiarazione1.eh_newVal += new EventHandler(mod_dichiarazione1_eh_newVal);
+ mod_insComm.eh_inserting += mod_insComm1_eh_inserting;
+ mod_insComm.eh_reset += mod_insComm1_eh_reset;
}
- }
- mod_dichiarazione1.eh_newVal += new EventHandler(mod_dichiarazione1_eh_newVal);
- mod_insComm.eh_inserting += mod_insComm1_eh_inserting;
- mod_insComm.eh_reset += mod_insComm1_eh_reset;
- }
- void mod_insComm1_eh_reset(object sender, EventArgs e)
- {
- }
-
- void mod_insComm1_eh_inserting(object sender, EventArgs e)
- {
- }
- ///
- /// chiama udpate x evento in controller dichiarazioni
- ///
- ///
- ///
- void mod_dichiarazione1_eh_newVal(object sender, EventArgs e)
- {
- mod_dettMacchina1.doUpdate();
- // controllo: se è "aperto" ins dichiarazione metto pure quella...
- if (!mod_dichiarazione1.insRealtime)
- {
- if (mod_insComm.commento != "")
+ void mod_insComm1_eh_reset(object sender, EventArgs e)
{
- // chiamo insert SE C'E' commento
- mod_insComm.salvaCommento();
}
- // elimino data ev! e quindi realtime!
- memLayer.ML.emptySessionVal("dataOraEv");
- // ricarico pagina!
- Response.Redirect("Commenti.aspx");
- }
+
+ void mod_insComm1_eh_inserting(object sender, EventArgs e)
+ {
+ }
+ ///
+ /// chiama udpate x evento in controller dichiarazioni
+ ///
+ ///
+ ///
+ void mod_dichiarazione1_eh_newVal(object sender, EventArgs e)
+ {
+ mod_dettMacchina1.doUpdate();
+ // controllo: se è "aperto" ins dichiarazione metto pure quella...
+ if (!mod_dichiarazione1.insRealtime)
+ {
+ if (mod_insComm.commento != "")
+ {
+ // chiamo insert SE C'E' commento
+ mod_insComm.salvaCommento();
+ }
+ // elimino data ev! e quindi realtime!
+ memLayer.ML.emptySessionVal("dataOraEv");
+ // ricarico pagina!
+ Response.Redirect("Commenti.aspx");
+ }
+ }
}
- }
}
\ No newline at end of file
diff --git a/MP-TAB/HwSwInfo.aspx.cs b/MP-TAB/HwSwInfo.aspx.cs
index 57488ede..6282ff36 100644
--- a/MP-TAB/HwSwInfo.aspx.cs
+++ b/MP-TAB/HwSwInfo.aspx.cs
@@ -7,11 +7,11 @@ using System.Web.UI.WebControls;
namespace MoonProTablet
{
- public partial class HwSwInfo : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
+ public partial class HwSwInfo : BasePage
{
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ }
}
- }
}
\ No newline at end of file
diff --git a/MP-TAB/IOB-info.aspx.cs b/MP-TAB/IOB-info.aspx.cs
index d50792b9..0a048556 100644
--- a/MP-TAB/IOB-info.aspx.cs
+++ b/MP-TAB/IOB-info.aspx.cs
@@ -6,57 +6,47 @@ using System;
namespace MoonProTablet
{
- public partial class IOB_info : System.Web.UI.Page
- {
- protected IOB_data _IobFeeder;
- protected void Page_Load(object sender, EventArgs e)
+ public partial class IOB_info : BasePage
{
- reloadIobData();
- }
- ///
- /// Ricarica dati IOB
- ///
- private void reloadIobData()
- {
- // recupero da redis...
- string hM2IOB = DataLayer.hM2IOB(IdxMacchina);
- string dataSer = memLayer.ML.getRSV(hM2IOB);
- if (dataSer != "" && dataSer != null)
- {
- // restituisco jSon
- _IobFeeder = JsonConvert.DeserializeObject(dataSer);
- }
- else
- {
- // se non c'è genero oggetto vuoto
- _IobFeeder = new IOB_data
+ protected IOB_data _IobFeeder;
+ protected void Page_Load(object sender, EventArgs e)
{
- name = "ND",
- IP = "::1",
- iType = IobType.ND,
- typeCss = "fa fa-question-circle-o"
- };
- }
+ reloadIobData();
+ }
+ ///
+ /// Ricarica dati IOB
+ ///
+ private void reloadIobData()
+ {
+ // recupero da redis...
+ string hM2IOB = DataLayer.hM2IOB(idxMacchina);
+ string dataSer = memLayer.ML.getRSV(hM2IOB);
+ if (dataSer != "" && dataSer != null)
+ {
+ // restituisco jSon
+ _IobFeeder = JsonConvert.DeserializeObject(dataSer);
+ }
+ else
+ {
+ // se non c'è genero oggetto vuoto
+ _IobFeeder = new IOB_data
+ {
+ name = "ND",
+ IP = "::1",
+ iType = IobType.ND,
+ typeCss = "fa fa-question-circle-o"
+ };
+ }
+ }
+ ///
+ /// Fornisce dati dell'IOB da cui è alimentato
+ ///
+ public IOB_data IobFeeder
+ {
+ get
+ {
+ return _IobFeeder;
+ }
+ }
}
- ///
- /// Macchina corrente
- ///
- public string IdxMacchina
- {
- get
- {
- return memLayer.ML.StringSessionObj("IdxMacchina");
- }
- }
- ///
- /// Fornisce dati dell'IOB da cui è alimentato
- ///
- public IOB_data IobFeeder
- {
- get
- {
- return _IobFeeder;
- }
- }
- }
}
\ No newline at end of file
diff --git a/MP-TAB/Logout.aspx.cs b/MP-TAB/Logout.aspx.cs
index c870b8dc..6219ddf4 100644
--- a/MP-TAB/Logout.aspx.cs
+++ b/MP-TAB/Logout.aspx.cs
@@ -4,31 +4,27 @@ using System;
namespace MoonProTablet
{
- public partial class Logout : System.Web.UI.Page
- {
- ///
- /// Oggetto datalayer specifico
- ///
- DataLayer DataLayerObj = new DataLayer();
- ///
- /// Chiamata metodi x logout
- ///
- ///
- ///
- protected void Page_Load(object sender, EventArgs e)
+ public partial class Logout : BasePage
{
- // elimina il device da db...
- string cookieName = memLayer.ML.CRS("cookieName");
- string devSecret = memLayer.ML.getCookieVal(cookieName);
- authProxy.removeDeviceByDevSec(devSecret);
- // elimina il cookie dal browser e l'utente loggato
- memLayer.ML.emptyCookieVal(cookieName);
- //svuoto dati utente in sessione...
- DataLayerObj.MatrOpr = 0;
- user_std.UtSn.logOffUtente();
- Session.Clear();
- // rimanda alla pagina di reg device
- Response.Redirect(memLayer.ML.CRS("mainPage"));
+ ///
+ /// Chiamata metodi x logout
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ // elimina il device da db...
+ string cookieName = memLayer.ML.CRS("cookieName");
+ string devSecret = memLayer.ML.getCookieVal(cookieName);
+ authProxy.removeDeviceByDevSec(devSecret);
+ // elimina il cookie dal browser e l'utente loggato
+ memLayer.ML.emptyCookieVal(cookieName);
+ //svuoto dati utente in sessione...
+ DataLayerObj.MatrOpr = 0;
+ user_std.UtSn.logOffUtente();
+ Session.Clear();
+ // rimanda alla pagina di reg device
+ Response.Redirect(memLayer.ML.CRS("mainPage"));
+ }
}
- }
}
\ No newline at end of file
diff --git a/MP-TAB/MP-TAB.csproj b/MP-TAB/MP-TAB.csproj
index f6896c3e..5f96648e 100644
--- a/MP-TAB/MP-TAB.csproj
+++ b/MP-TAB/MP-TAB.csproj
@@ -21,11 +21,9 @@
4.0
- 44384
-
-
-
-
+ 44328
+ enabled
+ disabled
@@ -727,6 +725,9 @@
+
+ ASPXCodeBehind
+
Commenti.aspx
ASPXCodeBehind
@@ -807,9 +808,6 @@
MappaStato.aspx
-
- ASPXCodeBehind
-
ODL.aspx
ASPXCodeBehind
@@ -924,6 +922,9 @@
Bootstrap.Master
+
+ ASPXCodeBehind
+
cmp_dettODL.ascx
ASPXCodeBehind
diff --git a/MP-TAB/MappaStato.aspx.cs b/MP-TAB/MappaStato.aspx.cs
index 367dee1a..a5211904 100644
--- a/MP-TAB/MappaStato.aspx.cs
+++ b/MP-TAB/MappaStato.aspx.cs
@@ -4,14 +4,14 @@ using System.Web.UI;
namespace MoonProTablet
{
- public partial class MappaStato : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
+ public partial class MappaStato : BasePage
{
- if (!Page.IsPostBack)
- {
- Session["TipoLink"] = "-";
- }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ Session["TipoLink"] = "-";
+ }
+ }
}
- }
}
\ No newline at end of file
diff --git a/MP-TAB/MpTabPage.cs b/MP-TAB/MpTabPage.cs
deleted file mode 100644
index 17c8a26b..00000000
--- a/MP-TAB/MpTabPage.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using SteamWare;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-
-namespace MoonProTablet
-{
- public class MpTabPage : System.Web.UI.Page
- {
- ///
- /// idxMacchina corrente
- ///
- public string idxMacchina
- {
- get
- {
- return memLayer.ML.StringSessionObj("idxMacchina");
- }
- set
- {
- memLayer.ML.setSessionVal("idxMacchina", value);
- }
- }
- ///
- /// idxODL corrente
- ///
- public int idxODL
- {
- get
- {
- return memLayer.ML.IntSessionObj("idxODL");
- }
- set
- {
- memLayer.ML.setSessionVal("idxODL", value);
- }
- }
- }
-}
\ No newline at end of file
diff --git a/MP-TAB/ODL.aspx.cs b/MP-TAB/ODL.aspx.cs
index 2a401af5..3881939c 100644
--- a/MP-TAB/ODL.aspx.cs
+++ b/MP-TAB/ODL.aspx.cs
@@ -5,256 +5,202 @@ using System.Web.UI;
namespace MoonProTablet
{
- public partial class ODL : System.Web.UI.Page
- {
- ///
- /// Oggetto datalayer specifico
- ///
- DataLayer DataLayerObj = new DataLayer();
- ///
- /// Valore protected idxODL
- ///
- protected string _idxOdlMacc;
- ///
- /// Valore protected idxODL
- ///
- protected string _idxOdlAltraMacc;
- ///
- /// IdxODL sulla macchina
- ///
- public string idxOdlMacc
+ public partial class ODL : BasePage
{
- get
- {
- if (_idxOdlMacc == null)
+ ///
+ /// Valore protected idxODL
+ ///
+ protected string _idxOdlMacc;
+ ///
+ /// Valore protected idxODL
+ ///
+ protected string _idxOdlAltraMacc;
+ ///
+ /// IdxODL sulla macchina
+ ///
+ public string idxOdlMacc
{
- _idxOdlMacc = DataLayerObj.currODL(idxMacchina, true);
+ get
+ {
+ if (_idxOdlMacc == null)
+ {
+ _idxOdlMacc = DataLayerObj.currODL(idxMacchinaFix, true);
+ }
+ return _idxOdlMacc;
+ }
+ set
+ {
+ _idxOdlMacc = value;
+ }
}
- return _idxOdlMacc;
- }
- set
- {
- _idxOdlMacc = value;
- }
- }
- ///
- /// Verifica se la macchina NON abbia ODL (valido, > 0)
- ///
- public bool emptyOdlMacc
- {
- get
- {
- return (idxOdlMacc == "" || idxOdlMacc == "0");
- }
- }
-
- ///
- /// idx macchina selezionata
- ///
- public string idxMacchinaSession
- {
- get
- {
- return memLayer.ML.StringSessionObj("IdxMacchina");
- }
- set
- {
- memLayer.ML.setSessionVal("IdxMacchina", value);
- }
- }
- ///
- /// Verifica se la macchina MAIN sia MULTI (da DatiMacchina / redis...)
- ///
- protected bool isMulti
- {
- get
- {
- bool answ = false;
- answ = DataLayerObj.isMulti(idxMacchinaSession);
- return answ;
- }
- }
- ///
- /// idx macchina selezionata
- ///
- public string idxMacchina
- {
- get
- {
- string answ = idxMacchinaSession;
- // verifico: se multi uso selettore tendina...
- if (isMulti)
+ ///
+ /// Verifica se la macchina NON abbia ODL (valido, > 0)
+ ///
+ public bool emptyOdlMacc
{
- if (ddlSubMacc.SelectedValue == "")
- {
+ get
+ {
+ return (idxOdlMacc == "" || idxOdlMacc == "0");
+ }
+ }
+ ///
+ /// idx macchina selezionata
+ ///
+ public string idxMacchinaFix
+ {
+ get
+ {
+ string answ = idxMacchina;
+ // verifico: se multi uso selettore tendina...
+ if (isMulti)
+ {
+ if (ddlSubMacc.SelectedValue == "")
+ {
+ ddlSubMacc.DataBind();
+ }
+ if (ddlSubMacc.SelectedValue != "")
+ {
+ answ = ddlSubMacc.SelectedValue;
+ }
+ }
+ return answ;
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("IdxMacchina", value);
+ }
+ }
+
+ ///
+ /// Se la machcina è MULTI --> mostro selettore
+ ///
+ private void fixSelMacc()
+ {
+ divSelMacc.Visible = isMulti;
+ if (isMulti)
+ {
+ // salvo selezione submacc
+ ddlSubMacc.DataBind();
+ subMaccSel = ddlSubMacc.SelectedValue;
+ }
+ }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ checkAll();
+ if (isMulti)
+ {
+ mod_dettMacchina1.doUpdate();
+ }
+ }
+ mod_ODL1.eh_reqUpdate += Mod_ODL1_eh_reqUpdate;
+ }
+ ///
+ /// Update controlli post richiesta refresh da child
+ ///
+ ///
+ ///
+ private void Mod_ODL1_eh_reqUpdate(object sender, EventArgs e)
+ {
+ // forzo update macchina...
+ DataLayerObj.taMSE.forceRecalc(0, idxMacchinaFix);
+ // update display!
ddlSubMacc.DataBind();
- }
- if (ddlSubMacc.SelectedValue != "")
- {
- answ = ddlSubMacc.SelectedValue;
- }
+ mod_dettMacchina1.doUpdate();
}
- return answ;
- }
- set
- {
- memLayer.ML.setSessionVal("IdxMacchina", value);
- }
- }
- ///
- /// Se la machcina è MULTI --> mostro selettore
- ///
- private void fixSelMacc()
- {
- divSelMacc.Visible = isMulti;
- if (isMulti)
- {
- // salvo selezione submacc
- ddlSubMacc.DataBind();
- subMaccSel = ddlSubMacc.SelectedValue;
- }
- }
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!Page.IsPostBack)
- {
- checkAll();
- if (isMulti)
+ private void checkAll()
{
- mod_dettMacchina1.doUpdate();
+ // parto: nascondo tutto...
+ mod_ODL1.hideAll();
+ fixSelMacc();
+ memLayer.ML.setSessionVal("TipoLink", "EditMacch");
+ // imposto idxMacchina x subControl...
+ mod_ODL1.idxMacchina = idxMacchinaFix;
+ checkConfProd();
+ mod_ODL1.checkAll();
}
- }
- mod_ODL1.eh_reqUpdate += Mod_ODL1_eh_reqUpdate;
- }
- ///
- /// Update controlli post richiesta refresh da child
- ///
- ///
- ///
- private void Mod_ODL1_eh_reqUpdate(object sender, EventArgs e)
- {
- // forzo update macchina...
- DataLayerObj.taMSE.forceRecalc(0, idxMacchina);
- // update display!
- ddlSubMacc.DataBind();
- mod_dettMacchina1.doUpdate();
- }
- private void checkAll()
- {
- // parto: nascondo tutto...
- mod_ODL1.hideAll();
- fixSelMacc();
- memLayer.ML.setSessionVal("TipoLink", "EditMacch");
- // imposto idxMacchina x subControl...
- mod_ODL1.idxMacchina = idxMacchina;
- checkConfProd();
- mod_ODL1.checkAll();
- }
-
- ///
- /// verifica se sia necessario confermare la produzione PRIMA di operare sull'ODL
- ///
- private void checkConfProd()
- {
- // controllo ODL mancante, x cui SE ci fossero pezzi --> va fatto attrezzaggio ODL retrodatato
- bool odlOk = false;
- try
- {
- odlOk = !emptyOdlMacc;
- }
- catch (Exception exc)
- {
- logger.lg.scriviLog(string.Format("Errore recupero ODL corrente da confermare per la macchina {0}{1}{2}", idxMacchina, Environment.NewLine, exc), tipoLog.ERROR);
- }
- // verifica se sia necessario confermare produzione
- bool needConfProd = true;
- int pz2conf = 0;
- DS_ProdTempi.stp_PzProd_getByMacchinaRow rigaProd;
- try
- {
- rigaProd = DataLayerObj.taPzProd2conf.GetData(idxMacchina)[0];
- pz2conf = rigaProd.pezziNonConfermati;
- needConfProd = (pz2conf > 0);
- }
- catch (Exception exc)
- {
- logger.lg.scriviLog(string.Format("Errore recupero pezzi da confermare per la macchina {0}{1}{2}", idxMacchina, Environment.NewLine, exc), tipoLog.ERROR);
- }
- // se necessario mostro warning...
- if (needConfProd)
- {
- // SE mancasse ODL mostro info x poter caricare ODL retrodatato
- if (odlOk)
+ ///
+ /// verifica se sia necessario confermare la produzione PRIMA di operare sull'ODL
+ ///
+ private void checkConfProd()
{
- lblWarningHead.Text = traduci("ConfProdBeforeContinueHead");
- lblWarningBody.Text = traduci("ConfProdBeforeContinueBody");
- lblNumPz2Conf.Text = string.Format("{0} pz NC", pz2conf);
+ // controllo ODL mancante, x cui SE ci fossero pezzi --> va fatto attrezzaggio ODL retrodatato
+ bool odlOk = false;
+ try
+ {
+ odlOk = !emptyOdlMacc;
+ }
+ catch (Exception exc)
+ {
+ logger.lg.scriviLog(string.Format("Errore recupero ODL corrente da confermare per la macchina {0}{1}{2}", idxMacchinaFix, Environment.NewLine, exc), tipoLog.ERROR);
+ }
+ // verifica se sia necessario confermare produzione
+ bool needConfProd = true;
+ int pz2conf = 0;
+ DS_ProdTempi.stp_PzProd_getByMacchinaRow rigaProd;
+ try
+ {
+ rigaProd = DataLayerObj.taPzProd2conf.GetData(idxMacchinaFix)[0];
+ pz2conf = rigaProd.pezziNonConfermati;
+ needConfProd = (pz2conf > 0);
+ }
+ catch (Exception exc)
+ {
+ logger.lg.scriviLog(string.Format("Errore recupero pezzi da confermare per la macchina {0}{1}{2}", idxMacchinaFix, Environment.NewLine, exc), tipoLog.ERROR);
+ }
+ // se necessario mostro warning...
+ if (needConfProd)
+ {
+ // SE mancasse ODL mostro info x poter caricare ODL retrodatato
+ if (odlOk)
+ {
+ lblWarningHead.Text = traduci("ConfProdBeforeContinueHead");
+ lblWarningBody.Text = traduci("ConfProdBeforeContinueBody");
+ lblNumPz2Conf.Text = string.Format("{0} pz NC", pz2conf);
+ }
+ else
+ {
+ lblWarningHead.Text = traduci("setOdlBeforeContinueHead");
+ lblWarningBody.Text = traduci("setOdlBeforeContinueBody");
+ lblNumPz2Conf.Text = string.Format("{0} pz NC", pz2conf);
+ }
+ }
+ divPz2Conf.Visible = needConfProd;
+ divWarn.Visible = needConfProd;
+ lbtFixOdl.Visible = !odlOk;
+ mod_ODL1.isEnabled = !needConfProd;
}
- else
+
+ protected void lbtFixOdl_Click(object sender, EventArgs e)
{
- lblWarningHead.Text = traduci("setOdlBeforeContinueHead");
- lblWarningBody.Text = traduci("setOdlBeforeContinueBody");
- lblNumPz2Conf.Text = string.Format("{0} pz NC", pz2conf);
+ Response.Redirect("~/fixODL");
}
- }
- divPz2Conf.Visible = needConfProd;
- divWarn.Visible = needConfProd;
- lbtFixOdl.Visible = !odlOk;
- mod_ODL1.isEnabled = !needConfProd;
- }
- ///
- /// effettua traduzione del lemma
- ///
- ///
- ///
- public string traduci(string lemma)
- {
- return user_std.UtSn.Traduci(lemma);
- }
-
- protected void lbtFixOdl_Click(object sender, EventArgs e)
- {
- Response.Redirect("~/fixODL");
- }
- protected void ddlSubMacc_SelectedIndexChanged(object sender, EventArgs e)
- {
- // procedo...
- subMaccSel = ddlSubMacc.SelectedValue;
- checkAll();
- }
-
-
- protected void ddlSubMacc_DataBound(object sender, EventArgs e)
- {
- // se ho in memoria un valore LO REIMPOSTO...
- if (subMaccSel != "")
- {
- // provo a preselezionare...
- try
+ protected void ddlSubMacc_SelectedIndexChanged(object sender, EventArgs e)
{
- ddlSubMacc.SelectedValue = subMaccSel;
+ // procedo...
+ subMaccSel = ddlSubMacc.SelectedValue;
+ checkAll();
+ }
+
+
+ protected void ddlSubMacc_DataBound(object sender, EventArgs e)
+ {
+ // se ho in memoria un valore LO REIMPOSTO...
+ if (subMaccSel != "")
+ {
+ // provo a preselezionare...
+ try
+ {
+ ddlSubMacc.SelectedValue = subMaccSel;
+ }
+ catch
+ { }
+ }
}
- catch
- { }
- }
}
- ///
- /// Sotto sistema (macchina) selezionato
- ///
- public string subMaccSel
- {
- get
- {
- return memLayer.ML.StringSessionObj("subMaccSel");
- }
- set
- {
- memLayer.ML.setSessionVal("subMaccSel", value);
- }
- }
- }
}
\ No newline at end of file
diff --git a/MP-TAB/PianoProd.aspx.cs b/MP-TAB/PianoProd.aspx.cs
index bae84c5f..d702384e 100644
--- a/MP-TAB/PianoProd.aspx.cs
+++ b/MP-TAB/PianoProd.aspx.cs
@@ -4,46 +4,32 @@ using System.Web.UI;
namespace MoonProTablet
{
- public partial class PianoProd : System.Web.UI.Page
- {
- ///
- /// idx macchina selezionata
- ///
- public string idxMacchina
+ public partial class PianoProd : BasePage
{
- get
- {
- return memLayer.ML.StringSessionObj("IdxMacchina");
- }
- set
- {
- memLayer.ML.setSessionVal("IdxMacchina", value);
- }
- }
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!Page.IsPostBack)
- {
- Session["TipoLink"] = "DetMacc";
- }
- }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ Session["TipoLink"] = "DetMacc";
+ }
+ }
- void mod_confProd1_eh_reset(object sender, EventArgs e)
- {
- }
+ void mod_confProd1_eh_reset(object sender, EventArgs e)
+ {
+ }
- void mod_confProd1_eh_newVal(object sender, EventArgs e)
- {
- }
+ void mod_confProd1_eh_newVal(object sender, EventArgs e)
+ {
+ }
- ///
- /// evento timer
- ///
- ///
- ///
- protected void Timer1_Tick(object sender, EventArgs e)
- {
- mod_dettMacchina1.doUpdate();
+ ///
+ /// evento timer
+ ///
+ ///
+ ///
+ protected void Timer1_Tick(object sender, EventArgs e)
+ {
+ mod_dettMacchina1.doUpdate();
+ }
}
- }
}
\ No newline at end of file
diff --git a/MP-TAB/RepProd_GG.aspx.cs b/MP-TAB/RepProd_GG.aspx.cs
index 5bfc4125..6368ee47 100644
--- a/MP-TAB/RepProd_GG.aspx.cs
+++ b/MP-TAB/RepProd_GG.aspx.cs
@@ -3,10 +3,10 @@ using System;
namespace MoonProTablet
{
- public partial class RepProd_GG : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
+ public partial class RepProd_GG : BasePage
{
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ }
}
- }
}
\ No newline at end of file
diff --git a/MP-TAB/Reset.aspx.cs b/MP-TAB/Reset.aspx.cs
index b04a2d4d..9bf717d3 100644
--- a/MP-TAB/Reset.aspx.cs
+++ b/MP-TAB/Reset.aspx.cs
@@ -3,15 +3,15 @@ using System;
namespace MoonProTablet
{
- public partial class Reset : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
+ public partial class Reset : BasePage
{
- Session.Clear();
- // reset appConf
- memLayer.ML.resetAppConf();
- // rimanda alla pagina di reg device
- Response.Redirect(memLayer.ML.CRS("mainPage"));
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ Session.Clear();
+ // reset appConf
+ memLayer.ML.resetAppConf();
+ // rimanda alla pagina di reg device
+ Response.Redirect(memLayer.ML.CRS("mainPage"));
+ }
}
- }
}
\ No newline at end of file
diff --git a/MP-TAB/Scarti.aspx.cs b/MP-TAB/Scarti.aspx.cs
index febfa718..9b5d3535 100644
--- a/MP-TAB/Scarti.aspx.cs
+++ b/MP-TAB/Scarti.aspx.cs
@@ -7,7 +7,7 @@ using System.Web.UI.WebControls;
namespace MoonProTablet
{
- public partial class Scarti : System.Web.UI.Page
+ public partial class Scarti : BasePage
{
protected void Page_Load(object sender, EventArgs e)
{
diff --git a/MP-TAB/SendParameters.aspx.cs b/MP-TAB/SendParameters.aspx.cs
index 2238cce6..747e7847 100644
--- a/MP-TAB/SendParameters.aspx.cs
+++ b/MP-TAB/SendParameters.aspx.cs
@@ -7,11 +7,11 @@ using System.Web.UI.WebControls;
namespace MoonProTablet
{
- public partial class SendParameters : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
+ public partial class SendParameters : BasePage
{
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ }
}
- }
}
\ No newline at end of file
diff --git a/MP-TAB/SheetTech.aspx.cs b/MP-TAB/SheetTech.aspx.cs
index 0368e206..ad69b509 100644
--- a/MP-TAB/SheetTech.aspx.cs
+++ b/MP-TAB/SheetTech.aspx.cs
@@ -9,40 +9,20 @@ using System.Web.UI.WebControls;
namespace MoonProTablet
{
- public partial class SheetTech : System.Web.UI.Page
+ public partial class SheetTech : BasePage
{
- ///
- /// Oggetto datalayer specifico
- ///
- DataLayer DataLayerObj = new DataLayer();
protected void Page_Load(object sender, EventArgs e)
{
- if(!Page.IsPostBack)
+ if (!Page.IsPostBack)
{
setArticolo();
}
}
///
- /// idxMacchina
- ///
- public string idxMacchina
- {
- get
- {
- return memLayer.ML.StringSessionObj("idxMacchina");
- }
- set
- {
- memLayer.ML.setSessionVal("idxMacchina", value);
- }
- }
- ///
/// Imposta articolo x dettaglio dato ODL
///
private void setArticolo()
{
-
-
// leggo riga...
DS_ProdTempi.MappaStatoExplRow rigaDati = DataLayerObj.taMSE.getByIdxMacchina(idxMacchina)[0];
cmp_sheetTech.CodArticolo = rigaDati.CodArticolo;
diff --git a/MP-TAB/StoricoTC.aspx.cs b/MP-TAB/StoricoTC.aspx.cs
index 3ef1f276..8c9b3fa0 100644
--- a/MP-TAB/StoricoTC.aspx.cs
+++ b/MP-TAB/StoricoTC.aspx.cs
@@ -3,10 +3,10 @@ using System;
namespace MoonProTablet
{
- public partial class StoricoTC : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
+ public partial class StoricoTC : BasePage
{
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ }
}
- }
}
\ No newline at end of file
diff --git a/MP-TAB/Test.aspx.cs b/MP-TAB/Test.aspx.cs
index d5436fc5..d182c7dc 100644
--- a/MP-TAB/Test.aspx.cs
+++ b/MP-TAB/Test.aspx.cs
@@ -8,10 +8,10 @@ using System.Web.UI.WebControls;
namespace MoonProTablet
{
- public partial class Test : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
+ public partial class Test : BasePage
{
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ }
}
- }
}
\ No newline at end of file
diff --git a/MP-TAB/Turni.aspx.cs b/MP-TAB/Turni.aspx.cs
index 7263132d..55811659 100644
--- a/MP-TAB/Turni.aspx.cs
+++ b/MP-TAB/Turni.aspx.cs
@@ -4,24 +4,24 @@ using System.Web.UI;
namespace MoonProTablet
{
- public partial class Turni : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
+ public partial class Turni : BasePage
{
- if (!Page.IsPostBack)
- {
- Session["TipoLink"] = "EditMacch";
- }
- mod_turni1.eh_updated += Mod_turni1_eh_updated;
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!Page.IsPostBack)
+ {
+ Session["TipoLink"] = "EditMacch";
+ }
+ mod_turni1.eh_updated += Mod_turni1_eh_updated;
+ }
+ ///
+ /// Aggiorno visualizzzazione x update
+ ///
+ ///
+ ///
+ private void Mod_turni1_eh_updated(object sender, EventArgs e)
+ {
+ mod_dettTurni.DataBind();
+ }
}
- ///
- /// Aggiorno visualizzzazione x update
- ///
- ///
- ///
- private void Mod_turni1_eh_updated(object sender, EventArgs e)
- {
- mod_dettTurni.DataBind();
- }
- }
}
\ No newline at end of file
diff --git a/MP-TAB/Update.aspx.cs b/MP-TAB/Update.aspx.cs
index 5d3ea904..7b045a8b 100644
--- a/MP-TAB/Update.aspx.cs
+++ b/MP-TAB/Update.aspx.cs
@@ -8,7 +8,7 @@ using System.Web.UI.WebControls;
namespace MoonProTablet
{
- public partial class Update : System.Web.UI.Page
+ public partial class Update : BasePage
{
protected void Page_Load(object sender, EventArgs e)
{
diff --git a/MP-TAB/User.aspx.cs b/MP-TAB/User.aspx.cs
index 79add46c..09fdb283 100644
--- a/MP-TAB/User.aspx.cs
+++ b/MP-TAB/User.aspx.cs
@@ -9,62 +9,58 @@ using System.Web.UI.WebControls;
namespace MoonProTablet
{
- public partial class User : System.Web.UI.Page
- {
- ///
- /// Oggetto datalayer specifico
- ///
- DataLayer DataLayerObj = new DataLayer();
- protected void Page_Load(object sender, EventArgs e)
+ public partial class User : BasePage
{
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ }
+ ///
+ /// Dimensione schermata video attuale
+ ///
+ public string videoSize
+ {
+ get
+ {
+ string answ = "?x?";
+ if (Session["BrowserWidth"] != null)
+ {
+ answ = string.Format("{0} x {1}", Session["BrowserWidth"], Session["BrowserHeight"]);
+ }
+ return answ;
+ }
+ }
+ ///
+ /// Cognome Nome utente
+ ///
+ public string CognomeNome
+ {
+ get
+ {
+ string swData = "";
+ string cognomeNome = "";
+ try
+ {
+ cognomeNome = user_std.UtSn.CognomeNome;
+ }
+ catch (Exception exc)
+ {
+ logger.lg.scriviLog(string.Format("Eccezione in User.aspx - page_load: {0}", exc), tipoLog.EXCEPTION);
+ }
+ if (cognomeNome != "")
+ {
+ swData = cognomeNome;
+ }
+ else if (DataLayerObj.MatrOpr > 0)
+ {
+ swData = DataLayerObj.CognomeNomeOpr;
+ }
+ else
+ {
+ swData = "MoonProTablet";
+ }
+ return swData;
+ }
+ }
}
- ///
- /// Dimensione schermata video attuale
- ///
- public string videoSize
- {
- get
- {
- string answ = "?x?";
- if (Session["BrowserWidth"] != null)
- {
- answ = string.Format("{0} x {1}", Session["BrowserWidth"], Session["BrowserHeight"]);
- }
- return answ;
- }
- }
- ///
- /// Cognome Nome utente
- ///
- public string CognomeNome
- {
- get
- {
- string swData = "";
- string cognomeNome = "";
- try
- {
- cognomeNome = user_std.UtSn.CognomeNome;
- }
- catch (Exception exc)
- {
- logger.lg.scriviLog(string.Format("Eccezione in User.aspx - page_load: {0}", exc), tipoLog.EXCEPTION);
- }
- if (cognomeNome != "")
- {
- swData = cognomeNome;
- }
- else if (DataLayerObj.MatrOpr > 0)
- {
- swData = DataLayerObj.CognomeNomeOpr;
- }
- else
- {
- swData = "MoonProTablet";
- }
- return swData;
- }
- }
- }
}
\ No newline at end of file
diff --git a/MP-TAB/UserList.aspx.cs b/MP-TAB/UserList.aspx.cs
index 523ca654..6b481c30 100644
--- a/MP-TAB/UserList.aspx.cs
+++ b/MP-TAB/UserList.aspx.cs
@@ -7,11 +7,11 @@ using System.Web.UI.WebControls;
namespace MoonProTablet
{
- public partial class UserList : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
+ public partial class UserList : BasePage
{
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ }
}
- }
}
\ No newline at end of file
diff --git a/MP-TAB/WebUserControls/BaseUserControl.cs b/MP-TAB/WebUserControls/BaseUserControl.cs
new file mode 100644
index 00000000..bf6dd9fc
--- /dev/null
+++ b/MP-TAB/WebUserControls/BaseUserControl.cs
@@ -0,0 +1,50 @@
+using MapoDb;
+using SteamWare;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace MoonProTablet.WebUserControls
+{
+ public class BaseUserControl : System.Web.UI.UserControl
+ {
+ ///
+ /// idx macchina selezionata
+ ///
+ public string idxMacchina
+ {
+ get
+ {
+ return memLayer.ML.StringSessionObj("IdxMacchina");
+ }
+ set
+ {
+ memLayer.ML.setSessionVal("IdxMacchina", value);
+ }
+ }
+ ///
+ /// Oggetto datalayer specifico
+ ///
+ DataLayer DataLayerObj = new DataLayer();
+ ///
+ /// effettua traduzione del lemma
+ ///
+ ///
+ ///
+ public string traduci(string lemma)
+ {
+ return user_std.UtSn.Traduci(lemma);
+ }
+
+ ///
+ /// effettua traduzione in inglese del lemma
+ ///
+ ///
+ ///
+ public string traduciEn(string lemma)
+ {
+ return user_std.UtSn.TraduciEn(lemma);
+ }
+ }
+}
\ No newline at end of file
diff --git a/MP-TAB/fixODL.aspx.cs b/MP-TAB/fixODL.aspx.cs
index 0cdf3bf6..2296ce18 100644
--- a/MP-TAB/fixODL.aspx.cs
+++ b/MP-TAB/fixODL.aspx.cs
@@ -5,12 +5,8 @@ using System.Web.UI;
namespace MoonProTablet
{
- public partial class fixODL : MpTabPage
+ public partial class fixODL : BasePage
{
- ///
- /// Oggetto datalayer specifico
- ///
- DataLayer DataLayerObj = new DataLayer();
///
/// Caricamento pagina
///
@@ -55,18 +51,6 @@ namespace MoonProTablet
memLayer.ML.setSessionVal("IdxMacchina", value);
}
}
- ///
- /// Verifica se la macchina MAIN sia MULTI (da DatiMacchina / redis...)
- ///
- protected bool isMulti
- {
- get
- {
- bool answ = false;
- answ = DataLayerObj.isMulti(idxMacchina);
- return answ;
- }
- }
protected void ddlSubMacc_DataBound(object sender, EventArgs e)
{
// se ho in memoria un valore LO REIMPOSTO...
@@ -105,20 +89,6 @@ namespace MoonProTablet
subMaccSel = ddlSubMacc.SelectedValue;
}
}
- ///
- /// Sotto sistema (macchina) selezionato
- ///
- public string subMaccSel
- {
- get
- {
- return memLayer.ML.StringSessionObj("subMaccSel");
- }
- set
- {
- memLayer.ML.setSessionVal("subMaccSel", value);
- }
- }
private void fixBtnImpostaODL()
{
// verifico se selezionato un ODL sorgente...
@@ -150,16 +120,6 @@ namespace MoonProTablet
fixBtnImpostaODL();
}
///
- /// Verifica (su tab config) se sia abilitata la gestione flusso RPO (Richieste - Promesse - ODL)
- ///
- protected bool enableRPO
- {
- get
- {
- return memLayer.ML.cdvb("enableRPO");
- }
- }
- ///
/// Registra attivazione ODL per macchina corrente...
///
///
diff --git a/MP-TAB/jumper.aspx.cs b/MP-TAB/jumper.aspx.cs
index 88222a92..210b7781 100644
--- a/MP-TAB/jumper.aspx.cs
+++ b/MP-TAB/jumper.aspx.cs
@@ -8,25 +8,25 @@ using System.Web.UI.WebControls;
namespace MoonProTablet
{
- public partial class jumper : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
+ public partial class jumper : System.Web.UI.Page
{
- // elimino precedenti cookie e valori utente...
- user_std.UtSn.logOffUtente();
- memLayer.ML.emptySessionVal("MatrOpr");
- memLayer.ML.emptySessionVal("UserAuthKey");
- memLayer.ML.emptyCookieVal(memLayer.ML.CRS("cookieName"));
- int MatrOpr = memLayer.ML.QSI("MatrOpr");
- string UserAuthKey = memLayer.ML.QSS("UserAuthKey");
- if (MatrOpr >= 0 && UserAuthKey != "")
- {
- // salvo in sessione
- memLayer.ML.setSessionVal("MatrOpr", MatrOpr);
- memLayer.ML.setSessionVal("UserAuthKey", UserAuthKey);
- }
- // redirect...
- Response.Redirect("tryLogin");
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ // elimino precedenti cookie e valori utente...
+ user_std.UtSn.logOffUtente();
+ memLayer.ML.emptySessionVal("MatrOpr");
+ memLayer.ML.emptySessionVal("UserAuthKey");
+ memLayer.ML.emptyCookieVal(memLayer.ML.CRS("cookieName"));
+ int MatrOpr = memLayer.ML.QSI("MatrOpr");
+ string UserAuthKey = memLayer.ML.QSS("UserAuthKey");
+ if (MatrOpr >= 0 && UserAuthKey != "")
+ {
+ // salvo in sessione
+ memLayer.ML.setSessionVal("MatrOpr", MatrOpr);
+ memLayer.ML.setSessionVal("UserAuthKey", UserAuthKey);
+ }
+ // redirect...
+ Response.Redirect("tryLogin");
+ }
}
- }
}
\ No newline at end of file
diff --git a/MP-TAB/regNewDevice.aspx.cs b/MP-TAB/regNewDevice.aspx.cs
index 8090158a..fbb41390 100644
--- a/MP-TAB/regNewDevice.aspx.cs
+++ b/MP-TAB/regNewDevice.aspx.cs
@@ -3,12 +3,12 @@ using System;
namespace MoonProTablet
{
- public partial class regNewDevice : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
+ public partial class regNewDevice : BasePage
{
- // controllo se ci fosse codice di AUTH nel qual caso rimbalzo...
- mod_QRScanner.Visible = memLayer.ML.CRB("EmbedQRead");
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ // controllo se ci fosse codice di AUTH nel qual caso rimbalzo...
+ mod_QRScanner.Visible = memLayer.ML.CRB("EmbedQRead");
+ }
}
- }
}
\ No newline at end of file
diff --git a/MP-TAB/tryLogin.aspx.cs b/MP-TAB/tryLogin.aspx.cs
index b786bc1e..5b19629c 100644
--- a/MP-TAB/tryLogin.aspx.cs
+++ b/MP-TAB/tryLogin.aspx.cs
@@ -7,11 +7,11 @@ using System.Web.UI.WebControls;
namespace MoonProTablet
{
- public partial class tryLogin : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
+ public partial class tryLogin : BasePage
{
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ }
}
- }
}
\ No newline at end of file
diff --git a/MP-TAB/windowSize.ashx.cs b/MP-TAB/windowSize.ashx.cs
index 5ea2b9ba..450aa4cc 100644
--- a/MP-TAB/windowSize.ashx.cs
+++ b/MP-TAB/windowSize.ashx.cs
@@ -6,52 +6,52 @@ using System.Web;
namespace MoonProTablet
{
- ///
- /// Descrizione di riepilogo per windowSize
- /// vedere https://techbrij.com/browser-height-width-server-responsive-design-asp-net
- ///
- public class windowSize : IHttpHandler, System.Web.SessionState.IRequiresSessionState
- {
///
- /// Processa la richeista andando a recuperare width-height del browser
+ /// Descrizione di riepilogo per windowSize
+ /// vedere https://techbrij.com/browser-height-width-server-responsive-design-asp-net
///
- ///
- public void ProcessRequest(HttpContext context)
+ public class windowSize : IHttpHandler, System.Web.SessionState.IRequiresSessionState
{
- context.Response.ContentType = "application/json";
+ ///
+ /// Processa la richeista andando a recuperare width-height del browser
+ ///
+ ///
+ public void ProcessRequest(HttpContext context)
+ {
+ context.Response.ContentType = "application/json";
- var json = new System.Web.Script.Serialization.JavaScriptSerializer();
- var output = json.Serialize(new { isFirst = context.Session["BrowserWidth"] == null });
- context.Response.Write(output);
+ var json = new System.Web.Script.Serialization.JavaScriptSerializer();
+ var output = json.Serialize(new { isFirst = context.Session["BrowserWidth"] == null });
+ context.Response.Write(output);
- string Width = context.Request.QueryString["Width"];
- string Height = context.Request.QueryString["Height"];
- string scrWidth = context.Request.QueryString["scrWidth"];
- string scrHeight = context.Request.QueryString["scrHeight"];
- string PixRat = context.Request.QueryString["PixRat"];
- context.Session["BrowserWidth"] = Width;
- context.Session["BrowserHeight"] = Height;
- // salva in REDIS come conteggio INCREMENTALE...
- if (memLayer.ML.CRB("RedEnab"))
- {
- string memName = string.Format("COUNT:wh:{0}x{1}", Width, Height);
- // conto +1 x la size nel contatore REDIS
- long nCall = memLayer.ML.setRCntI(memLayer.ML.redHash(memName));
- // conto anche SCHERMO...
- memName = string.Format("COUNT:scr:{0}x{1}", scrWidth, scrHeight);
- nCall = memLayer.ML.setRCntI(memLayer.ML.redHash(memName));
- // salvo la PIXEL RATIO con WINDOWS...
- memName = string.Format("COUNT:wpr:[{2}] {0}x{1}", Width, Height, PixRat);
- nCall = memLayer.ML.setRCntI(memLayer.ML.redHash(memName));
- }
+ string Width = context.Request.QueryString["Width"];
+ string Height = context.Request.QueryString["Height"];
+ string scrWidth = context.Request.QueryString["scrWidth"];
+ string scrHeight = context.Request.QueryString["scrHeight"];
+ string PixRat = context.Request.QueryString["PixRat"];
+ context.Session["BrowserWidth"] = Width;
+ context.Session["BrowserHeight"] = Height;
+ // salva in REDIS come conteggio INCREMENTALE...
+ if (memLayer.ML.CRB("RedEnab"))
+ {
+ string memName = string.Format("COUNT:wh:{0}x{1}", Width, Height);
+ // conto +1 x la size nel contatore REDIS
+ long nCall = memLayer.ML.setRCntI(memLayer.ML.redHash(memName));
+ // conto anche SCHERMO...
+ memName = string.Format("COUNT:scr:{0}x{1}", scrWidth, scrHeight);
+ nCall = memLayer.ML.setRCntI(memLayer.ML.redHash(memName));
+ // salvo la PIXEL RATIO con WINDOWS...
+ memName = string.Format("COUNT:wpr:[{2}] {0}x{1}", Width, Height, PixRat);
+ nCall = memLayer.ML.setRCntI(memLayer.ML.redHash(memName));
+ }
+ }
+
+ public bool IsReusable
+ {
+ get
+ {
+ return false;
+ }
+ }
}
-
- public bool IsReusable
- {
- get
- {
- return false;
- }
- }
- }
}
\ No newline at end of file