diff --git a/AppData/dataLayer.cs b/AppData/dataLayer.cs index e451558..3c886f3 100644 --- a/AppData/dataLayer.cs +++ b/AppData/dataLayer.cs @@ -83,7 +83,7 @@ namespace AppData /// /// avvio classe /// - protected dataLayer() + public dataLayer() { avvioTA(); setupConnectionStringBase(); diff --git a/AppData/mongocrypt.dll b/AppData/mongocrypt.dll new file mode 100644 index 0000000..3cc3634 Binary files /dev/null and b/AppData/mongocrypt.dll differ diff --git a/AppData/stateMachine.cs b/AppData/stateMachine.cs index bc999d5..f223541 100644 --- a/AppData/stateMachine.cs +++ b/AppData/stateMachine.cs @@ -3,107 +3,107 @@ using System.Text.RegularExpressions; namespace AppData { - /// - /// macchina di gestione degli stati - /// - public class stateMachine - { + /// + /// macchina di gestione degli stati + /// + public class stateMachine + { - protected DS_AppTableAdapters.AnagEventiTableAdapter taEv; - protected DS_AppTableAdapters.TraEv2StatiTableAdapter taEv2St; - //protected DS_applicazioneTableAdapters.IstObjTableAdapter taIstObj; - protected stateMachine() - { - avvioTA(); - setupConnectionStringBase(); - } - /// - /// avvia table adapters - /// - private void avvioTA() - { - taEv = new DS_AppTableAdapters.AnagEventiTableAdapter(); - taEv2St = new DS_AppTableAdapters.TraEv2StatiTableAdapter(); - //taIstObj = new DS_applicazioneTableAdapters.IstObjTableAdapter(); - } - /// - /// effettua setup dei connection strings da web.config della singola applicazione - /// - protected virtual void setupConnectionStringBase() - { - string connString = memLayer.ML.confReadString("CTrackConnectionString"); - // connections strings del db - taEv.Connection.ConnectionString = connString; - taEv2St.Connection.ConnectionString = connString; - //taIstObj.Connection.ConnectionString = connString; - } - public static stateMachine st = new stateMachine(); - /// - /// restituisce il tipo di comando associato... - /// - /// - /// - public tipoAzione azioneComando(inputComando comando) - { - Match testNumTask = Regex.Match(comando.valore, mUtils.reNumTask); - Match testOper = Regex.Match(comando.valore, mUtils.reCodOper); - Match testPost = Regex.Match(comando.valore, mUtils.reCodPost); - tipoAzione _azione = tipoAzione.noAct; - // se è un SET OPR o POST è un azione IMPLICITA... - if (testOper.Success || testPost.Success) - { - _azione = tipoAzione.esegui; - } - else if (testNumTask.Success) - { - _azione = tipoAzione.esegui; - } - else if (dataLayer.man.taAF.getByKey(comando.currCmdIn).Rows.Count > 0) - { - _azione = tipoAzione.esegui; - } - else - { - // altrimenti controllo azione - string toDo = ""; - try + protected DS_AppTableAdapters.AnagEventiTableAdapter taEv; + protected DS_AppTableAdapters.TraEv2StatiTableAdapter taEv2St; + //protected DS_applicazioneTableAdapters.IstObjTableAdapter taIstObj; + protected stateMachine() { - toDo = taEv.getByKey(comando.currCmdIn)[0].Action; + avvioTA(); + setupConnectionStringBase(); } - catch - { } - switch (toDo) + /// + /// avvia table adapters + /// + private void avvioTA() { - case "ok": - _azione = tipoAzione.conferma; - break; - case "ko": - _azione = tipoAzione.annulla; - break; - case "act": - _azione = tipoAzione.esegui; - break; - default: - _azione = tipoAzione.noAct; - break; + taEv = new DS_AppTableAdapters.AnagEventiTableAdapter(); + taEv2St = new DS_AppTableAdapters.TraEv2StatiTableAdapter(); + //taIstObj = new DS_applicazioneTableAdapters.IstObjTableAdapter(); + } + /// + /// effettua setup dei connection strings da web.config della singola applicazione + /// + protected virtual void setupConnectionStringBase() + { + string connString = memLayer.ML.confReadString("CTrackConnectionString"); + // connections strings del db + taEv.Connection.ConnectionString = connString; + taEv2St.Connection.ConnectionString = connString; + //taIstObj.Connection.ConnectionString = connString; + } + public static stateMachine st = new stateMachine(); + /// + /// restituisce il tipo di comando associato... + /// + /// + /// + public tipoAzione azioneComando(inputComando comando) + { + Match testNumTask = Regex.Match(comando.valore, mUtils.reNumTask); + Match testOper = Regex.Match(comando.valore, mUtils.reCodOper); + Match testPost = Regex.Match(comando.valore, mUtils.reCodPost); + tipoAzione _azione = tipoAzione.noAct; + // se è un SET OPR o POST è un azione IMPLICITA... + if (testOper.Success || testPost.Success) + { + _azione = tipoAzione.esegui; + } + else if (testNumTask.Success) + { + _azione = tipoAzione.esegui; + } + else if (dataLayer.man.taAF.getByKey(comando.currCmdIn).Rows.Count > 0) + { + _azione = tipoAzione.esegui; + } + else + { + // altrimenti controllo azione + string toDo = ""; + try + { + toDo = taEv.getByKey(comando.currCmdIn)[0].Action; + } + catch + { } + switch (toDo) + { + case "ok": + _azione = tipoAzione.conferma; + break; + case "ko": + _azione = tipoAzione.annulla; + break; + case "act": + _azione = tipoAzione.esegui; + break; + default: + _azione = tipoAzione.noAct; + break; + } + } + return _azione; } - } - return _azione; } - } - public enum tipoAzione - { - annulla, - conferma, - esegui, - noAct, - setup - } - public enum tipoEsito - { - error, - ok, - undef - } + public enum tipoAzione + { + annulla, + conferma, + esegui, + noAct, + setup + } + public enum tipoEsito + { + error, + ok, + undef + } } \ No newline at end of file diff --git a/C-TRACK/BasePage.cs b/C-TRACK/BasePage.cs new file mode 100644 index 0000000..8e4c464 --- /dev/null +++ b/C-TRACK/BasePage.cs @@ -0,0 +1,13 @@ +using AppData; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; + +namespace C_TRACK +{ + public class BasePage : System.Web.UI.Page + { + protected dataLayer DLMan = new dataLayer(); + } +} \ No newline at end of file diff --git a/C-TRACK/BaseUserControl.cs b/C-TRACK/BaseUserControl.cs index d920eab..5cccf15 100644 --- a/C-TRACK/BaseUserControl.cs +++ b/C-TRACK/BaseUserControl.cs @@ -1,4 +1,5 @@ -using Newtonsoft.Json; +using AppData; +using Newtonsoft.Json; using SteamWare; using System; using System.Collections.Generic; @@ -11,6 +12,8 @@ namespace C_TRACK { #region Public Events + protected dataLayer DLMan = new dataLayer(); + /// /// Generico evento di richiesta refresh a aprent /// diff --git a/C-TRACK/C-TRACK.csproj b/C-TRACK/C-TRACK.csproj index 579470e..6401968 100644 --- a/C-TRACK/C-TRACK.csproj +++ b/C-TRACK/C-TRACK.csproj @@ -550,6 +550,9 @@ barcode.aspx + + ASPXCodeBehind + ASPXCodeBehind diff --git a/C-TRACK/WebUserControls/mod_addTask.ascx.cs b/C-TRACK/WebUserControls/mod_addTask.ascx.cs index 6410b93..55b6a97 100644 --- a/C-TRACK/WebUserControls/mod_addTask.ascx.cs +++ b/C-TRACK/WebUserControls/mod_addTask.ascx.cs @@ -6,7 +6,7 @@ using System.Text.RegularExpressions; namespace C_TRACK.WebUserControls { - public partial class mod_addTask : System.Web.UI.UserControl + public partial class mod_addTask : BaseUserControl { #region Public Events @@ -135,7 +135,7 @@ namespace C_TRACK.WebUserControls else if (testDelete.Success) { // creo... - dataLayer.man.taTL.deleteQuery(NumTask); + DLMan.taTL.deleteQuery(NumTask); // resetto! CodArticolo = ""; NumTask = ""; @@ -160,7 +160,7 @@ namespace C_TRACK.WebUserControls if (Quantita > 0 && !string.IsNullOrEmpty(CodArticolo) && !string.IsNullOrEmpty(NumTask) && (!confAddTaskReqTime || TimeEst > 0)) { // creo... - dataLayer.man.taTL.insertQuery(NumTask, CodArticolo, Quantita, TimeEst); + DLMan.taTL.insertQuery(NumTask, CodArticolo, Quantita, TimeEst); // resetto! CodArticolo = ""; NumTask = ""; @@ -212,14 +212,14 @@ namespace C_TRACK.WebUserControls // non match con RegExp --> ricerca ESPLICITA, se abilitato ricerca estesa if (memLayer.ML.CRB("OptEnableMapoIn") && !(testCodArt.Success || testNumTask.Success)) { - var tabArt = dataLayer.man.taAnArt.getByKey(value); + var tabArt = DLMan.taAnArt.getByKey(value); if (tabArt.Rows.Count > 0) { CodArticolo = value; } else { - var tabTask = dataLayer.man.taTL.getByKey(value); + var tabTask = DLMan.taTL.getByKey(value); if (tabTask.Rows.Count > 0) { NumTask = value; diff --git a/C-TRACK/WebUserControls/mod_btnComandi.ascx.cs b/C-TRACK/WebUserControls/mod_btnComandi.ascx.cs index b606e68..1f04f28 100644 --- a/C-TRACK/WebUserControls/mod_btnComandi.ascx.cs +++ b/C-TRACK/WebUserControls/mod_btnComandi.ascx.cs @@ -5,143 +5,143 @@ using System.Web.UI.WebControls; namespace C_TRACK.WebUserControls { - public partial class mod_btnComandi : System.Web.UI.UserControl - { - /// - /// Codice TASK corrente - /// - public string CurrNumTask + public partial class mod_btnComandi : BaseUserControl { - get - { - return memLayer.ML.StringSessionObj("CurrNumTask"); - } - set - { - memLayer.ML.setSessionVal("CurrNumTask", value); - } - } - /// - /// evento comando clicked - /// - public event EventHandler eh_clickComando; - - protected void Page_Load(object sender, EventArgs e) - { - updateBtn(); - } - /// - /// segnala click su button comando - /// - public void segnalaClick() - { - eh_clickComando?.Invoke(this, new EventArgs()); - } - - protected void lbtCmd_Click(object sender, EventArgs e) - { - // PROCEDO SOLO SE non ho veto... - if (!hasVeto) - { - LinkButton lb = (LinkButton)sender; - memLayer.ML.setSessionVal("btnCmdPress", lb.CommandArgument, false); - segnalaClick(); - } - else - { - updateBtn(); - } - } - - public void updateBtn() - { - // verifico se ho comandi PREVALENTI (es: ho UNA FASE APERTA) - if (mUtils.CodOpr != "") - { - var tabTR = dataLayer.man.taTR.getAttiveByOpr(mUtils.CodOpr); - if (tabTR.Rows.Count > 0) + /// + /// Codice TASK corrente + /// + public string CurrNumTask { - // se NON HO una commessa attiva, SELEZIONO la PRIMA commessa aperta... - if (CurrNumTask == "") - { - CurrNumTask = tabTR[0].NumTask; - } + get + { + return memLayer.ML.StringSessionObj("CurrNumTask"); + } + set + { + memLayer.ML.setSessionVal("CurrNumTask", value); + } } - } + /// + /// evento comando clicked + /// + public event EventHandler eh_clickComando; - // controllo se HO una fase corrente... - repComandi.Visible = !hasVeto; - if (!hasVeto) - { - // altrimenti imposto fasi da postazione... - repComandi.DataBind(); - } - } - /// - /// Verifica btn siano abilitati e nel caso x css aggiunge DISABLED - /// - ho una commessa - /// - la commessa NON E' chiusa... - /// - public string datiCommessa - { - get - { - string answ = ""; - // controllos e ho in sessione numTask altrimenti NON E' abilitato... - if (CurrNumTask == "") + protected void Page_Load(object sender, EventArgs e) { - // se NON E' multi - if (mUtils.postIsMulti) - { - answ = "<-- Gestione commesse"; - } - else - { - answ = "Manca Commessa"; - } + updateBtn(); } - else + /// + /// segnala click su button comando + /// + public void segnalaClick() { - answ = hasVeto ? "Commessa Chiusa: " + CurrNumTask.ToString() : ""; + eh_clickComando?.Invoke(this, new EventArgs()); } - return answ; - } - } - /// - /// Verifica se la commessa sia assente/chiusa - /// - public bool hasVeto - { - get - { - bool answ = false; - bool noTask = CurrNumTask == ""; - bool isChiuso = false; - try + + protected void lbtCmd_Click(object sender, EventArgs e) { - isChiuso = dataLayer.man.taTL.getByKey(CurrNumTask)[0].Concluso; + // PROCEDO SOLO SE non ho veto... + if (!hasVeto) + { + LinkButton lb = (LinkButton)sender; + memLayer.ML.setSessionVal("btnCmdPress", lb.CommandArgument, false); + segnalaClick(); + } + else + { + updateBtn(); + } + } + + public void updateBtn() + { + // verifico se ho comandi PREVALENTI (es: ho UNA FASE APERTA) + if (mUtils.CodOpr != "") + { + var tabTR = DLMan.taTR.getAttiveByOpr(mUtils.CodOpr); + if (tabTR.Rows.Count > 0) + { + // se NON HO una commessa attiva, SELEZIONO la PRIMA commessa aperta... + if (CurrNumTask == "") + { + CurrNumTask = tabTR[0].NumTask; + } + } + } + + // controllo se HO una fase corrente... + repComandi.Visible = !hasVeto; + if (!hasVeto) + { + // altrimenti imposto fasi da postazione... + repComandi.DataBind(); + } + } + /// + /// Verifica btn siano abilitati e nel caso x css aggiunge DISABLED + /// - ho una commessa + /// - la commessa NON E' chiusa... + /// + public string datiCommessa + { + get + { + string answ = ""; + // controllos e ho in sessione numTask altrimenti NON E' abilitato... + if (CurrNumTask == "") + { + // se NON E' multi + if (mUtils.postIsMulti) + { + answ = "<-- Gestione commesse"; + } + else + { + answ = "Manca Commessa"; + } + } + else + { + answ = hasVeto ? "Commessa Chiusa: " + CurrNumTask.ToString() : ""; + } + return answ; + } + } + /// + /// Verifica se la commessa sia assente/chiusa + /// + public bool hasVeto + { + get + { + bool answ = false; + bool noTask = CurrNumTask == ""; + bool isChiuso = false; + try + { + isChiuso = DLMan.taTL.getByKey(CurrNumTask)[0].Concluso; + } + catch + { } + // controllos e ho in sessione numTask altrimenti NON E' abilitato... + answ = noTask || isChiuso; + return answ; + } + } + /// + /// Verifica btn siano abilitati e nel caso x css aggiunge DISABLED + /// - ho una commessa + /// - la commessa NON E' chiusa... + /// + public string cssEnabled + { + get + { + string answ = ""; + // controllos e ho in sessione numTask altrimenti NON E' abilitato... + answ = hasVeto ? "disabled" : ""; + return answ; + } } - catch - { } - // controllos e ho in sessione numTask altrimenti NON E' abilitato... - answ = noTask || isChiuso; - return answ; - } } - /// - /// Verifica btn siano abilitati e nel caso x css aggiunge DISABLED - /// - ho una commessa - /// - la commessa NON E' chiusa... - /// - public string cssEnabled - { - get - { - string answ = ""; - // controllos e ho in sessione numTask altrimenti NON E' abilitato... - answ = hasVeto ? "disabled" : ""; - return answ; - } - } - } } \ No newline at end of file diff --git a/C-TRACK/WebUserControls/mod_checkPost.ascx.cs b/C-TRACK/WebUserControls/mod_checkPost.ascx.cs index ec423bb..432c80a 100644 --- a/C-TRACK/WebUserControls/mod_checkPost.ascx.cs +++ b/C-TRACK/WebUserControls/mod_checkPost.ascx.cs @@ -4,35 +4,35 @@ using System; namespace C_TRACK.WebUserControls { - public partial class mod_checkPost : System.Web.UI.UserControl - { - protected void Page_Load(object sender, EventArgs e) + public partial class mod_checkPost : BaseUserControl { - // se ho operatore in sessione ma NON HO postazione... cerco di recuperare postazione - if (mUtils.CodOpr != "" && mUtils.CodPost == "") - { - // cerco da tab se ha una postazione (prendo la prima...) - var righeOpr = dataLayer.man.taAP.getByOpr(mUtils.CodOpr); - if (righeOpr.Rows.Count > 0) + protected void Page_Load(object sender, EventArgs e) { - mUtils.CodPost = righeOpr[0].CodPost; + // se ho operatore in sessione ma NON HO postazione... cerco di recuperare postazione + if (mUtils.CodOpr != "" && mUtils.CodPost == "") + { + // cerco da tab se ha una postazione (prendo la prima...) + var righeOpr = DLMan.taAP.getByOpr(mUtils.CodOpr); + if (righeOpr.Rows.Count > 0) + { + mUtils.CodPost = righeOpr[0].CodPost; + } + } + // verifico di avere CodOpr in sessione... + if (mUtils.CodPost == "") + { + // mostro warning.. + divWarning.Visible = true; + // se NON sono in pagina bcode --> rimando a richiesta dichiarazione POSTAZIONE (con BARCODE) + if (devicesAuthProxy.pagCorrente != "barcode") + { + Response.Redirect("~/barcode"); + } + } + else + { + divWarning.Visible = false; + } } - } - // verifico di avere CodOpr in sessione... - if (mUtils.CodPost == "") - { - // mostro warning.. - divWarning.Visible = true; - // se NON sono in pagina bcode --> rimando a richiesta dichiarazione POSTAZIONE (con BARCODE) - if (devicesAuthProxy.pagCorrente != "barcode") - { - Response.Redirect("~/barcode"); - } - } - else - { - divWarning.Visible = false; - } } - } } \ No newline at end of file diff --git a/C-TRACK/WebUserControls/mod_faseCurr.ascx.cs b/C-TRACK/WebUserControls/mod_faseCurr.ascx.cs index d1a9fc7..963a058 100644 --- a/C-TRACK/WebUserControls/mod_faseCurr.ascx.cs +++ b/C-TRACK/WebUserControls/mod_faseCurr.ascx.cs @@ -4,172 +4,173 @@ using System; namespace C_TRACK.WebUserControls { - public partial class mod_faseCurr : System.Web.UI.UserControl - { - protected void Page_Load(object sender, EventArgs e) + public partial class mod_faseCurr : BaseUserControl { - if (!Page.IsPostBack) - { - mod_numKeyb.Visible = false; - setupValori(); - } - mod_numKeyb.eh_comandoRegistrato += Mod_numKeyb_eh_comandoRegistrato; - mod_numKeyb.eh_reset += Mod_numKeyb_eh_reset; - } - private void Mod_numKeyb_eh_reset(object sender, EventArgs e) - { - // nascondo keyb... - mod_numKeyb.Visible = false; - } - - private void Mod_numKeyb_eh_comandoRegistrato(object sender, EventArgs e) - { - // recupero valore - if (mod_numKeyb.numSelected >= 0) - { - txtQta.Text = mod_numKeyb.numSelected.ToString(); - refreshQtaSel(); - // nascondo keyb... - mod_numKeyb.Visible = false; - } - } - - private void setupValori() - { - // recupero riga TR e popolo valori visualizzati - var tabTR = dataLayer.man.taTR.getByPost(mUtils.CodPost, false); - bool showDiv = false; - if (tabTR.Rows.Count > 0) - { - DescFaseCurr = tabTR[0].DescrFase; - QtaFaseCurr = tabTR[0].QtaEv; - txtQta.Text = QtaFaseCurr.ToString(); - idxRecCurr = tabTR[0].IdxRec; - showDiv = true; - } - divFaseCurr.Visible = showDiv; - } - - /// - /// Descrizione fase attiva - /// - public string DescFaseCurr - { - get - { - return memLayer.ML.StringSessionObj("DescFaseCurr"); - } - set - { - memLayer.ML.setSessionVal("DescFaseCurr", value); - } - } - /// - /// Qta della fase attiva - /// - public int QtaFaseCurr - { - get - { - return memLayer.ML.IntSessionObj("QtaFaseCurr"); - } - set - { - memLayer.ML.setSessionVal("QtaFaseCurr", value); - } - } - /// - /// idxRec della fase attiva - /// - public int idxRecCurr - { - get - { - return memLayer.ML.IntSessionObj("idxRecCurr"); - } - set - { - memLayer.ML.setSessionVal("idxRecCurr", value); - } - } - /// - /// Codice postazione di lavoro - /// - public string DescPost - { - get - { - string answ = ""; - if (memLayer.ML.isInSessionObject("DescPost")) + protected void Page_Load(object sender, EventArgs e) { - answ = memLayer.ML.StringSessionObj("DescPost"); + if (!Page.IsPostBack) + { + mod_numKeyb.Visible = false; + setupValori(); + } + mod_numKeyb.eh_comandoRegistrato += Mod_numKeyb_eh_comandoRegistrato; + mod_numKeyb.eh_reset += Mod_numKeyb_eh_reset; } - if (answ == "") + + private void Mod_numKeyb_eh_reset(object sender, EventArgs e) { - var tabPost = dataLayer.man.taAP.getByKey(mUtils.CodPost); - if (tabPost.Rows.Count > 0) - { - answ = tabPost[0].Descrizione; - } - memLayer.ML.setSessionVal("DescPost", answ); + // nascondo keyb... + mod_numKeyb.Visible = false; } - return answ; - } - } - /// - /// Codice Operatore - /// - public string NomeOpr - { - get - { - string answ = ""; - if (memLayer.ML.isInSessionObject("NomeOpr")) + + private void Mod_numKeyb_eh_comandoRegistrato(object sender, EventArgs e) { - answ = memLayer.ML.StringSessionObj("NomeOpr"); + // recupero valore + if (mod_numKeyb.numSelected >= 0) + { + txtQta.Text = mod_numKeyb.numSelected.ToString(); + refreshQtaSel(); + // nascondo keyb... + mod_numKeyb.Visible = false; + } } - if (answ == "") + + private void setupValori() { - var tabOpr = dataLayer.man.taAO.getByKey(mUtils.CodOpr); - if (tabOpr.Rows.Count > 0) - { - answ = string.Format("{0} {1}", tabOpr[0].Cognome, tabOpr[0].Nome); - } - memLayer.ML.setSessionVal("NomeOpr", answ); + // recupero riga TR e popolo valori visualizzati + var tabTR = DLMan.taTR.getByPost(mUtils.CodPost, false); + bool showDiv = false; + if (tabTR.Rows.Count > 0) + { + DescFaseCurr = tabTR[0].DescrFase; + QtaFaseCurr = tabTR[0].QtaEv; + txtQta.Text = QtaFaseCurr.ToString(); + idxRecCurr = tabTR[0].IdxRec; + showDiv = true; + } + divFaseCurr.Visible = showDiv; } - return answ; - } - } - protected void txtQta_TextChanged(object sender, EventArgs e) - { - refreshQtaSel(); - } + /// + /// Descrizione fase attiva + /// + public string DescFaseCurr + { + get + { + return memLayer.ML.StringSessionObj("DescFaseCurr"); + } + set + { + memLayer.ML.setSessionVal("DescFaseCurr", value); + } + } + /// + /// Qta della fase attiva + /// + public int QtaFaseCurr + { + get + { + return memLayer.ML.IntSessionObj("QtaFaseCurr"); + } + set + { + memLayer.ML.setSessionVal("QtaFaseCurr", value); + } + } + /// + /// idxRec della fase attiva + /// + public int idxRecCurr + { + get + { + return memLayer.ML.IntSessionObj("idxRecCurr"); + } + set + { + memLayer.ML.setSessionVal("idxRecCurr", value); + } + } + /// + /// Codice postazione di lavoro + /// + public string DescPost + { + get + { + string answ = ""; + if (memLayer.ML.isInSessionObject("DescPost")) + { + answ = memLayer.ML.StringSessionObj("DescPost"); + } + if (answ == "") + { + var tabPost = DLMan.taAP.getByKey(mUtils.CodPost); + if (tabPost.Rows.Count > 0) + { + answ = tabPost[0].Descrizione; + } + memLayer.ML.setSessionVal("DescPost", answ); + } + return answ; + } + } + /// + /// Codice Operatore + /// + public string NomeOpr + { + get + { + string answ = ""; + if (memLayer.ML.isInSessionObject("NomeOpr")) + { + answ = memLayer.ML.StringSessionObj("NomeOpr"); + } + if (answ == "") + { + var tabOpr = DLMan.taAO.getByKey(mUtils.CodOpr); + if (tabOpr.Rows.Count > 0) + { + answ = string.Format("{0} {1}", tabOpr[0].Cognome, tabOpr[0].Nome); + } + memLayer.ML.setSessionVal("NomeOpr", answ); + } + return answ; + } + } - private void refreshQtaSel() - { - int newQta = QtaFaseCurr; - int.TryParse(txtQta.Text, out newQta); - // salvo nuova qta... - QtaFaseCurr = newQta; - } + protected void txtQta_TextChanged(object sender, EventArgs e) + { + refreshQtaSel(); + } - protected void lbtKeyb_Click(object sender, EventArgs e) - { - toggleNumKeyb(); - } - /// - /// Toggle visibilità numKeyb - /// - private void toggleNumKeyb() - { - mod_numKeyb.Visible = !mod_numKeyb.Visible; - } + private void refreshQtaSel() + { + int newQta = QtaFaseCurr; + int.TryParse(txtQta.Text, out newQta); + // salvo nuova qta... + QtaFaseCurr = newQta; + } - protected void lbtReset_Click(object sender, EventArgs e) - { - Response.Redirect("~/barcode"); + protected void lbtKeyb_Click(object sender, EventArgs e) + { + toggleNumKeyb(); + } + /// + /// Toggle visibilità numKeyb + /// + private void toggleNumKeyb() + { + mod_numKeyb.Visible = !mod_numKeyb.Visible; + } + + protected void lbtReset_Click(object sender, EventArgs e) + { + Response.Redirect("~/barcode"); + } } - } } \ No newline at end of file diff --git a/C-TRACK/WebUserControls/mod_fasiAttive.ascx.cs b/C-TRACK/WebUserControls/mod_fasiAttive.ascx.cs index 25d837e..f0365b1 100644 --- a/C-TRACK/WebUserControls/mod_fasiAttive.ascx.cs +++ b/C-TRACK/WebUserControls/mod_fasiAttive.ascx.cs @@ -3,18 +3,18 @@ using System; namespace C_TRACK.WebUserControls { - public partial class mod_fasiAttive : System.Web.UI.UserControl - { - protected void Page_Load(object sender, EventArgs e) + public partial class mod_fasiAttive : BaseUserControl { + protected void Page_Load(object sender, EventArgs e) + { - } + } - protected void lbtCloseAll_Click(object sender, EventArgs e) - { - // chiama la procedura che chiude tutte la fasi rimaste attive... - dataLayer.man.taTR.closePending(); - Response.Redirect("~/task"); + protected void lbtCloseAll_Click(object sender, EventArgs e) + { + // chiama la procedura che chiude tutte la fasi rimaste attive... + DLMan.taTR.closePending(); + Response.Redirect("~/task"); + } } - } } \ No newline at end of file diff --git a/C-TRACK/WebUserControls/mod_menuTopCompact.ascx.cs b/C-TRACK/WebUserControls/mod_menuTopCompact.ascx.cs index 05062f2..f178c25 100644 --- a/C-TRACK/WebUserControls/mod_menuTopCompact.ascx.cs +++ b/C-TRACK/WebUserControls/mod_menuTopCompact.ascx.cs @@ -6,132 +6,132 @@ using System.Web.UI; namespace C_TRACK.WebUserControls { - public partial class mod_menuTopCompact : System.Web.UI.UserControl - { - protected void Page_Load(object sender, EventArgs e) + public partial class mod_menuTopCompact : BaseUserControl { - string lastPage = Request.Url.LocalPath.Split('/').Last(); - if (!Page.IsPostBack) - { - // fix visibilità TASK - hlTask.Visible = devicesAuthProxy.stObj.userHasRight("CT_userStart"); - hlReset.Visible = false; - // se l'utente NON c'è torno a login... - if (!devicesAuthProxy.stObj.isAuth) + protected void Page_Load(object sender, EventArgs e) { - if (lastPage != "" && lastPage != "login") - { - Session["nextPage"] = lastPage; - } - // SE non sono in "safe page" - if (memLayer.ML.CRS("_loginPages").ToLower().IndexOf(lastPage.ToLower()) < 0) - { - Response.Redirect("~/login"); - } + string lastPage = Request.Url.LocalPath.Split('/').Last(); + if (!Page.IsPostBack) + { + // fix visibilità TASK + hlTask.Visible = devicesAuthProxy.stObj.userHasRight("CT_userStart"); + hlReset.Visible = false; + // se l'utente NON c'è torno a login... + if (!devicesAuthProxy.stObj.isAuth) + { + if (lastPage != "" && lastPage != "login") + { + Session["nextPage"] = lastPage; + } + // SE non sono in "safe page" + if (memLayer.ML.CRS("_loginPages").ToLower().IndexOf(lastPage.ToLower()) < 0) + { + Response.Redirect("~/login"); + } + } + else + { + PagCorrente(); + // leggo da conf SE mostrare logout... + hlReset.Visible = memLayer.ML.CRB("enableLogOut"); + } + } + // controllo pagina... + bool pageAuth = devicesAuthProxy.stObj.isPageEnabled(lastPage); + // controllo pag auth... + if (!pageAuth && memLayer.ML.confReadString("_safePages").ToLower().IndexOf(lastPage.ToLower()) < 0) + { + Response.Redirect("~/login"); + } + lblTitolo.Text = memLayer.ML.CRS("appName"); } - else + /// + /// salva in variabile pagina il nome della pagina corrente + /// + protected void PagCorrente() { - PagCorrente(); - // leggo da conf SE mostrare logout... - hlReset.Visible = memLayer.ML.CRB("enableLogOut"); + string[] uri = Request.Url.LocalPath.Split('/'); + // salvo pagina corrente + devicesAuthProxy.pagCorrente = uri.Last(); + if (devicesAuthProxy.pagPrecedente == "") + { + devicesAuthProxy.pagPrecedente = devicesAuthProxy.pagCorrente; + } } - } - // controllo pagina... - bool pageAuth = devicesAuthProxy.stObj.isPageEnabled(lastPage); - // controllo pag auth... - if (!pageAuth && memLayer.ML.confReadString("_safePages").ToLower().IndexOf(lastPage.ToLower()) < 0) - { - Response.Redirect("~/login"); - } - lblTitolo.Text = memLayer.ML.CRS("appName"); - } - /// - /// salva in variabile pagina il nome della pagina corrente - /// - protected void PagCorrente() - { - string[] uri = Request.Url.LocalPath.Split('/'); - // salvo pagina corrente - devicesAuthProxy.pagCorrente = uri.Last(); - if (devicesAuthProxy.pagPrecedente == "") - { - devicesAuthProxy.pagPrecedente = devicesAuthProxy.pagCorrente; - } - } - /// - /// Codice TASK corrente - /// - public string CurrNumTask - { - get - { - return memLayer.ML.StringSessionObj("CurrNumTask"); - } - } - /// - /// Codice ART corrente - /// - public string CurrCodArt - { - get - { - return memLayer.ML.StringSessionObj("CurrCodArt"); - } - } - /// - /// Codice postazione di lavoro - /// - public string DescPost - { - get - { - string answ = ""; - if (memLayer.ML.isInSessionObject("DescPost")) + /// + /// Codice TASK corrente + /// + public string CurrNumTask { - answ = memLayer.ML.StringSessionObj("DescPost"); + get + { + return memLayer.ML.StringSessionObj("CurrNumTask"); + } } - if (answ == "") + /// + /// Codice ART corrente + /// + public string CurrCodArt { - var tabPost = dataLayer.man.taAP.getByKey(mUtils.CodPost); - if (tabPost.Rows.Count > 0) - { - answ = tabPost[0].Descrizione; - } - memLayer.ML.setSessionVal("DescPost", answ); + get + { + return memLayer.ML.StringSessionObj("CurrCodArt"); + } } - return answ; - } - } - /// - /// Codice Operatore - /// - public string NomeOpr - { - get - { - string answ = ""; - if (memLayer.ML.isInSessionObject("NomeOpr")) + /// + /// Codice postazione di lavoro + /// + public string DescPost { - answ = memLayer.ML.StringSessionObj("NomeOpr"); + get + { + string answ = ""; + if (memLayer.ML.isInSessionObject("DescPost")) + { + answ = memLayer.ML.StringSessionObj("DescPost"); + } + if (answ == "") + { + var tabPost = DLMan.taAP.getByKey(mUtils.CodPost); + if (tabPost.Rows.Count > 0) + { + answ = tabPost[0].Descrizione; + } + memLayer.ML.setSessionVal("DescPost", answ); + } + return answ; + } } - if (answ == "") + /// + /// Codice Operatore + /// + public string NomeOpr { - var tabOpr = dataLayer.man.taAO.getByKey(mUtils.CodOpr); - if (tabOpr.Rows.Count > 0) - { - answ = string.Format("{0} {1}", tabOpr[0].Cognome, tabOpr[0].Nome); - } - memLayer.ML.setSessionVal("NomeOpr", answ); + get + { + string answ = ""; + if (memLayer.ML.isInSessionObject("NomeOpr")) + { + answ = memLayer.ML.StringSessionObj("NomeOpr"); + } + if (answ == "") + { + var tabOpr = DLMan.taAO.getByKey(mUtils.CodOpr); + if (tabOpr.Rows.Count > 0) + { + answ = string.Format("{0} {1}", tabOpr[0].Cognome, tabOpr[0].Nome); + } + memLayer.ML.setSessionVal("NomeOpr", answ); + } + return answ; + } + } + /// + /// Forzo refresh pannello superiore + /// + public void doUpdate() + { + divCurr.DataBind(); } - return answ; - } } - /// - /// Forzo refresh pannello superiore - /// - public void doUpdate() - { - divCurr.DataBind(); - } - } } \ No newline at end of file diff --git a/C-TRACK/WebUserControls/mod_opr2post.ascx.cs b/C-TRACK/WebUserControls/mod_opr2post.ascx.cs index b8a6506..51c740f 100644 --- a/C-TRACK/WebUserControls/mod_opr2post.ascx.cs +++ b/C-TRACK/WebUserControls/mod_opr2post.ascx.cs @@ -10,106 +10,106 @@ using System.Web.UI.WebControls; namespace C_TRACK.WebUserControls { - public partial class mod_opr2post : System.Web.UI.UserControl - { - - /// - /// evento aggiunta record - /// - public event EventHandler eh_reqUpdate; - protected void Page_Load(object sender, EventArgs e) + public partial class mod_opr2post : BaseUserControl { - if (!Page.IsPostBack) - { - if (mUtils.postIsMulti) + + /// + /// evento aggiunta record + /// + public event EventHandler eh_reqUpdate; + protected void Page_Load(object sender, EventArgs e) { - lbtClosePeriod.DataBind(); - doUpdate(); + if (!Page.IsPostBack) + { + if (mUtils.postIsMulti) + { + lbtClosePeriod.DataBind(); + doUpdate(); + } + } } - } - } - public void doUpdate() - { - grView.DataBind(); - } + public void doUpdate() + { + grView.DataBind(); + } - /// - /// CodPost selezionato in sessione - /// - protected string codPost - { - get - { - return memLayer.ML.StringSessionObj("CodPost"); - } - } + /// + /// CodPost selezionato in sessione + /// + protected string codPost + { + get + { + return memLayer.ML.StringSessionObj("CodPost"); + } + } - protected void lbtClosePeriod_Click(object sender, EventArgs e) - { - // chiude il turno andando a ripartire tutte le ore operatore sulle commesse attive e senza riportare attivi gli operatori - dataLayer.man.taTR.checkAlloc(codPost, false); - grView.DataBind(); - reportUpdate(); - } + protected void lbtClosePeriod_Click(object sender, EventArgs e) + { + // chiude il turno andando a ripartire tutte le ore operatore sulle commesse attive e senza riportare attivi gli operatori + DLMan.taTR.checkAlloc(codPost, false); + grView.DataBind(); + reportUpdate(); + } - protected void grView_RowDeleted(object sender, GridViewDeletedEventArgs e) - { - reportUpdate(); - } + protected void grView_RowDeleted(object sender, GridViewDeletedEventArgs e) + { + reportUpdate(); + } - private void reportUpdate() - { - // invoco update... - if (eh_reqUpdate != null) - { - eh_reqUpdate(this, new EventArgs()); - } - } + private void reportUpdate() + { + // invoco update... + if (eh_reqUpdate != null) + { + eh_reqUpdate(this, new EventArgs()); + } + } - /// - /// Input da processare (tipo codOperatore...)... - /// - public string newInput - { - set - { - processInput(value); - } - } + /// + /// Input da processare (tipo codOperatore...)... + /// + public string newInput + { + set + { + processInput(value); + } + } - /// - /// Cod OPERATORE corrente - /// - public string codOper - { - get - { - return memLayer.ML.StringSessionObj("currCodOperMulti"); - } - set - { - memLayer.ML.setSessionVal("currCodOperMulti", value); - } - } - /// - /// Effettua riconoscimento input e determina valori commessa / articolo / qta - /// - /// - private void processInput(string value) - { - // verifico se sia un operatore... - Match testOper = Regex.Match(value, mUtils.reCodOper); + /// + /// Cod OPERATORE corrente + /// + public string codOper + { + get + { + return memLayer.ML.StringSessionObj("currCodOperMulti"); + } + set + { + memLayer.ML.setSessionVal("currCodOperMulti", value); + } + } + /// + /// Effettua riconoscimento input e determina valori commessa / articolo / qta + /// + /// + private void processInput(string value) + { + // verifico se sia un operatore... + Match testOper = Regex.Match(value, mUtils.reCodOper); - if (testOper.Success) - { - // salvo nuovo operatore SE non ci fosse... - codOper = value; - dataLayer.man.taO2P.InsertQuery(codPost, codOper, DateTime.Now); - reportUpdate(); - } - doUpdate(); + if (testOper.Success) + { + // salvo nuovo operatore SE non ci fosse... + codOper = value; + DLMan.taO2P.InsertQuery(codPost, codOper, DateTime.Now); + reportUpdate(); + } + doUpdate(); + } } - } } \ No newline at end of file diff --git a/C-TRACK/WebUserControls/mod_postazioni.ascx.cs b/C-TRACK/WebUserControls/mod_postazioni.ascx.cs index a67c06f..23d0b04 100644 --- a/C-TRACK/WebUserControls/mod_postazioni.ascx.cs +++ b/C-TRACK/WebUserControls/mod_postazioni.ascx.cs @@ -5,113 +5,113 @@ using System.Web.UI; namespace C_TRACK.WebUserControls { - public partial class mod_postazioni : System.Web.UI.UserControl - { - protected void Page_Load(object sender, EventArgs e) + public partial class mod_postazioni : BaseUserControl { - if (!Page.IsPostBack) - { - memLayer.ML.emptySessionVal("DescPost"); - } - } - /// - /// selezione - /// - /// - /// - protected void grView_SelectedIndexChanged(object sender, EventArgs e) - { - // salvo la postazione selezionata - string newCodPost = grView.SelectedValue.ToString(); - mUtils.CodPost = newCodPost; - // vedo di recuperare dati postazione... - try - { - DS_App.AnagPostRow datiPost = dataLayer.man.taAP.getByKey(newCodPost)[0]; - // salvo! - mUtils.postIsMulti = datiPost.IsMultiOpr; - } - catch - { } - string nextPage = ""; - if (memLayer.ML.StringSessionObj("nextObjCommand") == "setOpr") - { - // salvo su DB... - dataLayer.man.taAP.setOpr(mUtils.CodPost, mUtils.CodOpr); - // set rimando a BCode con settato Postazione - nextPage = "~/barcode"; - } - else if (memLayer.ML.StringSessionObj("nextObjCommand") == "freePost") - { - // salvo su DB... - dataLayer.man.taAP.setOpr(mUtils.CodPost, ""); - mUtils.CodPost = ""; - // set rimando a postazioni - nextPage = "~/postazioni"; - } - else if (memLayer.ML.StringSessionObj("nextObjCommand") == "selPost") - { - // set rimando a BCode con settato Postazione - nextPage = "~/barcode"; - } - memLayer.ML.setSessionVal("nextObjCommand", ""); - // reload pagina! - Response.Redirect(nextPage); - } + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + memLayer.ML.emptySessionVal("DescPost"); + } + } + /// + /// selezione + /// + /// + /// + protected void grView_SelectedIndexChanged(object sender, EventArgs e) + { + // salvo la postazione selezionata + string newCodPost = grView.SelectedValue.ToString(); + mUtils.CodPost = newCodPost; + // vedo di recuperare dati postazione... + try + { + DS_App.AnagPostRow datiPost = DLMan.taAP.getByKey(newCodPost)[0]; + // salvo! + mUtils.postIsMulti = datiPost.IsMultiOpr; + } + catch + { } + string nextPage = ""; + if (memLayer.ML.StringSessionObj("nextObjCommand") == "setOpr") + { + // salvo su DB... + DLMan.taAP.setOpr(mUtils.CodPost, mUtils.CodOpr); + // set rimando a BCode con settato Postazione + nextPage = "~/barcode"; + } + else if (memLayer.ML.StringSessionObj("nextObjCommand") == "freePost") + { + // salvo su DB... + DLMan.taAP.setOpr(mUtils.CodPost, ""); + mUtils.CodPost = ""; + // set rimando a postazioni + nextPage = "~/postazioni"; + } + else if (memLayer.ML.StringSessionObj("nextObjCommand") == "selPost") + { + // set rimando a BCode con settato Postazione + nextPage = "~/barcode"; + } + memLayer.ML.setSessionVal("nextObjCommand", ""); + // reload pagina! + Response.Redirect(nextPage); + } - /// - /// salvo in session che il prox comando è liberare postazione... - /// - /// - /// - protected void lbtFreePost_Click(object sender, EventArgs e) - { - memLayer.ML.setSessionVal("nextObjCommand", "freePost"); - } - /// - /// salvo in session che il prox comando è impostare operatore... - /// - /// - /// - protected void lbtSetOpr_Click(object sender, EventArgs e) - { - memLayer.ML.setSessionVal("nextObjCommand", "setOpr"); - } - /// - /// salvo in session che il prox comando è impostare postazione... - /// - /// - /// - protected void lbtSelPost_Click(object sender, EventArgs e) - { - memLayer.ML.setSessionVal("nextObjCommand", "selPost"); - } - /// - /// Verifica se sia possibile sbloccare la postazione (togliere Opr corrente: - /// - è un user "power" - /// - è LUI STESSO l'utente da levare - /// - public bool canUnlock(string thisCodOpr) - { - bool hasLock = thisCodOpr != ""; - bool isAdmin = devicesAuthProxy.stObj.userHasRight("CT_admin"); - bool isStart = devicesAuthProxy.stObj.userHasRight("CT_userStart"); - bool isPower = devicesAuthProxy.stObj.userHasRight("CT_powerUser"); - bool isHimself = (mUtils.CodOpr == thisCodOpr); - return hasLock && (isPower || isAdmin || isStart || isHimself); - } + /// + /// salvo in session che il prox comando è liberare postazione... + /// + /// + /// + protected void lbtFreePost_Click(object sender, EventArgs e) + { + memLayer.ML.setSessionVal("nextObjCommand", "freePost"); + } + /// + /// salvo in session che il prox comando è impostare operatore... + /// + /// + /// + protected void lbtSetOpr_Click(object sender, EventArgs e) + { + memLayer.ML.setSessionVal("nextObjCommand", "setOpr"); + } + /// + /// salvo in session che il prox comando è impostare postazione... + /// + /// + /// + protected void lbtSelPost_Click(object sender, EventArgs e) + { + memLayer.ML.setSessionVal("nextObjCommand", "selPost"); + } + /// + /// Verifica se sia possibile sbloccare la postazione (togliere Opr corrente: + /// - è un user "power" + /// - è LUI STESSO l'utente da levare + /// + public bool canUnlock(string thisCodOpr) + { + bool hasLock = thisCodOpr != ""; + bool isAdmin = devicesAuthProxy.stObj.userHasRight("CT_admin"); + bool isStart = devicesAuthProxy.stObj.userHasRight("CT_userStart"); + bool isPower = devicesAuthProxy.stObj.userHasRight("CT_powerUser"); + bool isHimself = (mUtils.CodOpr == thisCodOpr); + return hasLock && (isPower || isAdmin || isStart || isHimself); + } - /// - /// Verifica se sia possibile sbloccare la postazione (togliere Opr corrente: - /// - è un user "power" - /// - è LUI STESSO l'utente da levare - /// - public bool canSelPost(string thisCodOpr) - { - bool hasLock = thisCodOpr != ""; - bool isHimself = (mUtils.CodOpr == thisCodOpr); - return hasLock && isHimself; + /// + /// Verifica se sia possibile sbloccare la postazione (togliere Opr corrente: + /// - è un user "power" + /// - è LUI STESSO l'utente da levare + /// + public bool canSelPost(string thisCodOpr) + { + bool hasLock = thisCodOpr != ""; + bool isHimself = (mUtils.CodOpr == thisCodOpr); + return hasLock && isHimself; + } } - } } \ No newline at end of file diff --git a/C-TRACK/WebUserControls/mod_selTask.ascx.cs b/C-TRACK/WebUserControls/mod_selTask.ascx.cs index f768ea4..9e27e29 100644 --- a/C-TRACK/WebUserControls/mod_selTask.ascx.cs +++ b/C-TRACK/WebUserControls/mod_selTask.ascx.cs @@ -1,91 +1,106 @@ -using AppData; -using SteamWare; +using SteamWare; using System; namespace C_TRACK.WebUserControls { - public partial class mod_selTask : System.Web.UI.UserControl - { - - /// - /// evento selezione dati - /// - public event EventHandler eh_dataSel; - - protected void Page_Load(object sender, EventArgs e) + public partial class mod_selTask : BaseUserControl { + #region Public Events - } + /// + /// evento selezione dati + /// + public event EventHandler eh_dataSel; - protected void grView_SelectedIndexChanged(object sender, EventArgs e) - { - // selezionata una richiesta - int idxProm = 0; - int.TryParse(grView.SelectedValue.ToString(), out idxProm); - if (idxProm > 0) - { - // --> ho IdxPromessa --> recupero KeyRichiesta = CurrNumTask - var tab = dataLayer.man.taPODL.getByKey(idxProm); - string _numTask = ""; - if (tab.Rows.Count > 0) + #endregion Public Events + + #region Public Properties + + /// + /// Codice ART corrente + /// + public string CurrCodArt { - // recupero NumTask - _numTask = tab[0].KeyRichiesta; - if (_numTask != "") - { - // verifica preliminare se vada creato Task... - checkTask(idxProm); - // salvo commessa - CurrNumTask = _numTask; - // salvo articolo... - CurrCodArt = tab[0].CodArticolo; - // segnalo update - if (eh_dataSel != null) + get { - eh_dataSel(this, new EventArgs()); + return memLayer.ML.StringSessionObj("CurrCodArt"); + } + set + { + memLayer.ML.setSessionVal("CurrCodArt", value); } - } } - } - } - /// - /// Verifica se il task vada importato - /// - /// - private void checkTask(int idxPromessa) - { - dataLayer.man.taTL.ImportNew(idxPromessa); - } - /// - /// Codice TASK corrente - /// - public string CurrNumTask - { - get - { - return memLayer.ML.StringSessionObj("CurrNumTask"); - } - set - { - memLayer.ML.setSessionVal("CurrNumTask", value); - // salvo anche come btn pressed... - memLayer.ML.setSessionVal("btnCmdPress", value); - } + /// + /// Codice TASK corrente + /// + public string CurrNumTask + { + get + { + return memLayer.ML.StringSessionObj("CurrNumTask"); + } + set + { + memLayer.ML.setSessionVal("CurrNumTask", value); + // salvo anche come btn pressed... + memLayer.ML.setSessionVal("btnCmdPress", value); + } + } + + #endregion Public Properties + + #region Private Methods + + /// + /// Verifica se il task vada importato + /// + /// + private void checkTask(int idxPromessa) + { + DLMan.taTL.ImportNew(idxPromessa); + } + + #endregion Private Methods + + #region Protected Methods + + protected void grView_SelectedIndexChanged(object sender, EventArgs e) + { + // selezionata una richiesta + int idxProm = 0; + int.TryParse(grView.SelectedValue.ToString(), out idxProm); + if (idxProm > 0) + { + // --> ho IdxPromessa --> recupero KeyRichiesta = CurrNumTask + var tab = DLMan.taPODL.getByKey(idxProm); + string _numTask = ""; + if (tab.Rows.Count > 0) + { + // recupero NumTask + _numTask = tab[0].KeyRichiesta; + if (_numTask != "") + { + // verifica preliminare se vada creato Task... + checkTask(idxProm); + // salvo commessa + CurrNumTask = _numTask; + // salvo articolo... + CurrCodArt = tab[0].CodArticolo; + // segnalo update + if (eh_dataSel != null) + { + eh_dataSel(this, new EventArgs()); + } + } + } + } + } + + protected void Page_Load(object sender, EventArgs e) + { + } + + #endregion Protected Methods } - /// - /// Codice ART corrente - /// - public string CurrCodArt - { - get - { - return memLayer.ML.StringSessionObj("CurrCodArt"); - } - set - { - memLayer.ML.setSessionVal("CurrCodArt", value); - } - } - } } \ No newline at end of file diff --git a/C-TRACK/WebUserControls/mod_task2post.ascx.cs b/C-TRACK/WebUserControls/mod_task2post.ascx.cs index 7e46f71..dd0048d 100644 --- a/C-TRACK/WebUserControls/mod_task2post.ascx.cs +++ b/C-TRACK/WebUserControls/mod_task2post.ascx.cs @@ -7,7 +7,7 @@ using System.Web.UI.WebControls; namespace C_TRACK.WebUserControls { - public partial class mod_task2post : System.Web.UI.UserControl + public partial class mod_task2post : BaseUserControl { /// /// evento aggiunta record @@ -76,7 +76,7 @@ namespace C_TRACK.WebUserControls { string numTask = grView.SelectedValue.ToString(); // chiamo toggle status, segnalo update! - dataLayer.man.taTL2Post.ToggleActive(codPost, numTask); + DLMan.taTL2Post.ToggleActive(codPost, numTask); reportUpdate(); } @@ -132,7 +132,7 @@ namespace C_TRACK.WebUserControls { NumTask = value; string codTag = mUtils.optValueBC != "" ? mUtils.optValueBC : ""; - dataLayer.man.taTL2Post.InsertQuery(codPost, NumTask, codTag); + DLMan.taTL2Post.InsertQuery(codPost, NumTask, codTag); reportUpdate(); } doUpdate(); diff --git a/C-TRACK/WebUserControls/mod_taskList.ascx.cs b/C-TRACK/WebUserControls/mod_taskList.ascx.cs index f6458c3..ef15c68 100644 --- a/C-TRACK/WebUserControls/mod_taskList.ascx.cs +++ b/C-TRACK/WebUserControls/mod_taskList.ascx.cs @@ -5,7 +5,7 @@ using System.Web.UI; namespace C_TRACK.WebUserControls { - public partial class mod_taskList : System.Web.UI.UserControl + public partial class mod_taskList : BaseUserControl { /// /// Gestione load pagina @@ -153,7 +153,7 @@ namespace C_TRACK.WebUserControls if (memLayer.ML.StringSessionObj("nextObjCommand") == "reopenTask") { // salvo su DB... - dataLayer.man.taTL.updateClose(NumTask, false); + DLMan.taTL.updateClose(NumTask, false); // tolgo comando reopen... memLayer.ML.emptySessionVal("nextObjCommand"); // set rimando a BCode con settato Postazione diff --git a/C-TRACK/barcode.aspx.cs b/C-TRACK/barcode.aspx.cs index bd0a679..80a6c09 100644 --- a/C-TRACK/barcode.aspx.cs +++ b/C-TRACK/barcode.aspx.cs @@ -9,7 +9,7 @@ using System.Web.UI; namespace C_TRACK { - public partial class barcode : System.Web.UI.Page + public partial class barcode : BasePage { /// /// idxRec della fase attiva @@ -47,7 +47,7 @@ namespace C_TRACK string CurrCodArt = ""; try { - CurrCodArt = dataLayer.man.taTL.getByKey(value)[0].CodArt; + CurrCodArt = DLMan.taTL.getByKey(value)[0].CodArt; } catch { } @@ -420,7 +420,7 @@ namespace C_TRACK Dictionary valori = new Dictionary(); // aggiungo i COD OPERATORE - var tabOpr = dataLayer.man.taAO.GetData(); + var tabOpr = DLMan.taAO.GetData(); foreach (var rigaOpr in tabOpr) { valori.Add(rigaOpr.CodOpr, string.Format("{0} {1}", rigaOpr.Cognome, rigaOpr.Nome)); @@ -431,7 +431,7 @@ namespace C_TRACK } // aggiungo le POSTAZIONI - var tabPost = dataLayer.man.taAP.GetData(); + var tabPost = DLMan.taAP.GetData(); foreach (var rigaPost in tabPost) { valori.Add(rigaPost.CodPost, rigaPost.Descrizione); @@ -441,7 +441,7 @@ namespace C_TRACK logger.lg.scriviLog("Caricato POSTAZIONI per Barcode", tipoLog.INFO); } // aggiungo le commesse... - var tabTask = dataLayer.man.taTL.getLastNumDD(numDD); + var tabTask = DLMan.taTL.getLastNumDD(numDD); foreach (var rigaTask in tabTask) { valori.Add(rigaTask.NumTask, string.Format("Comm. {0} | Art. {1} | Qta {2}", rigaTask.NumTask, rigaTask.CodArt, rigaTask.QtaRic)); @@ -478,14 +478,14 @@ namespace C_TRACK Dictionary comandi = new Dictionary(); // !!!FARE!!! togliere... - var tabCmd = dataLayer.man.taTE2S.getByMappa("E_BC"); + var tabCmd = DLMan.taTE2S.getByMappa("E_BC"); foreach (var rigaCmd in tabCmd) { comandi.Add(rigaCmd.CodEvento.ToUpper(), devicesAuthProxy.stObj.traduci(rigaCmd.text2show)); } - var tabFasi = dataLayer.man.taAF.GetData(); + var tabFasi = DLMan.taAF.GetData(); foreach (var rigaFase in tabFasi) { comandi.Add(rigaFase.CodFase, rigaFase.DescrFase); @@ -575,7 +575,7 @@ namespace C_TRACK if (mod_barcode1.comandoRegistrato.prevCmdIn == mUtils.reCmdResetOper) { // rimuovo OPR da POST occupate - dataLayer.man.taAP.resetOpr(mUtils.CodOpr); + DLMan.taAP.resetOpr(mUtils.CodOpr); // rimuovo OPR da sessione mUtils.CodOpr = ""; // rimuovo post corrente... @@ -607,13 +607,13 @@ namespace C_TRACK if (mUtils.CodPost != "") { // ...e SE la postazione è libera associo e registro - var tabPost = dataLayer.man.taAP.getByKey(mUtils.CodPost); + var tabPost = DLMan.taAP.getByKey(mUtils.CodPost); if (tabPost.Rows.Count == 1) { var rigaPost = tabPost[0]; if (rigaPost.CodOpr == mUtils.CodOpr || rigaPost.CodOpr == "") { - dataLayer.man.taAP.setOpr(mUtils.CodPost, mUtils.CodOpr); + DLMan.taAP.setOpr(mUtils.CodPost, mUtils.CodOpr); } else { @@ -630,14 +630,14 @@ namespace C_TRACK if (mUtils.CodOpr != "") { // ...e SE la postazione è libera o c'è lui associo e registro - var tabPost = dataLayer.man.taAP.getByKey(mod_barcode1.comandoRegistrato.valore); + var tabPost = DLMan.taAP.getByKey(mod_barcode1.comandoRegistrato.valore); if (tabPost.Rows.Count == 1) { var rigaPost = tabPost[0]; if (rigaPost.CodOpr == mUtils.CodOpr || rigaPost.CodOpr == "") { mUtils.CodPost = mod_barcode1.comandoRegistrato.valore; - dataLayer.man.taAP.setOpr(mUtils.CodPost, mUtils.CodOpr); + DLMan.taAP.setOpr(mUtils.CodPost, mUtils.CodOpr); // svuoto vallori } } @@ -652,25 +652,25 @@ namespace C_TRACK else if (mod_barcode1.comandoRegistrato.prevCmdIn == mUtils.reCmdPause) { // registro chiusura con qta 0 (pausa) - dataLayer.man.taTR.updateQuery(idxRecCurr, DateTime.Now, 0); + DLMan.taTR.updateQuery(idxRecCurr, DateTime.Now, 0); Response.Redirect("~/barcode"); } else if (mod_barcode1.comandoRegistrato.prevCmdIn == mUtils.reCmdClose) { // registro chiusura con la qta indicata - dataLayer.man.taTR.updateQuery(idxRecCurr, DateTime.Now, QtaFaseCurr); + DLMan.taTR.updateQuery(idxRecCurr, DateTime.Now, QtaFaseCurr); Response.Redirect("~/barcode"); } - else if (dataLayer.man.taAF.getByKey(mod_barcode1.comandoRegistrato.prevCmdIn).Rows.Count > 0) + else if (DLMan.taAF.getByKey(mod_barcode1.comandoRegistrato.prevCmdIn).Rows.Count > 0) { // se è un comando di fase --> registro INIZIO! - dataLayer.man.taTR.insertQuery(mUtils.CodOpr, mUtils.CodPost, CurrNumTask, CurrCodTag, mod_barcode1.comandoRegistrato.prevCmdIn, DateTime.Now); + DLMan.taTR.insertQuery(mUtils.CodOpr, mUtils.CodPost, CurrNumTask, CurrCodTag, mod_barcode1.comandoRegistrato.prevCmdIn, DateTime.Now); // controllo se sia fase di CHIUSURA DEFINITIVA registro con INIZIO e FINE insieme e CHIUDO commessa... - var rigaFase = dataLayer.man.taAF.getByKey(mod_barcode1.comandoRegistrato.prevCmdIn)[0]; + var rigaFase = DLMan.taAF.getByKey(mod_barcode1.comandoRegistrato.prevCmdIn)[0]; if (rigaFase.CloseTask) { // chiudo direttamente SIA fase che il TASK principale... - dataLayer.man.taTL.updateClose(CurrNumTask, true); + DLMan.taTL.updateClose(CurrNumTask, true); // se è abilitato PODL indico chiuso anche li... IdxOdl = -10 // tolgo comm corrente... diff --git a/C-TRACK/closeAllRec.aspx.cs b/C-TRACK/closeAllRec.aspx.cs index dd89818..0f2abe1 100644 --- a/C-TRACK/closeAllRec.aspx.cs +++ b/C-TRACK/closeAllRec.aspx.cs @@ -8,12 +8,12 @@ using System.Web.UI.WebControls; namespace C_TRACK { - public partial class closeAllRec : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) + public partial class closeAllRec : BasePage { - // chiama la procedura che chiude tutte la fasi rimaste attive... - dataLayer.man.taTR.closePending(); + protected void Page_Load(object sender, EventArgs e) + { + // chiama la procedura che chiude tutte la fasi rimaste attive... + DLMan.taTR.closePending(); + } } - } } \ No newline at end of file diff --git a/C-TRACK/doExport.aspx.cs b/C-TRACK/doExport.aspx.cs index df95bdc..210117a 100644 --- a/C-TRACK/doExport.aspx.cs +++ b/C-TRACK/doExport.aspx.cs @@ -5,7 +5,7 @@ using System.Text; namespace C_TRACK { - public partial class doExport : System.Web.UI.Page + public partial class doExport : BasePage { #region Protected Properties @@ -81,11 +81,11 @@ namespace C_TRACK // leggo tabella secondo il MODO if (mode == "aggr") { - dt = (DataTable)dataLayer.man.taTRA.getByFilt("", dateFrom, dateTo); + dt = (DataTable)DLMan.taTRA.getByFilt("", dateFrom, dateTo); } else { - dt = (DataTable)dataLayer.man.taTR.getByFilt("", dateFrom, dateTo); + dt = (DataTable)DLMan.taTR.getByFilt("", dateFrom, dateTo); } // write the csv column headers diff --git a/C-TRACK/mongocrypt.dll b/C-TRACK/mongocrypt.dll new file mode 100644 index 0000000..3cc3634 Binary files /dev/null and b/C-TRACK/mongocrypt.dll differ