From 41427b6f696f71ec0e87c74ffb94f78310f2e8f3 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 19 Oct 2018 10:37:25 +0200 Subject: [PATCH] FIX lettura conf da DB / file x TAB --- MP-TAB/About.aspx | 2 +- MP-TAB/Default.aspx.cs | 2 +- MP-TAB/Logout.aspx.cs | 4 ++-- MP-TAB/Reset.aspx.cs | 2 +- MP-TAB/WebMasterPages/BootstrapNoUpdPnl.Master.cs | 2 +- MP-TAB/WebUserControls/cmp_newODL.ascx.cs | 2 +- MP-TAB/WebUserControls/mod_ODL.ascx.cs | 10 +++++----- MP-TAB/WebUserControls/mod_commenti.ascx.cs | 2 +- MP-TAB/WebUserControls/mod_confProd.ascx.cs | 6 +++--- MP-TAB/WebUserControls/mod_dettaglioProd.ascx.cs | 2 +- MP-TAB/WebUserControls/mod_dichiarazione.ascx.cs | 4 ++-- MP-TAB/WebUserControls/mod_enrollByAuthKey.ascx.cs | 4 ++-- .../WebUserControls/mod_enrollByJumperAuthKey.ascx.cs | 2 +- MP-TAB/WebUserControls/mod_insComm.ascx.cs | 2 +- MP-TAB/WebUserControls/mod_listUserAK.ascx.cs | 2 +- MP-TAB/WebUserControls/mod_selPeriodo.ascx.cs | 4 ++-- MP-TAB/utility.cs | 4 ++-- 17 files changed, 28 insertions(+), 28 deletions(-) diff --git a/MP-TAB/About.aspx b/MP-TAB/About.aspx index 90fbbee7..f61473f6 100644 --- a/MP-TAB/About.aspx +++ b/MP-TAB/About.aspx @@ -19,7 +19,7 @@
Module
<%--3 days ago--%> -

<%: SteamWare.memLayer.ML.confReadString("CodModulo") %>

+

<%: SteamWare.memLayer.ML.CRS("CodModulo") %>

<%--Altro.--%>
diff --git a/MP-TAB/Default.aspx.cs b/MP-TAB/Default.aspx.cs index 29527a83..c85a090c 100644 --- a/MP-TAB/Default.aspx.cs +++ b/MP-TAB/Default.aspx.cs @@ -7,7 +7,7 @@ namespace MoonProTablet { protected void Page_Load(object sender, EventArgs e) { - Response.Redirect(memLayer.ML.confReadString("mainPage")); + Response.Redirect(memLayer.ML.CRS("mainPage")); } } } \ No newline at end of file diff --git a/MP-TAB/Logout.aspx.cs b/MP-TAB/Logout.aspx.cs index 9ce32b79..9902fdde 100644 --- a/MP-TAB/Logout.aspx.cs +++ b/MP-TAB/Logout.aspx.cs @@ -9,7 +9,7 @@ namespace MoonProTablet protected void Page_Load(object sender, EventArgs e) { // elimina il device da db... - string cookieName = memLayer.ML.confReadString("cookieName"); + string cookieName = memLayer.ML.CRS("cookieName"); string devSecret = memLayer.ML.getCookieVal(cookieName); authProxy.removeDeviceByDevSec(devSecret); // elimina il cookie dal browser e l'utente loggato @@ -19,7 +19,7 @@ namespace MoonProTablet user_std.UtSn.logOffUtente(); Session.Clear(); // rimanda alla pagina di reg device - Response.Redirect(memLayer.ML.confReadString("mainPage")); + Response.Redirect(memLayer.ML.CRS("mainPage")); } } } \ No newline at end of file diff --git a/MP-TAB/Reset.aspx.cs b/MP-TAB/Reset.aspx.cs index 18d04806..b04a2d4d 100644 --- a/MP-TAB/Reset.aspx.cs +++ b/MP-TAB/Reset.aspx.cs @@ -11,7 +11,7 @@ namespace MoonProTablet // reset appConf memLayer.ML.resetAppConf(); // rimanda alla pagina di reg device - Response.Redirect(memLayer.ML.confReadString("mainPage")); + Response.Redirect(memLayer.ML.CRS("mainPage")); } } } \ No newline at end of file diff --git a/MP-TAB/WebMasterPages/BootstrapNoUpdPnl.Master.cs b/MP-TAB/WebMasterPages/BootstrapNoUpdPnl.Master.cs index 3aa25cb8..1a140c4a 100644 --- a/MP-TAB/WebMasterPages/BootstrapNoUpdPnl.Master.cs +++ b/MP-TAB/WebMasterPages/BootstrapNoUpdPnl.Master.cs @@ -34,7 +34,7 @@ namespace WebMasterPages /// private void setTimer() { - Timer1.Interval = SteamWare.memLayer.ML.confReadInt("intUpdatePagina_ms"); + Timer1.Interval = SteamWare.memLayer.ML.CRI("intUpdatePagina_ms"); } protected void Timer1_Tick(object sender, EventArgs e) { diff --git a/MP-TAB/WebUserControls/cmp_newODL.ascx.cs b/MP-TAB/WebUserControls/cmp_newODL.ascx.cs index 2fdbdfba..3d5035b2 100644 --- a/MP-TAB/WebUserControls/cmp_newODL.ascx.cs +++ b/MP-TAB/WebUserControls/cmp_newODL.ascx.cs @@ -64,7 +64,7 @@ namespace MoonProTablet.WebUserControls // invio email notifica creazione ODL PROVVISORIO (da riconciliare...) string subject = "Effettuato attrezzaggio con ODL provvisorio"; string oggetto = string.Format("E' stato effettuato unattrezzaggio con ODL provvisorio.
Macchina: {0}
Articolo: {1}
Lanciati {2} pezzi con T.Ciclo {3:N3} (min.cent) / {4}:{5} (min:sec).

Note operatore: {6}", macchina, articolo, numPz, tCiclo, numMin, numSec, note); - gestEmail.geAuth.mandaEmail(memLayer.ML.confReadString("_fromEmail"), memLayer.ML.confReadString("_adminEmail"), subject, oggetto); + gestEmail.geAuth.mandaEmail(memLayer.ML.CRS("_fromEmail"), memLayer.ML.CRS("_adminEmail"), subject, oggetto); // sollevo evento! if (eh_newVal != null) { diff --git a/MP-TAB/WebUserControls/mod_ODL.ascx.cs b/MP-TAB/WebUserControls/mod_ODL.ascx.cs index e07f5328..56a3b4f2 100644 --- a/MP-TAB/WebUserControls/mod_ODL.ascx.cs +++ b/MP-TAB/WebUserControls/mod_ODL.ascx.cs @@ -285,7 +285,7 @@ namespace MoonProTablet.WebUserControls if (needStRefresh) { // chiamo refresh MSE - DataLayer.obj.taMSE.getByRefreshData(memLayer.ML.confReadInt("refrMSE_0")); + DataLayer.obj.taMSE.getByRefreshData(memLayer.ML.CRI("refrMSE_0")); } lblOut.Text = userMsg; // loggo USR MSG @@ -413,7 +413,7 @@ namespace MoonProTablet.WebUserControls if (rigaOdl.TCAssegnato != TCRichAttr) { // invio email! - DataLayer.obj.sendWarnTcChangeReq(memLayer.ML.confReadString("_adminEmail")); + DataLayer.obj.sendWarnTcChangeReq(memLayer.ML.CRS("_adminEmail")); } // processo chiusura setup processaEvento(idxEvento, String.Format("Registrata inizio produzione per ODL {0}", idxODL), idxODL); @@ -486,7 +486,7 @@ namespace MoonProTablet.WebUserControls if (confZero) { // confermo produzione ZERO pezzi (in setup) - DataLayer.obj.confermaProdMacchina(idxMacchina, memLayer.ML.confReadInt("modoConfProd"), 0, 0, DateTime.Now); + DataLayer.obj.confermaProdMacchina(idxMacchina, memLayer.ML.CRI("modoConfProd"), 0, 0, DateTime.Now); } else // se NON sono in setup verifico se ho pz da confermare { @@ -494,7 +494,7 @@ namespace MoonProTablet.WebUserControls DS_ProdTempi.stp_PzProd_getByMacchinaRow rigaProd = DataLayer.obj.taPzProd2conf.GetData(idxMacchina)[0]; if (rigaProd.pezziNonConfermati > 0) { - DataLayer.obj.confermaProdMacchina(idxMacchina, memLayer.ML.confReadInt("modoConfProd"), rigaProd.pezziNonConfermati, 0, DateTime.Now); + DataLayer.obj.confermaProdMacchina(idxMacchina, memLayer.ML.CRI("modoConfProd"), rigaProd.pezziNonConfermati, 0, DateTime.Now); } } } @@ -553,7 +553,7 @@ namespace MoonProTablet.WebUserControls DataLayer.emptyCurrODL(idxMacchina); // invio email! - DataLayer.obj.sendWarnTcChangeReq(memLayer.ML.confReadString("_adminEmail")); + DataLayer.obj.sendWarnTcChangeReq(memLayer.ML.CRS("_adminEmail")); // processo chiusura setup processaEvento(idxEvento, String.Format("Registrato Riattrezzaggio ODL (old: {0})", currODL), currODL); // sistemo buttons! diff --git a/MP-TAB/WebUserControls/mod_commenti.ascx.cs b/MP-TAB/WebUserControls/mod_commenti.ascx.cs index 3c41db27..2b1b7c2a 100644 --- a/MP-TAB/WebUserControls/mod_commenti.ascx.cs +++ b/MP-TAB/WebUserControls/mod_commenti.ascx.cs @@ -54,7 +54,7 @@ namespace MoonProTablet.WebUserControls { get { - return memLayer.ML.confReadBool("commEnableEditDel"); + return memLayer.ML.CRB("commEnableEditDel"); } } diff --git a/MP-TAB/WebUserControls/mod_confProd.ascx.cs b/MP-TAB/WebUserControls/mod_confProd.ascx.cs index 86eb01c3..730c8c48 100644 --- a/MP-TAB/WebUserControls/mod_confProd.ascx.cs +++ b/MP-TAB/WebUserControls/mod_confProd.ascx.cs @@ -381,7 +381,7 @@ namespace MoonProTablet.WebUserControls confermaPerGiorni(); } // refresh tabella dati tablet... - DataLayer.obj.taMSE.getByRefreshData(memLayer.ML.confReadInt("refrMSE_0")); + DataLayer.obj.taMSE.getByRefreshData(memLayer.ML.CRI("refrMSE_0")); // mostro output lblOut.Text = string.Format("Confermata la produzione per {0} pezzi! (+{1} pz scarto) alle {2:yyyy-MM-dd HH:mm:ss}", numPzConfermati, numPzScarto2Rec, dtReqUpdate); // cambio button conferma... @@ -398,14 +398,14 @@ namespace MoonProTablet.WebUserControls /// private void confermaPerGiorni() { - DataLayer.obj.confermaProdMacchina(idxMacchina, memLayer.ML.confReadInt("modoConfProd"), numPzConfermati, numPzScarto2Rec, dtReqUpdate); + DataLayer.obj.confermaProdMacchina(idxMacchina, memLayer.ML.CRI("modoConfProd"), numPzConfermati, numPzScarto2Rec, dtReqUpdate); } /// /// effettua conferma per turni della produzione /// private void confermaPerTurni() { - DataLayer.obj.confermaProdMacchina(idxMacchina, memLayer.ML.confReadInt("modoConfProd"), numPzConfermati, numPzScarto2Rec, dtReqUpdate); + DataLayer.obj.confermaProdMacchina(idxMacchina, memLayer.ML.CRI("modoConfProd"), numPzConfermati, numPzScarto2Rec, dtReqUpdate); } /// /// update post modifica pz buoni diff --git a/MP-TAB/WebUserControls/mod_dettaglioProd.ascx.cs b/MP-TAB/WebUserControls/mod_dettaglioProd.ascx.cs index 1afc89a1..da2e2b45 100644 --- a/MP-TAB/WebUserControls/mod_dettaglioProd.ascx.cs +++ b/MP-TAB/WebUserControls/mod_dettaglioProd.ascx.cs @@ -30,7 +30,7 @@ namespace MoonProTablet.WebUserControls private void popolaLabels() { // cambio: leggo NUOVA riga report... - DS_ProdTempi.MappaStatoExplDataTable tabDati = DataLayer.obj.taMSE.getByRefreshData(memLayer.ML.confReadInt("refrMSE_5")); + DS_ProdTempi.MappaStatoExplDataTable tabDati = DataLayer.obj.taMSE.getByRefreshData(memLayer.ML.CRI("refrMSE_5")); DS_ProdTempi.MappaStatoExplRow rigaDati = (DS_ProdTempi.MappaStatoExplRow)tabDati.Rows.Find(idxMacchina); // carico le info! lblOdl.Text = string.Format("ODL num: {0}, iniziato il {1:dd/MM/yy} alle {1:HH:mm}", rigaDati.idxODL, rigaDati.DataInizioODL); diff --git a/MP-TAB/WebUserControls/mod_dichiarazione.ascx.cs b/MP-TAB/WebUserControls/mod_dichiarazione.ascx.cs index 79dd6c65..802db630 100644 --- a/MP-TAB/WebUserControls/mod_dichiarazione.ascx.cs +++ b/MP-TAB/WebUserControls/mod_dichiarazione.ascx.cs @@ -107,7 +107,7 @@ namespace MoonProTablet.WebUserControls // recupero data/ora evento da inserire (quella selezionata) ed AGGIUNGO 1 sec!!! così rimane traccia controllerMapo.scriviRigaEventoBarcode(idxMacchina, idxEvento, rigaStato.CodArticolo, commento, DataLayer.MatrOpr, rigaStato.pallet, dataOraEv.AddSeconds(1), DateTime.Now); // eseguo ricalcolo! - DateTime startRicalcolo = dataOraEv.AddMinutes(memLayer.ML.confReadInt("minAnticipoRicalcolo")); + DateTime startRicalcolo = dataOraEv.AddMinutes(memLayer.ML.CRI("minAnticipoRicalcolo")); // leggo parametri x esecuzione... int rdm_nEvStep = memLayer.ML.CRI("rdm_nEvStep"); @@ -163,7 +163,7 @@ namespace MoonProTablet.WebUserControls bool answ = true; try { - if (Math.Abs(dataOraEv.Subtract(DateTime.Now).TotalMinutes) > memLayer.ML.confReadInt("dltMinRealtime")) + if (Math.Abs(dataOraEv.Subtract(DateTime.Now).TotalMinutes) > memLayer.ML.CRI("dltMinRealtime")) { answ = false; } diff --git a/MP-TAB/WebUserControls/mod_enrollByAuthKey.ascx.cs b/MP-TAB/WebUserControls/mod_enrollByAuthKey.ascx.cs index d846a0d4..fef856b2 100644 --- a/MP-TAB/WebUserControls/mod_enrollByAuthKey.ascx.cs +++ b/MP-TAB/WebUserControls/mod_enrollByAuthKey.ascx.cs @@ -41,7 +41,7 @@ namespace MoonProTablet.WebUserControls DeviceName = Request.UserHostName; IPv4 = Request.UserHostName; // calcolo authKey MD5... - string md5UserAuthKey = SteamCrypto.EncryptString(plainUserAuthKey, memLayer.ML.confReadString("cookieName")); + string md5UserAuthKey = SteamCrypto.EncryptString(plainUserAuthKey, memLayer.ML.CRS("cookieName")); if (DataLayer.obj.taOp.getByMatrAuthKey(MatrOpr, md5UserAuthKey).Rows.Count > 0) { fatto = tryEnroll(MatrOpr, userAgent, fatto, DeviceName, IPv4, md5UserAuthKey); @@ -69,7 +69,7 @@ namespace MoonProTablet.WebUserControls } if (fatto) { - Response.Redirect(memLayer.ML.confReadString("mainPage"), true); + Response.Redirect(memLayer.ML.CRS("mainPage"), true); } } /// diff --git a/MP-TAB/WebUserControls/mod_enrollByJumperAuthKey.ascx.cs b/MP-TAB/WebUserControls/mod_enrollByJumperAuthKey.ascx.cs index 7f358da6..4623b954 100644 --- a/MP-TAB/WebUserControls/mod_enrollByJumperAuthKey.ascx.cs +++ b/MP-TAB/WebUserControls/mod_enrollByJumperAuthKey.ascx.cs @@ -40,7 +40,7 @@ namespace MoonProTablet.WebUserControls fatto = DataLayer.obj.enrollDevice(UserAuthKey, IPv4, DeviceName, userAgent, MatrOpr); if (fatto) { - Response.Redirect(memLayer.ML.confReadString("mainPage")); + Response.Redirect(memLayer.ML.CRS("mainPage")); } } } diff --git a/MP-TAB/WebUserControls/mod_insComm.ascx.cs b/MP-TAB/WebUserControls/mod_insComm.ascx.cs index 5da5e81c..3b02d645 100644 --- a/MP-TAB/WebUserControls/mod_insComm.ascx.cs +++ b/MP-TAB/WebUserControls/mod_insComm.ascx.cs @@ -74,7 +74,7 @@ namespace MoonProTablet.WebUserControls { // salvo! string idxMacchina = memLayer.ML.StringSessionObj("idxMacchina"); - int idxTipo = memLayer.ML.confReadInt("idxTipoCommento"); + int idxTipo = memLayer.ML.CRI("idxTipoCommento"); string CodArticolo = "ND"; try { diff --git a/MP-TAB/WebUserControls/mod_listUserAK.ascx.cs b/MP-TAB/WebUserControls/mod_listUserAK.ascx.cs index b42f0278..f9b739ec 100644 --- a/MP-TAB/WebUserControls/mod_listUserAK.ascx.cs +++ b/MP-TAB/WebUserControls/mod_listUserAK.ascx.cs @@ -17,7 +17,7 @@ namespace MoonProTablet.WebUserControls public string encodeAuthKey(object plainUserAuthKey) { string answ = ""; - answ = SteamCrypto.EncryptString(plainUserAuthKey.ToString(), memLayer.ML.confReadString("cookieName")); + answ = SteamCrypto.EncryptString(plainUserAuthKey.ToString(), memLayer.ML.CRS("cookieName")); return answ; } } diff --git a/MP-TAB/WebUserControls/mod_selPeriodo.ascx.cs b/MP-TAB/WebUserControls/mod_selPeriodo.ascx.cs index 7fd045f0..52c22025 100644 --- a/MP-TAB/WebUserControls/mod_selPeriodo.ascx.cs +++ b/MP-TAB/WebUserControls/mod_selPeriodo.ascx.cs @@ -53,7 +53,7 @@ namespace MoonProTablet.WebUserControls // leggo da sessione e salvo... try { - answ = memLayer.ML.confReadBool("mostraSelOra"); + answ = memLayer.ML.CRB("mostraSelOra"); } catch { } @@ -159,7 +159,7 @@ namespace MoonProTablet.WebUserControls catch { _intervallo = new intervalloDate(); - _intervallo.inizio = DateTime.Now.AddDays(memLayer.ML.confReadInt("defDayFrom")); + _intervallo.inizio = DateTime.Now.AddDays(memLayer.ML.CRI("defDayFrom")); _intervallo.fine = DateTime.Now.AddDays(1); Session["_intervallo"] = _intervallo; Session["_inizio"] = _intervallo.inizio; diff --git a/MP-TAB/utility.cs b/MP-TAB/utility.cs index 01886391..a431a711 100644 --- a/MP-TAB/utility.cs +++ b/MP-TAB/utility.cs @@ -22,11 +22,11 @@ namespace MoonProTablet } catch { } - if (minuti < memLayer.ML.confReadInt("maxMinuti")) + if (minuti < memLayer.ML.CRI("maxMinuti")) { answ = string.Format("{0}m {1}s", tempo.Minute, tempo.Second); } - else if (minuti < memLayer.ML.confReadInt("maxOre")) + else if (minuti < memLayer.ML.CRI("maxOre")) { answ = string.Format("{0}h {1}m", tempo.Hour, tempo.Minute); }