using SteamWare; namespace AppData { public class mUtils { #region Public Fields /// /// Array di regole di sostituzione per valori Time /// public static string[] lRepCleanTime = memLayer.ML.CRS("confAddTaskCleanTime").Split('#'); /// /// OPZIONE: indica che è da eseguire il preprocessing /// public static bool OptBCodePrepDo = memLayer.ML.CRB("OptBCodePrepDo"); /// /// OPZIONE: indica che è abilitato BCode /// public static bool OptUseBCode = memLayer.ML.CRB("OptUseBCode"); /// /// OPZIONE: indica che è abilitata selezione TAG /// public static bool OptUseSelTag = memLayer.ML.CRB("OptUseSelTag"); /// /// OPZIONE: indica che è abilitata selezione TASK/COMMESSA /// public static bool OptUseSelTask = memLayer.ML.CRB("OptUseSelTask"); /// /// RegExp x CONFERMA ADD /// public static string reAddNew = memLayer.ML.cdv("regExp_AddNew"); /// /// Comando x CHIUSURA COMMESSA (NumTask) /// public static string reCmdClose = memLayer.ML.cdv("regExp_CmdClose"); /// /// Comando x PAUSA (es COMMESSA/NumTask) /// public static string reCmdPause = memLayer.ML.cdv("regExp_CmdPause"); /// /// Comando x RESET COMMESSA (NumTask) /// public static string reCmdResetNumTask = memLayer.ML.cdv("regExp_CmdResetNumTask"); /// /// Comando x RESET OPERATORE /// public static string reCmdResetOper = memLayer.ML.cdv("regExp_CmdResetOper"); /// /// RegExp x Cod ARTICOLO /// public static string reCodArt = memLayer.ML.cdv("regExp_CodArt"); /// /// RegExp x Cod OPERATORE /// public static string reCodOper = memLayer.ML.cdv("regExp_CodOper"); /// /// RegExp x Cod POSTAZIONE /// public static string reCodPost = memLayer.ML.cdv("regExp_CodPost"); /// /// RegExp x CONFERMA DELETE /// public static string reDelete = memLayer.ML.cdv("regExp_DEL"); /// /// RegExp x Cod COMMESSA (NumTask) /// public static string reNumTask = memLayer.ML.cdv("regExp_NumTask"); /// /// RegExp x Cod dati raw x preprocessare /// public static string rePreproc = memLayer.ML.cdv("regExp_Preproc"); /// /// RegExp x Cod dati da TENERE post preprocessing /// public static string rePreprocKeep = memLayer.ML.cdv("regExp_PreprocKeep"); /// /// RegExp x QTA /// public static string reQta = memLayer.ML.cdv("regExp_QtaRic"); /// /// RegExp x RESET / CANCEL /// public static string reReset = memLayer.ML.cdv("regExp_KO"); /// /// RegExp x TempoPrevisto /// public static string reTempoPrev = memLayer.ML.cdv("regExp_TimePrev"); /// /// Fattore conversione tempo stimato letto da BCode (def 1 = NO conversione, 10=da dividere per 10) /// public static int TimeEstFactor = memLayer.ML.cdvi("confAddTaskTimeFactor"); #endregion Public Fields #region Public Properties /// /// Codice Operatore /// 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"); } } /// /// Codice postazione di lavoro /// 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"); } } /// /// oggetto valore opzionale letto 8e scorporato da barcode), es TAG in commessa + tag /// 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); } } /// /// Restituisce boolean se post corrente sia multi operatore /// 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 } }