updatex gestione classe ereditata BasePage x TAB
This commit is contained in:
+301
-306
@@ -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 = "<h3>Reset Actions</h3>";
|
||||
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}</br>", 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}</br>", 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}</br>", 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}</br>", 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}</br>", recPrev, recPost);
|
||||
}
|
||||
}
|
||||
lblOut.Text = testo;
|
||||
}
|
||||
/// <summary>
|
||||
/// Restitusice l'elenco pareto (decrescente) delle dimensioni FINESTRA browser registrate
|
||||
/// </summary>
|
||||
public string paretoBrowserSize
|
||||
{
|
||||
get
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
string redHash = memLayer.ML.redHash("COUNT:wh:*");
|
||||
int numRec = memLayer.ML.redCountKey(redHash);
|
||||
List<KeyValuePair<string, int>> 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();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Restitusice l'elenco pareto (decrescente) delle dimensioni SCHERMO registrate
|
||||
/// </summary>
|
||||
public string paretoScreenSize
|
||||
{
|
||||
get
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
string redHash = memLayer.ML.redHash("COUNT:scr:*");
|
||||
int numRec = memLayer.ML.redCountKey(redHash);
|
||||
List<KeyValuePair<string, int>> 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();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Restitusice l'elenco pareto (decrescente) delle dimensioni FINESTRA browser + PIXEL ratio registrate
|
||||
/// </summary>
|
||||
public string paretoWinPixRat
|
||||
{
|
||||
get
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
string redHash = memLayer.ML.redHash("COUNT:wpr:*");
|
||||
int numRec = memLayer.ML.redCountKey(redHash);
|
||||
List<KeyValuePair<string, int>> 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();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Formatta un numero da int a size in Kb/Mb/Gb/Tb
|
||||
/// </summary>
|
||||
/// <param name="rawSize"></param>
|
||||
/// <returns></returns>
|
||||
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]);
|
||||
}
|
||||
/// <summary>
|
||||
/// Dati sui server redis...
|
||||
/// </summary>
|
||||
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<string, System.Collections.Generic.KeyValuePair<string, string>> 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();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Stringa timing
|
||||
/// </summary>
|
||||
/// <param name="time"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
/// <summary>
|
||||
/// Statistiche server
|
||||
/// </summary>
|
||||
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 = "<h3>Reset Actions</h3>";
|
||||
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}</br>", 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}</br>", 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}</br>", 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}</br>", 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}</br>", recPrev, recPost);
|
||||
}
|
||||
}
|
||||
lblOut.Text = testo;
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
public string IISStats
|
||||
{
|
||||
get
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
using (var iis = Process.GetCurrentProcess())
|
||||
/// <summary>
|
||||
/// Restitusice l'elenco pareto (decrescente) delle dimensioni FINESTRA browser registrate
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Num di librerie inserite
|
||||
/// </summary>
|
||||
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<KeyValuePair<string, int>> 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();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Restitusice l'elenco pareto (decrescente) delle dimensioni SCHERMO registrate
|
||||
/// </summary>
|
||||
public string paretoScreenSize
|
||||
{
|
||||
get
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
string redHash = memLayer.ML.redHash("COUNT:scr:*");
|
||||
int numRec = memLayer.ML.redCountKey(redHash);
|
||||
List<KeyValuePair<string, int>> 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();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Restitusice l'elenco pareto (decrescente) delle dimensioni FINESTRA browser + PIXEL ratio registrate
|
||||
/// </summary>
|
||||
public string paretoWinPixRat
|
||||
{
|
||||
get
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
string redHash = memLayer.ML.redHash("COUNT:wpr:*");
|
||||
int numRec = memLayer.ML.redCountKey(redHash);
|
||||
List<KeyValuePair<string, int>> 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();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Formatta un numero da int a size in Kb/Mb/Gb/Tb
|
||||
/// </summary>
|
||||
/// <param name="rawSize"></param>
|
||||
/// <returns></returns>
|
||||
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]);
|
||||
}
|
||||
/// <summary>
|
||||
/// Dati sui server redis...
|
||||
/// </summary>
|
||||
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<string, System.Collections.Generic.KeyValuePair<string, string>> 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();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Stringa timing
|
||||
/// </summary>
|
||||
/// <param name="time"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
/// <summary>
|
||||
/// Statistiche server
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Num di librerie inserite
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Oggetto datalayer specifico
|
||||
/// </summary>
|
||||
internal DataLayer DataLayerObj = new DataLayer();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// idx macchina selezionata
|
||||
/// </summary>
|
||||
public string idxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("IdxMacchina");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("IdxMacchina", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Sotto sistema (macchina) selezionato
|
||||
/// </summary>
|
||||
public string subMaccSel
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("subMaccSel");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("subMaccSel", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica se la macchina MAIN sia MULTI (da DatiMacchina / redis...)
|
||||
/// </summary>
|
||||
protected bool isMulti
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
answ = DataLayerObj.isMulti(idxMacchina);
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// idxODL corrente
|
||||
/// </summary>
|
||||
public int idxODL
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("idxODL");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxODL", value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifica (su tab config) se sia abilitata la gestione flusso RPO (Richieste - Promesse - ODL)
|
||||
/// </summary>
|
||||
protected bool enableRPO
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.cdvb("enableRPO");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Prox pagina da aprire
|
||||
/// </summary>
|
||||
protected string _nextPage
|
||||
{
|
||||
get
|
||||
{
|
||||
string pagina = memLayer.ML.StringSessionObj("nextPage");
|
||||
if (string.IsNullOrEmpty(pagina))
|
||||
{
|
||||
pagina = "menu.aspx";
|
||||
}
|
||||
return pagina;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// effettua traduzione del lemma
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(string lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// effettua traduzione in inglese del lemma
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduciEn(string lemma)
|
||||
{
|
||||
return user_std.UtSn.TraduciEn(lemma);
|
||||
}
|
||||
}
|
||||
}
|
||||
+53
-56
@@ -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);
|
||||
}
|
||||
/// <summary>
|
||||
/// richiesta ins nuovo evento...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void mod_commenti1_eh_newVal(object sender, EventArgs e)
|
||||
{
|
||||
showPnlDichiaraz(true);
|
||||
}
|
||||
void mod_commenti1_eh_reset(object sender, EventArgs e)
|
||||
{
|
||||
showPnlDichiaraz(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// richiesta ins nuovo evento...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+15
-15
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,70 +4,56 @@ using System.Web.UI;
|
||||
|
||||
namespace MoonProTablet
|
||||
{
|
||||
public partial class DettaglioMacchina : System.Web.UI.Page
|
||||
{
|
||||
/// <summary>
|
||||
/// idx macchina selezionata
|
||||
/// </summary>
|
||||
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)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// evento timer
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
mod_dettMacchina1.doUpdate();
|
||||
/// <summary>
|
||||
/// evento timer
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
mod_dettMacchina1.doUpdate();
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica abilitazione gestione scarti
|
||||
/// </summary>
|
||||
public bool enableScarti
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.cdvb("enableScarti");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica abilitazione gestione scarti
|
||||
/// </summary>
|
||||
public bool enableControlli
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.cdvb("enableControlli");
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica abilitazione gestione scarti
|
||||
/// </summary>
|
||||
public bool enableScarti
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.cdvb("enableScarti");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica abilitazione gestione scarti
|
||||
/// </summary>
|
||||
public bool enableControlli
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.cdvb("enableControlli");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+48
-48
@@ -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)
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// chiama udpate x evento in controller dichiarazioni
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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)
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// chiama udpate x evento in controller dichiarazioni
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+40
-50
@@ -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();
|
||||
}
|
||||
/// <summary>
|
||||
/// Ricarica dati IOB
|
||||
/// </summary>
|
||||
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<IOB_data>(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();
|
||||
}
|
||||
/// <summary>
|
||||
/// Ricarica dati IOB
|
||||
/// </summary>
|
||||
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<IOB_data>(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"
|
||||
};
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Fornisce dati dell'IOB da cui è alimentato
|
||||
/// </summary>
|
||||
public IOB_data IobFeeder
|
||||
{
|
||||
get
|
||||
{
|
||||
return _IobFeeder;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Macchina corrente
|
||||
/// </summary>
|
||||
public string IdxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("IdxMacchina");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Fornisce dati dell'IOB da cui è alimentato
|
||||
/// </summary>
|
||||
public IOB_data IobFeeder
|
||||
{
|
||||
get
|
||||
{
|
||||
return _IobFeeder;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+21
-25
@@ -4,31 +4,27 @@ using System;
|
||||
|
||||
namespace MoonProTablet
|
||||
{
|
||||
public partial class Logout : System.Web.UI.Page
|
||||
{
|
||||
/// <summary>
|
||||
/// Oggetto datalayer specifico
|
||||
/// </summary>
|
||||
DataLayer DataLayerObj = new DataLayer();
|
||||
/// <summary>
|
||||
/// Chiamata metodi x logout
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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"));
|
||||
/// <summary>
|
||||
/// Chiamata metodi x logout
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,11 +21,9 @@
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
<IISExpressSSLPort>44384</IISExpressSSLPort>
|
||||
<IISExpressAnonymousAuthentication>
|
||||
</IISExpressAnonymousAuthentication>
|
||||
<IISExpressWindowsAuthentication>
|
||||
</IISExpressWindowsAuthentication>
|
||||
<IISExpressSSLPort>44328</IISExpressSSLPort>
|
||||
<IISExpressAnonymousAuthentication>enabled</IISExpressAnonymousAuthentication>
|
||||
<IISExpressWindowsAuthentication>disabled</IISExpressWindowsAuthentication>
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<TargetFrameworkProfile />
|
||||
<UseGlobalApplicationHostFile />
|
||||
@@ -727,6 +725,9 @@
|
||||
<Compile Include="App_Start\BundleConfig.cs" />
|
||||
<Compile Include="App_Start\MP_Startup.cs" />
|
||||
<Compile Include="App_Start\RouteConfig.cs" />
|
||||
<Compile Include="BasePage.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Commenti.aspx.cs">
|
||||
<DependentUpon>Commenti.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -807,9 +808,6 @@
|
||||
<Compile Include="MappaStato.aspx.designer.cs">
|
||||
<DependentUpon>MappaStato.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MpTabPage.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ODL.aspx.cs">
|
||||
<DependentUpon>ODL.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -924,6 +922,9 @@
|
||||
<Compile Include="WebMasterPages\Bootstrap.Master.designer.cs">
|
||||
<DependentUpon>Bootstrap.Master</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\BaseUserControl.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="WebUserControls\cmp_dettODL.ascx.cs">
|
||||
<DependentUpon>cmp_dettODL.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
@@ -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"] = "-";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// idxMacchina corrente
|
||||
/// </summary>
|
||||
public string idxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("idxMacchina");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxMacchina", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// idxODL corrente
|
||||
/// </summary>
|
||||
public int idxODL
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.IntSessionObj("idxODL");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxODL", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+179
-233
@@ -5,256 +5,202 @@ using System.Web.UI;
|
||||
|
||||
namespace MoonProTablet
|
||||
{
|
||||
public partial class ODL : System.Web.UI.Page
|
||||
{
|
||||
/// <summary>
|
||||
/// Oggetto datalayer specifico
|
||||
/// </summary>
|
||||
DataLayer DataLayerObj = new DataLayer();
|
||||
/// <summary>
|
||||
/// Valore protected idxODL
|
||||
/// </summary>
|
||||
protected string _idxOdlMacc;
|
||||
/// <summary>
|
||||
/// Valore protected idxODL
|
||||
/// </summary>
|
||||
protected string _idxOdlAltraMacc;
|
||||
/// <summary>
|
||||
/// IdxODL sulla macchina
|
||||
/// </summary>
|
||||
public string idxOdlMacc
|
||||
public partial class ODL : BasePage
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_idxOdlMacc == null)
|
||||
/// <summary>
|
||||
/// Valore protected idxODL
|
||||
/// </summary>
|
||||
protected string _idxOdlMacc;
|
||||
/// <summary>
|
||||
/// Valore protected idxODL
|
||||
/// </summary>
|
||||
protected string _idxOdlAltraMacc;
|
||||
/// <summary>
|
||||
/// IdxODL sulla macchina
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica se la macchina NON abbia ODL (valido, > 0)
|
||||
/// </summary>
|
||||
public bool emptyOdlMacc
|
||||
{
|
||||
get
|
||||
{
|
||||
return (idxOdlMacc == "" || idxOdlMacc == "0");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// idx macchina selezionata
|
||||
/// </summary>
|
||||
public string idxMacchinaSession
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("IdxMacchina");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("IdxMacchina", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica se la macchina MAIN sia MULTI (da DatiMacchina / redis...)
|
||||
/// </summary>
|
||||
protected bool isMulti
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
answ = DataLayerObj.isMulti(idxMacchinaSession);
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// idx macchina selezionata
|
||||
/// </summary>
|
||||
public string idxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = idxMacchinaSession;
|
||||
// verifico: se multi uso selettore tendina...
|
||||
if (isMulti)
|
||||
/// <summary>
|
||||
/// Verifica se la macchina NON abbia ODL (valido, > 0)
|
||||
/// </summary>
|
||||
public bool emptyOdlMacc
|
||||
{
|
||||
if (ddlSubMacc.SelectedValue == "")
|
||||
{
|
||||
get
|
||||
{
|
||||
return (idxOdlMacc == "" || idxOdlMacc == "0");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// idx macchina selezionata
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Se la machcina è MULTI --> mostro selettore
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
/// <summary>
|
||||
/// Update controlli post richiesta refresh da child
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Se la machcina è MULTI --> mostro selettore
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
/// <summary>
|
||||
/// Update controlli post richiesta refresh da child
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// verifica se sia necessario confermare la produzione PRIMA di operare sull'ODL
|
||||
/// </summary>
|
||||
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)
|
||||
/// <summary>
|
||||
/// verifica se sia necessario confermare la produzione PRIMA di operare sull'ODL
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
/// <summary>
|
||||
/// effettua traduzione del lemma
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
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
|
||||
{ }
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Sotto sistema (macchina) selezionato
|
||||
/// </summary>
|
||||
public string subMaccSel
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("subMaccSel");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("subMaccSel", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+23
-37
@@ -4,46 +4,32 @@ using System.Web.UI;
|
||||
|
||||
namespace MoonProTablet
|
||||
{
|
||||
public partial class PianoProd : System.Web.UI.Page
|
||||
{
|
||||
/// <summary>
|
||||
/// idx macchina selezionata
|
||||
/// </summary>
|
||||
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)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// evento timer
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
mod_dettMacchina1.doUpdate();
|
||||
/// <summary>
|
||||
/// evento timer
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
mod_dettMacchina1.doUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,40 +9,20 @@ using System.Web.UI.WebControls;
|
||||
|
||||
namespace MoonProTablet
|
||||
{
|
||||
public partial class SheetTech : System.Web.UI.Page
|
||||
public partial class SheetTech : BasePage
|
||||
{
|
||||
/// <summary>
|
||||
/// Oggetto datalayer specifico
|
||||
/// </summary>
|
||||
DataLayer DataLayerObj = new DataLayer();
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if(!Page.IsPostBack)
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
setArticolo();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// idxMacchina
|
||||
/// </summary>
|
||||
public string idxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("idxMacchina");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("idxMacchina", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Imposta articolo x dettaglio dato ODL
|
||||
/// </summary>
|
||||
private void setArticolo()
|
||||
{
|
||||
|
||||
|
||||
// leggo riga...
|
||||
DS_ProdTempi.MappaStatoExplRow rigaDati = DataLayerObj.taMSE.getByIdxMacchina(idxMacchina)[0];
|
||||
cmp_sheetTech.CodArticolo = rigaDati.CodArticolo;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+18
-18
@@ -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;
|
||||
}
|
||||
/// <summary>
|
||||
/// Aggiorno visualizzzazione x update
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Mod_turni1_eh_updated(object sender, EventArgs e)
|
||||
{
|
||||
mod_dettTurni.DataBind();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Aggiorno visualizzzazione x update
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Mod_turni1_eh_updated(object sender, EventArgs e)
|
||||
{
|
||||
mod_dettTurni.DataBind();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
+51
-55
@@ -9,62 +9,58 @@ using System.Web.UI.WebControls;
|
||||
|
||||
namespace MoonProTablet
|
||||
{
|
||||
public partial class User : System.Web.UI.Page
|
||||
{
|
||||
/// <summary>
|
||||
/// Oggetto datalayer specifico
|
||||
/// </summary>
|
||||
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)
|
||||
{
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Dimensione schermata video attuale
|
||||
/// </summary>
|
||||
public string videoSize
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "?x?";
|
||||
if (Session["BrowserWidth"] != null)
|
||||
{
|
||||
answ = string.Format("{0} x {1}", Session["BrowserWidth"], Session["BrowserHeight"]);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Cognome Nome utente
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Dimensione schermata video attuale
|
||||
/// </summary>
|
||||
public string videoSize
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "?x?";
|
||||
if (Session["BrowserWidth"] != null)
|
||||
{
|
||||
answ = string.Format("{0} x {1}", Session["BrowserWidth"], Session["BrowserHeight"]);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Cognome Nome utente
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// idx macchina selezionata
|
||||
/// </summary>
|
||||
public string idxMacchina
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.StringSessionObj("IdxMacchina");
|
||||
}
|
||||
set
|
||||
{
|
||||
memLayer.ML.setSessionVal("IdxMacchina", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Oggetto datalayer specifico
|
||||
/// </summary>
|
||||
DataLayer DataLayerObj = new DataLayer();
|
||||
/// <summary>
|
||||
/// effettua traduzione del lemma
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduci(string lemma)
|
||||
{
|
||||
return user_std.UtSn.Traduci(lemma);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// effettua traduzione in inglese del lemma
|
||||
/// </summary>
|
||||
/// <param name="lemma"></param>
|
||||
/// <returns></returns>
|
||||
public string traduciEn(string lemma)
|
||||
{
|
||||
return user_std.UtSn.TraduciEn(lemma);
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-41
@@ -5,12 +5,8 @@ using System.Web.UI;
|
||||
|
||||
namespace MoonProTablet
|
||||
{
|
||||
public partial class fixODL : MpTabPage
|
||||
public partial class fixODL : BasePage
|
||||
{
|
||||
/// <summary>
|
||||
/// Oggetto datalayer specifico
|
||||
/// </summary>
|
||||
DataLayer DataLayerObj = new DataLayer();
|
||||
/// <summary>
|
||||
/// Caricamento pagina
|
||||
/// </summary>
|
||||
@@ -55,18 +51,6 @@ namespace MoonProTablet
|
||||
memLayer.ML.setSessionVal("IdxMacchina", value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica se la macchina MAIN sia MULTI (da DatiMacchina / redis...)
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Sotto sistema (macchina) selezionato
|
||||
/// </summary>
|
||||
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();
|
||||
}
|
||||
/// <summary>
|
||||
/// Verifica (su tab config) se sia abilitata la gestione flusso RPO (Richieste - Promesse - ODL)
|
||||
/// </summary>
|
||||
protected bool enableRPO
|
||||
{
|
||||
get
|
||||
{
|
||||
return memLayer.ML.cdvb("enableRPO");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Registra attivazione ODL per macchina corrente...
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
|
||||
+19
-19
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+42
-42
@@ -6,52 +6,52 @@ using System.Web;
|
||||
|
||||
namespace MoonProTablet
|
||||
{
|
||||
/// <summary>
|
||||
/// Descrizione di riepilogo per windowSize
|
||||
/// vedere https://techbrij.com/browser-height-width-server-responsive-design-asp-net
|
||||
/// </summary>
|
||||
public class windowSize : IHttpHandler, System.Web.SessionState.IRequiresSessionState
|
||||
{
|
||||
/// <summary>
|
||||
/// 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
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
public void ProcessRequest(HttpContext context)
|
||||
public class windowSize : IHttpHandler, System.Web.SessionState.IRequiresSessionState
|
||||
{
|
||||
context.Response.ContentType = "application/json";
|
||||
/// <summary>
|
||||
/// Processa la richeista andando a recuperare width-height del browser
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user