223 lines
7.0 KiB
C#
223 lines
7.0 KiB
C#
using SteamWare;
|
|
|
|
namespace AppData
|
|
{
|
|
public class mUtils
|
|
{
|
|
#region Public Fields
|
|
|
|
/// <summary>
|
|
/// Array di regole di sostituzione per valori Time
|
|
/// </summary>
|
|
public static string[] lRepCleanTime = memLayer.ML.CRS("confAddTaskCleanTime").Split('#');
|
|
|
|
/// <summary>
|
|
/// OPZIONE: indica che è da eseguire il preprocessing
|
|
/// </summary>
|
|
public static bool OptBCodePrepDo = memLayer.ML.CRB("OptBCodePrepDo");
|
|
|
|
/// <summary>
|
|
/// OPZIONE: indica che è abilitato BCode
|
|
/// </summary>
|
|
public static bool OptUseBCode = memLayer.ML.CRB("OptUseBCode");
|
|
|
|
/// <summary>
|
|
/// OPZIONE: indica che è abilitata selezione TAG
|
|
/// </summary>
|
|
public static bool OptUseSelTag = memLayer.ML.CRB("OptUseSelTag");
|
|
|
|
/// <summary>
|
|
/// OPZIONE: indica che è abilitata selezione TASK/COMMESSA
|
|
/// </summary>
|
|
public static bool OptUseSelTask = memLayer.ML.CRB("OptUseSelTask");
|
|
|
|
/// <summary>
|
|
/// RegExp x CONFERMA ADD
|
|
/// </summary>
|
|
public static string reAddNew = memLayer.ML.cdv("regExp_AddNew");
|
|
|
|
/// <summary>
|
|
/// Comando x CHIUSURA COMMESSA (NumTask)
|
|
/// </summary>
|
|
public static string reCmdClose = memLayer.ML.cdv("regExp_CmdClose");
|
|
|
|
/// <summary>
|
|
/// Comando x PAUSA (es COMMESSA/NumTask)
|
|
/// </summary>
|
|
public static string reCmdPause = memLayer.ML.cdv("regExp_CmdPause");
|
|
|
|
/// <summary>
|
|
/// Comando x RESET COMMESSA (NumTask)
|
|
/// </summary>
|
|
public static string reCmdResetNumTask = memLayer.ML.cdv("regExp_CmdResetNumTask");
|
|
|
|
/// <summary>
|
|
/// Comando x RESET OPERATORE
|
|
/// </summary>
|
|
public static string reCmdResetOper = memLayer.ML.cdv("regExp_CmdResetOper");
|
|
|
|
/// <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 POSTAZIONE
|
|
/// </summary>
|
|
public static string reCodPost = memLayer.ML.cdv("regExp_CodPost");
|
|
|
|
/// <summary>
|
|
/// RegExp x CONFERMA DELETE
|
|
/// </summary>
|
|
public static string reDelete = memLayer.ML.cdv("regExp_DEL");
|
|
|
|
/// <summary>
|
|
/// RegExp x Cod COMMESSA (NumTask)
|
|
/// </summary>
|
|
public static string reNumTask = memLayer.ML.cdv("regExp_NumTask");
|
|
|
|
/// <summary>
|
|
/// RegExp x Cod dati raw x preprocessare
|
|
/// </summary>
|
|
public static string rePreproc = memLayer.ML.cdv("regExp_Preproc");
|
|
|
|
/// <summary>
|
|
/// RegExp x Cod dati da TENERE post preprocessing
|
|
/// </summary>
|
|
public static string rePreprocKeep = memLayer.ML.cdv("regExp_PreprocKeep");
|
|
|
|
/// <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 TempoPrevisto
|
|
/// </summary>
|
|
public static string reTempoPrev = memLayer.ML.cdv("regExp_TimePrev");
|
|
|
|
/// <summary>
|
|
/// Fattore conversione tempo stimato letto da BCode (def 1 = NO conversione, 10=da dividere per 10)
|
|
/// </summary>
|
|
public static int TimeEstFactor = memLayer.ML.cdvi("confAddTaskTimeFactor");
|
|
|
|
#endregion Public Fields
|
|
|
|
#region Public Properties
|
|
|
|
/// <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 (string.IsNullOrEmpty(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>
|
|
/// oggetto valore opzionale letto 8e scorporato da barcode), es TAG in commessa + tag
|
|
/// </summary>
|
|
public static string optValueBC
|
|
{
|
|
get
|
|
{
|
|
string answ;
|
|
if (memLayer.ML.isInSessionObject("optValueBC"))
|
|
{
|
|
answ = memLayer.ML.StringSessionObj("optValueBC");
|
|
}
|
|
else
|
|
{
|
|
answ = "";
|
|
}
|
|
return answ;
|
|
}
|
|
set
|
|
{
|
|
memLayer.ML.setSessionVal("optValueBC", value, false);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Restituisce boolean 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());
|
|
}
|
|
}
|
|
|
|
#endregion Public Properties
|
|
}
|
|
} |