120 lines
3.1 KiB
C#
120 lines
3.1 KiB
C#
using SteamWare;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace AppData
|
|
{
|
|
public class mUtils
|
|
{
|
|
|
|
#region definizione Regexp
|
|
/// <summary>
|
|
/// RegExp x Cod ARTICOLO
|
|
/// </summary>
|
|
public static string reCodArt = memLayer.ML.cdv("regExp_CodArt");
|
|
/// <summary>
|
|
/// RegExp x Cod OPERATORE
|
|
/// </summary>
|
|
public static string reCodOper = memLayer.ML.cdv("regExp_CodOper");
|
|
/// <summary>
|
|
/// RegExp x Cod COMMESSA
|
|
/// </summary>
|
|
public static string reNumTask = memLayer.ML.cdv("regExp_NumTask");
|
|
/// <summary>
|
|
/// RegExp x QTA
|
|
/// </summary>
|
|
public static string reQta = memLayer.ML.cdv("regExp_QtaRic");
|
|
/// <summary>
|
|
/// RegExp x RESET / CANCEL
|
|
/// </summary>
|
|
public static string reReset = memLayer.ML.cdv("regExp_KO");
|
|
/// <summary>
|
|
/// RegExp x CONFERMA
|
|
/// </summary>
|
|
public static string reAddNew = memLayer.ML.cdv("regExp_AddNew");
|
|
/// <summary>
|
|
/// RegExp x CONFERMA
|
|
/// </summary>
|
|
public static string reDelete = memLayer.ML.cdv("regExp_DEL");
|
|
|
|
#endregion
|
|
|
|
/// <summary>
|
|
/// Codice Operatore
|
|
/// </summary>
|
|
public static string CodOpr
|
|
{
|
|
get
|
|
{
|
|
string answ = "";
|
|
answ = memLayer.ML.StringSessionObj("CodOpr");
|
|
// se vuoto cerco anche nei cookies...
|
|
if (answ == "")
|
|
{
|
|
answ = memLayer.ML.getCookieVal("CTrack_CodOpr");
|
|
// se non vuoto salvo...
|
|
memLayer.ML.setSessionVal("CodOpr", answ);
|
|
}
|
|
return answ;
|
|
}
|
|
set
|
|
{
|
|
memLayer.ML.setSessionVal("CodOpr", value);
|
|
memLayer.ML.setCookieVal("CTrack_CodOpr", value);
|
|
memLayer.ML.emptySessionVal("NomeOpr");
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Codice postazione di lavoro
|
|
/// </summary>
|
|
public static string CodPost
|
|
{
|
|
get
|
|
{
|
|
string answ = "";
|
|
answ = memLayer.ML.StringSessionObj("CodPost");
|
|
if (answ == "")
|
|
{
|
|
answ = memLayer.ML.getCookieVal("CTrack_CodPost");
|
|
// se non vuoto salvo...
|
|
memLayer.ML.setSessionVal("CodPost", answ);
|
|
}
|
|
return answ;
|
|
}
|
|
set
|
|
{
|
|
memLayer.ML.setSessionVal("CodPost", value);
|
|
memLayer.ML.setCookieVal("CTrack_CodPost", value);
|
|
memLayer.ML.emptySessionVal("DescPost");
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Restituisceboolean se post corrente sia multi operatore
|
|
/// </summary>
|
|
public static bool postIsMulti
|
|
{
|
|
get
|
|
{
|
|
bool answ = false;
|
|
if (memLayer.ML.isInSessionObject("postIsMulti"))
|
|
{
|
|
answ = memLayer.ML.BoolSessionObj("postIsMulti");
|
|
}
|
|
else
|
|
{
|
|
string rawAnsw = memLayer.ML.getCookieVal("CTrack_postIsMulti");
|
|
bool.TryParse(rawAnsw, out answ);
|
|
// se non vuoto salvo...
|
|
memLayer.ML.setSessionVal("postIsMulti", answ);
|
|
}
|
|
return answ;
|
|
}
|
|
set
|
|
{
|
|
memLayer.ML.setSessionVal("postIsMulti", value);
|
|
memLayer.ML.setCookieVal("CTrack_postIsMulti", value.ToString());
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|