diff --git a/MP-ADM/ApplicationInsights.config b/MP-ADM/ApplicationInsights.config deleted file mode 100644 index ec406213..00000000 --- a/MP-ADM/ApplicationInsights.config +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/MP-ADM/BCode.aspx.cs b/MP-ADM/BCode.aspx.cs index cf2b3a4b..81bc4168 100644 --- a/MP-ADM/BCode.aspx.cs +++ b/MP-ADM/BCode.aspx.cs @@ -3,30 +3,30 @@ using System; namespace MP_ADM { - public partial class BCode : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) + public partial class BCode : BasePage { - if (!Page.IsPostBack) - { - checkEnabled(); - string codPre = memLayer.ML.CRS("OptAdmBCode_CodPre"); - mod_barcode.codOrdPre = codPre != "" ? codPre : "OPR"; - mod_gestPromODL.codOrdPre = mod_barcode.codOrdPre; - mod_gestPromODL.enableSelFase = memLayer.ML.CRB("OptBCode_enbSelFase"); - mod_gestPromODL.CodGruppo = memLayer.ML.CRS("OptBCode_CodGruppo"); - } + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + checkEnabled(); + string codPre = memLayer.ML.CRS("OptAdmBCode_CodPre"); + mod_barcode.codOrdPre = codPre != "" ? codPre : "OPR"; + mod_gestPromODL.codOrdPre = mod_barcode.codOrdPre; + mod_gestPromODL.enableSelFase = memLayer.ML.CRB("OptBCode_enbSelFase"); + mod_gestPromODL.CodGruppo = memLayer.ML.CRS("OptBCode_CodGruppo"); + } + } + private void checkEnabled() + { + bool optPar = memLayer.ML.CRB("OptAdmBCodeEnabled"); + divContent.Visible = optPar; + string messaggio = ""; + if (!optPar) + { + messaggio = "Attenzione: Gestione BarCode disabilitata"; + } + lblDataImportOut.Text = messaggio; + } } - private void checkEnabled() - { - bool optPar = memLayer.ML.CRB("OptAdmBCodeEnabled"); - divContent.Visible = optPar; - string messaggio = ""; - if (!optPar) - { - messaggio = "Attenzione: Gestione BarCode disabilitata"; - } - lblDataImportOut.Text = messaggio; - } - } } \ No newline at end of file diff --git a/MP-ADM/Barcode.aspx.cs b/MP-ADM/Barcode.aspx.cs index c95c720a..041a71ab 100644 --- a/MP-ADM/Barcode.aspx.cs +++ b/MP-ADM/Barcode.aspx.cs @@ -2,7 +2,7 @@ namespace MP_ADM { - public partial class Barcode : System.Web.UI.Page + public partial class Barcode : BasePage { protected void Page_Load(object sender, EventArgs e) { diff --git a/MP-ADM/BasePage.cs b/MP-ADM/BasePage.cs new file mode 100644 index 00000000..769033c7 --- /dev/null +++ b/MP-ADM/BasePage.cs @@ -0,0 +1,50 @@ +using MapoDb; +using SteamWare; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; + +namespace MP_ADM +{ + public class BasePage : System.Web.UI.Page + { + /// + /// Prox pagina da aprire + /// + protected string _nextPage + { + get + { + string pagina = memLayer.ML.StringSessionObj("nextPage"); + if (pagina == "") + { + pagina = "menu.aspx"; + } + return pagina; + } + } + /// + /// Oggetto datalayer specifico + /// + internal DataLayer DataLayerObj = new DataLayer(); + /// + /// effettua traduzione del lemma + /// + /// + /// + public string traduci(string lemma) + { + return user_std.UtSn.Traduci(lemma); + } + /// + /// effettua traduzione in inglese del lemma + /// + /// + /// + public string traduciEn(string lemma) + { + return user_std.UtSn.TraduciEn(lemma); + } + } +} \ No newline at end of file diff --git a/MP-ADM/BaseUserControl.cs b/MP-ADM/BaseUserControl.cs new file mode 100644 index 00000000..a154ac97 --- /dev/null +++ b/MP-ADM/BaseUserControl.cs @@ -0,0 +1,134 @@ +using MapoDb; +using SteamWare; +using System; +using System.Data; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace MP_ADM +{ + public class BaseUserControl : System.Web.UI.UserControl + { + #region gestione eventi + + public event EventHandler eh_nuovoValore; + public event EventHandler eh_resetSelezione; + public event EventHandler eh_selValore; + + + /// + /// Solleva evento nuovo valore + /// + public void raiseNewVal() + { + // evento come nuovo... + if (eh_nuovoValore != null) + { + eh_nuovoValore(this, new EventArgs()); + } + } + + public void raiseSelNew() + { + // sollevo evento nuovo valore... + if (eh_selValore != null) + { + eh_selValore(this, new EventArgs()); + } + } + /// + /// Solleva evento reset + /// + public void raiseReset() + { + if (eh_resetSelezione != null) + { + eh_resetSelezione(this, new EventArgs()); + } + } + + #endregion + + /// + /// Oggetto datalayer specifico NON singleton x scalare + /// + internal DataLayer DataLayerObj = new DataLayer(); + + /// + /// UID formattato con "_" + /// + public string uid + { + get + { + return this.UniqueID.Replace("$", "_").Replace("-", "_"); + } + } + /// + /// titolo pagina + /// + public string titolo + { + get + { + return devicesAuthProxy.getPage(Request.Url).Replace(".aspx", ""); + } + } + + #region utils + + /// + /// effettua traduzione del lemma + /// + /// + /// + public string traduci(string lemma) + { + return user_std.UtSn.Traduci(lemma); + } + /// + /// effettua traduzione in inglese del lemma + /// + /// + /// + public string traduciEn(string lemma) + { + return user_std.UtSn.TraduciEn(lemma); + } + + /// + /// formatta in minuti/sec partendo da min.cent + /// + /// + /// + public string minSec(object minCent) + { + string answ = ""; + try + { + answ = string.Format("{0:mm}:{0:ss}", minCent2Sec(Convert.ToDecimal(minCent.ToString().Replace(".", ",")))); + } + catch + { } + return answ; + } + /// + /// conversione da tempo minuti centesimali a minuti/secondi + /// + /// + /// + protected TimeSpan minCent2Sec(decimal valore) + { + TimeSpan answ = new TimeSpan(0, 0, 1); + try + { + answ = new TimeSpan(0, Convert.ToInt32(valore), Convert.ToInt32((valore - Convert.ToInt32(valore)) * 60)); + } + catch + { } + return answ; + } + + #endregion + } +} \ No newline at end of file diff --git a/MP-ADM/CTrackBCode.aspx.cs b/MP-ADM/CTrackBCode.aspx.cs index fab68265..7e005126 100644 --- a/MP-ADM/CTrackBCode.aspx.cs +++ b/MP-ADM/CTrackBCode.aspx.cs @@ -3,28 +3,28 @@ using System; namespace MP_ADM { - public partial class CTrackBCode : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) + public partial class CTrackBCode : BasePage { - ((MoonPro)this.Master).headCssClass = "bg-secondary text-warning"; - ((MoonPro)this.Master).mainCssClass = "table-secondary"; - checkEnabled(); - string codPre = memLayer.ML.CRS("OptAdmCTrack_CodPre"); - mod_barcode.codOrdPre = codPre != "" ? codPre : "OPR"; - mod_gestPromODL.enableSelFase = memLayer.ML.CRB("OptCTrack_enbSelFase"); - mod_gestPromODL.CodGruppo = memLayer.ML.CRS("OptCTrack_CodGruppo"); + protected void Page_Load(object sender, EventArgs e) + { + ((MoonPro)this.Master).headCssClass = "bg-secondary text-warning"; + ((MoonPro)this.Master).mainCssClass = "table-secondary"; + checkEnabled(); + string codPre = memLayer.ML.CRS("OptAdmCTrack_CodPre"); + mod_barcode.codOrdPre = codPre != "" ? codPre : "OPR"; + mod_gestPromODL.enableSelFase = memLayer.ML.CRB("OptCTrack_enbSelFase"); + mod_gestPromODL.CodGruppo = memLayer.ML.CRS("OptCTrack_CodGruppo"); + } + private void checkEnabled() + { + bool optPar = memLayer.ML.CRB("OptAdmCTrackEnabled"); + divContent.Visible = optPar; + string messaggio = ""; + if (!optPar) + { + messaggio = "Attenzione: Gestione CTrack disabilitata"; + } + lblDataImportOut.Text = messaggio; + } } - private void checkEnabled() - { - bool optPar = memLayer.ML.CRB("OptAdmCTrackEnabled"); - divContent.Visible = optPar; - string messaggio = ""; - if (!optPar) - { - messaggio = "Attenzione: Gestione CTrack disabilitata"; - } - lblDataImportOut.Text = messaggio; - } - } } \ No newline at end of file diff --git a/MP-ADM/DataImport.aspx.cs b/MP-ADM/DataImport.aspx.cs index 7b9f246f..b02f6fce 100644 --- a/MP-ADM/DataImport.aspx.cs +++ b/MP-ADM/DataImport.aspx.cs @@ -4,43 +4,39 @@ using System; namespace MP_ADM { - public partial class DataImport : System.Web.UI.Page - { - /// - /// Oggetto datalayer specifico - /// - DataLayer DataLayerObj = new DataLayer(); - protected void Page_Load(object sender, EventArgs e) + public partial class DataImport : BasePage { - checkEnabled(); - } + protected void Page_Load(object sender, EventArgs e) + { + checkEnabled(); + } - private void checkEnabled() - { - bool optPar = memLayer.ML.CRB("OptAdmDB_IS_EnabFileImp"); - lbtProImportIS.Visible = optPar; - string messaggio = ""; - if (!optPar) - { - messaggio = "Attenzione: import disabilitato"; - } - lblDataImportOut.Text = messaggio; - } + private void checkEnabled() + { + bool optPar = memLayer.ML.CRB("OptAdmDB_IS_EnabFileImp"); + lbtProImportIS.Visible = optPar; + string messaggio = ""; + if (!optPar) + { + messaggio = "Attenzione: import disabilitato"; + } + lblDataImportOut.Text = messaggio; + } - /// - /// Esegue import dati - /// - /// - /// - protected void lbtProImportIS_Click(object sender, EventArgs e) - { - bool OptAdmDB_IS_EnabFileImp = memLayer.ML.CRB("OptAdmDB_IS_EnabFileImp"); - // se abilitato... - if (OptAdmDB_IS_EnabFileImp) - { - // chiamo import... - DataLayerObj.taWKS.All_ImportFile_Process(null, null, null, null, 0, 0); - } + /// + /// Esegue import dati + /// + /// + /// + protected void lbtProImportIS_Click(object sender, EventArgs e) + { + bool OptAdmDB_IS_EnabFileImp = memLayer.ML.CRB("OptAdmDB_IS_EnabFileImp"); + // se abilitato... + if (OptAdmDB_IS_EnabFileImp) + { + // chiamo import... + DataLayerObj.taWKS.All_ImportFile_Process(null, null, null, null, 0, 0); + } + } } - } } \ No newline at end of file diff --git a/MP-ADM/Default.aspx.cs b/MP-ADM/Default.aspx.cs index a37844fb..0db11a0e 100644 --- a/MP-ADM/Default.aspx.cs +++ b/MP-ADM/Default.aspx.cs @@ -2,11 +2,11 @@ namespace MP_ADM { - public partial class _Default : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) + public partial class _Default : System.Web.UI.Page { - Response.Redirect("./login.aspx"); + protected void Page_Load(object sender, EventArgs e) + { + Response.Redirect("./login.aspx"); + } } - } } diff --git a/MP-ADM/GestKIT.aspx.cs b/MP-ADM/GestKIT.aspx.cs index f680aad8..89455c07 100644 --- a/MP-ADM/GestKIT.aspx.cs +++ b/MP-ADM/GestKIT.aspx.cs @@ -3,65 +3,65 @@ using System; namespace MP_ADM { - public partial class GestKIT : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) + public partial class GestKIT : BasePage { - checkEnabled(); - string codPre = memLayer.ML.CRS("OptAdmKit_CodPre"); - mod_barcode.codOrdPre = codPre != "" ? codPre : "KIT"; - mod_gestPromODL.codOrdPre = mod_barcode.codOrdPre; - mod_gestPromODL.enableSelFase = memLayer.ML.CRB("OptBCode_enbSelFase"); - mod_gestPromODL.CodGruppo = memLayer.ML.CRS("OptBCode_CodGruppo"); - mod_barcode.eh_comandoRegistrato += Mod_barcode_eh_comandoRegistrato; - mod_barcode.eh_dataRead += Mod_barcode_eh_dataRead; - mod_gestKIT.eh_selKit += Mod_gestKIT_eh_selKit; - } + protected void Page_Load(object sender, EventArgs e) + { + checkEnabled(); + string codPre = memLayer.ML.CRS("OptAdmKit_CodPre"); + mod_barcode.codOrdPre = codPre != "" ? codPre : "KIT"; + mod_gestPromODL.codOrdPre = mod_barcode.codOrdPre; + mod_gestPromODL.enableSelFase = memLayer.ML.CRB("OptBCode_enbSelFase"); + mod_gestPromODL.CodGruppo = memLayer.ML.CRS("OptBCode_CodGruppo"); + mod_barcode.eh_comandoRegistrato += Mod_barcode_eh_comandoRegistrato; + mod_barcode.eh_dataRead += Mod_barcode_eh_dataRead; + mod_gestKIT.eh_selKit += Mod_gestKIT_eh_selKit; + } - private void checkEnabled() - { - bool optPar = memLayer.ML.CRB("OptAdmKitEnabled"); - divContent.Visible = optPar; - lblDataImportOut.Visible = !optPar; - string messaggio = ""; - if (!optPar) - { - messaggio = "Attenzione: Gestione KIT disabilitata"; - lblDataImportOut.Text = messaggio; - } - } + private void checkEnabled() + { + bool optPar = memLayer.ML.CRB("OptAdmKitEnabled"); + divContent.Visible = optPar; + lblDataImportOut.Visible = !optPar; + string messaggio = ""; + if (!optPar) + { + messaggio = "Attenzione: Gestione KIT disabilitata"; + lblDataImportOut.Text = messaggio; + } + } - private void Mod_gestKIT_eh_selKit(object sender, EventArgs e) - { - // invio ultimo kit creato a barcode... - mod_barcode.BCodeVal = mod_gestKIT.lastKitMade; - mod_barcode.processInput(); - } + private void Mod_gestKIT_eh_selKit(object sender, EventArgs e) + { + // invio ultimo kit creato a barcode... + mod_barcode.BCodeVal = mod_gestKIT.lastKitMade; + mod_barcode.processInput(); + } - private void Mod_barcode_eh_dataRead(object sender, EventArgs e) - { - // verifico input su KIT x lettura "grezza" - string rawInput = mod_barcode.rawInput; - mod_gestKIT.lastInput = rawInput; - mod_gestKIT.doUpdate(); - } + private void Mod_barcode_eh_dataRead(object sender, EventArgs e) + { + // verifico input su KIT x lettura "grezza" + string rawInput = mod_barcode.rawInput; + mod_gestKIT.lastInput = rawInput; + mod_gestKIT.doUpdate(); + } - private void Mod_barcode_eh_comandoRegistrato(object sender, EventArgs e) - { - // verifico input su KIT x comando completo - string BCodeVal = mod_barcode.BCodeVal; - // se è un ORDINE... procedo! - if (BCodeVal.IndexOf("OPR") == 0) - { - // aggiungo ordine... - mod_gestKIT.addOrdArt(mod_barcode.codOrd, mod_barcode.codArt, mod_barcode.descArt, mod_barcode.qta); - mod_gestKIT.lastInput = ""; - } - else - { - mod_gestKIT.lastInput = mod_barcode.BCodeVal; - } - mod_gestKIT.doUpdate(); + private void Mod_barcode_eh_comandoRegistrato(object sender, EventArgs e) + { + // verifico input su KIT x comando completo + string BCodeVal = mod_barcode.BCodeVal; + // se è un ORDINE... procedo! + if (BCodeVal.IndexOf("OPR") == 0) + { + // aggiungo ordine... + mod_gestKIT.addOrdArt(mod_barcode.codOrd, mod_barcode.codArt, mod_barcode.descArt, mod_barcode.qta); + mod_gestKIT.lastInput = ""; + } + else + { + mod_gestKIT.lastInput = mod_barcode.BCodeVal; + } + mod_gestKIT.doUpdate(); + } } - } } \ No newline at end of file diff --git a/MP-ADM/HwSwInfo.aspx.cs b/MP-ADM/HwSwInfo.aspx.cs index 56090d7a..5f8a7fb4 100644 --- a/MP-ADM/HwSwInfo.aspx.cs +++ b/MP-ADM/HwSwInfo.aspx.cs @@ -7,11 +7,11 @@ using System.Web.UI.WebControls; namespace MP_ADM { - public partial class HwSwInfo : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) + public partial class HwSwInfo : BasePage { + protected void Page_Load(object sender, EventArgs e) + { + } } - } } \ No newline at end of file diff --git a/MP-ADM/MP-ADM.csproj b/MP-ADM/MP-ADM.csproj index 6ecaf08c..8cbda36f 100644 --- a/MP-ADM/MP-ADM.csproj +++ b/MP-ADM/MP-ADM.csproj @@ -282,9 +282,6 @@ - - PreserveNewest - @@ -655,6 +652,12 @@ Barcode.aspx + + ASPXCodeBehind + + + ASPXCodeBehind + BCode.aspx ASPXCodeBehind diff --git a/MP-ADM/Planner.aspx.cs b/MP-ADM/Planner.aspx.cs index cdccd8ab..0ebad8ab 100644 --- a/MP-ADM/Planner.aspx.cs +++ b/MP-ADM/Planner.aspx.cs @@ -3,98 +3,98 @@ using System; namespace MP_ADM { - public partial class Planner : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) + public partial class Planner : BasePage { - if(!Page.IsPostBack) - { - toggleVisibility(); - } - checkEnabled(); - string codPre = memLayer.ML.CRS("OptAdmKit_CodPre"); - mod_planStats.eh_reset += Mod_planStats_eh_reset; - mod_planStats.eh_selVal += Mod_planStats_eh_selVal; - mod_planCreate.eh_ucev += Mod_planCreate_eh_ucev; - } + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + toggleVisibility(); + } + checkEnabled(); + string codPre = memLayer.ML.CRS("OptAdmKit_CodPre"); + mod_planStats.eh_reset += Mod_planStats_eh_reset; + mod_planStats.eh_selVal += Mod_planStats_eh_selVal; + mod_planCreate.eh_ucev += Mod_planCreate_eh_ucev; + } - private void Mod_planCreate_eh_ucev(object sender, EventArgs e) - { - // se trovo evento select/reset mostro/nascondo dettagli... - ucEvent evento = (ucEvent)e; - switch (evento.tipoEvento) - { - case ucEvType.ReqUpdateParent: - mod_planStats.doReset(); - mod_gestPromODL_OUT.resetSelezione(); - break; - default: - break; - } - } + private void Mod_planCreate_eh_ucev(object sender, EventArgs e) + { + // se trovo evento select/reset mostro/nascondo dettagli... + ucEvent evento = (ucEvent)e; + switch (evento.tipoEvento) + { + case ucEvType.ReqUpdateParent: + mod_planStats.doReset(); + mod_gestPromODL_OUT.resetSelezione(); + break; + default: + break; + } + } - protected void lbtToggle_Click(object sender, EventArgs e) - { - toggleVisibility(); - } + protected void lbtToggle_Click(object sender, EventArgs e) + { + toggleVisibility(); + } - private void toggleVisibility() - { - divPromOUT.Visible = !divPromOUT.Visible; - tgIcon.Attributes["class"] = divPromOUT.Visible ? "fa fa-chevron-up" : "fa fa-chevron-down"; - } - private void Mod_planStats_eh_selVal(object sender, EventArgs e) - { - fixSelStat(); - } + private void toggleVisibility() + { + divPromOUT.Visible = !divPromOUT.Visible; + tgIcon.Attributes["class"] = divPromOUT.Visible ? "fa fa-chevron-up" : "fa fa-chevron-down"; + } + private void Mod_planStats_eh_selVal(object sender, EventArgs e) + { + fixSelStat(); + } - private void Mod_planStats_eh_reset(object sender, EventArgs e) - { - fixSelStat(); - } + private void Mod_planStats_eh_reset(object sender, EventArgs e) + { + fixSelStat(); + } - protected void fixSelStat() - { - mod_planCreate.CodGruppo = mod_planStats.CodGruppo; - mod_planCreate.IdxMacchina = mod_planStats.IdxMacchina; - mod_planCreate.CodArticolo = mod_planStats.CodArticolo; - mod_planCreate.doUpdate(); - } + protected void fixSelStat() + { + mod_planCreate.CodGruppo = mod_planStats.CodGruppo; + mod_planCreate.IdxMacchina = mod_planStats.IdxMacchina; + mod_planCreate.CodArticolo = mod_planStats.CodArticolo; + mod_planCreate.doUpdate(); + } - private void checkEnabled() - { - bool optPar = memLayer.ML.CRB("OptAdmKitEnabled"); - divContent.Visible = optPar; - lblDataImportOut.Visible = !optPar; - string messaggio = ""; - if (!optPar) - { - messaggio = "Attenzione: Gestione KIT disabilitata"; - lblDataImportOut.Text = messaggio; - } - } + private void checkEnabled() + { + bool optPar = memLayer.ML.CRB("OptAdmKitEnabled"); + divContent.Visible = optPar; + lblDataImportOut.Visible = !optPar; + string messaggio = ""; + if (!optPar) + { + messaggio = "Attenzione: Gestione KIT disabilitata"; + lblDataImportOut.Text = messaggio; + } + } - private void Mod_gestKIT_eh_selKit(object sender, EventArgs e) - { + private void Mod_gestKIT_eh_selKit(object sender, EventArgs e) + { #if false // invio ultimo kit creato a barcode... mod_barcode.BCodeVal = mod_gestKIT.lastKitMade; mod_barcode.processInput(); #endif - } + } - private void Mod_barcode_eh_dataRead(object sender, EventArgs e) - { + private void Mod_barcode_eh_dataRead(object sender, EventArgs e) + { #if false // verifico input su KIT x lettura "grezza" string rawInput = mod_barcode.rawInput; mod_gestKIT.lastInput = rawInput; mod_gestKIT.doUpdate(); #endif - } + } - private void Mod_barcode_eh_comandoRegistrato(object sender, EventArgs e) - { + private void Mod_barcode_eh_comandoRegistrato(object sender, EventArgs e) + { #if false // verifico input su KIT x comando completo string BCodeVal = mod_barcode.BCodeVal; @@ -111,6 +111,6 @@ namespace MP_ADM } mod_gestKIT.doUpdate(); #endif + } } - } } \ No newline at end of file diff --git a/MP-ADM/StoricoTC.aspx.cs b/MP-ADM/StoricoTC.aspx.cs index c4d2c5dd..0b6b21f1 100644 --- a/MP-ADM/StoricoTC.aspx.cs +++ b/MP-ADM/StoricoTC.aspx.cs @@ -2,7 +2,7 @@ namespace MP_ADM { - public partial class StoricoTC : System.Web.UI.Page + public partial class StoricoTC : BasePage { protected void Page_Load(object sender, EventArgs e) { diff --git a/MP-ADM/Web.config b/MP-ADM/Web.config index d82e9796..a7a989e7 100644 --- a/MP-ADM/Web.config +++ b/MP-ADM/Web.config @@ -4,356 +4,358 @@ https://go.microsoft.com/fwlink/?LinkId=169433 --> - - -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + diff --git a/MP-ADM/WebMasterPages/AjaxSimple.master b/MP-ADM/WebMasterPages/AjaxSimple.master index f82afa17..6edbcedc 100644 --- a/MP-ADM/WebMasterPages/AjaxSimple.master +++ b/MP-ADM/WebMasterPages/AjaxSimple.master @@ -1,7 +1,8 @@ <%@ Master Language="C#" AutoEventWireup="True" Inherits="AjaxSimple" CodeBehind="AjaxSimple.master.cs" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> -<%@ Register Src="~/WebUserControls/mod_menuBottom.ascx" TagName="mod_menuBottom" TagPrefix="uc1" %> +<%@ Register Src="~/WebUserControls/mod_menuBottom.ascx" TagPrefix="uc1" TagName="mod_menuBottom" %> + @@ -28,7 +29,7 @@ - + diff --git a/MP-ADM/WebMasterPages/AjaxSimple.master.cs b/MP-ADM/WebMasterPages/AjaxSimple.master.cs index 29c4c87c..eb2d6baf 100644 --- a/MP-ADM/WebMasterPages/AjaxSimple.master.cs +++ b/MP-ADM/WebMasterPages/AjaxSimple.master.cs @@ -1,11 +1,12 @@ +using SteamWare; using System; using System.Web.UI; public partial class AjaxSimple : System.Web.UI.MasterPage { - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - Page.Title = SteamWare.memLayer.ML.CRS("_titoloPagina"); - } + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + Page.Title = memLayer.ML.CRS("_titoloPagina"); + } } diff --git a/MP-ADM/WebMasterPages/AjaxSimple.master.designer.cs b/MP-ADM/WebMasterPages/AjaxSimple.master.designer.cs index 263fe0fc..2688230b 100644 --- a/MP-ADM/WebMasterPages/AjaxSimple.master.designer.cs +++ b/MP-ADM/WebMasterPages/AjaxSimple.master.designer.cs @@ -1,49 +1,50 @@ //------------------------------------------------------------------------------ -// -// This code was generated by a tool. +// +// Codice generato da uno strumento. // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// //------------------------------------------------------------------------------ -public partial class AjaxSimple { - +public partial class AjaxSimple +{ + /// - /// form1 control. + /// Controllo form1. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// - /// sm control. + /// Controllo sm. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.ScriptManager sm; - + /// - /// ContentPlaceHolder1 control. + /// Controllo ContentPlaceHolder1. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.ContentPlaceHolder ContentPlaceHolder1; - + /// - /// Mod_menuBottom1 control. + /// Controllo mod_menuBottom. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// - protected global::mod_menuBottom Mod_menuBottom1; + protected global::MP_ADM.WebUserControls.mod_menuBottom mod_menuBottom; } diff --git a/MP-ADM/WebMasterPages/Bootstrap.Master.cs b/MP-ADM/WebMasterPages/Bootstrap.Master.cs index 6cc7a31a..1c1b2820 100644 --- a/MP-ADM/WebMasterPages/Bootstrap.Master.cs +++ b/MP-ADM/WebMasterPages/Bootstrap.Master.cs @@ -2,11 +2,11 @@ namespace MP_ADM.WebMasterPages { - public partial class Bootstrap : System.Web.UI.MasterPage - { - protected void Page_Load(object sender, EventArgs e) + public partial class Bootstrap : System.Web.UI.MasterPage { + protected void Page_Load(object sender, EventArgs e) + { + } } - } } \ No newline at end of file diff --git a/MP-ADM/WebMasterPages/MoonPro.master b/MP-ADM/WebMasterPages/MoonPro.master index 15b8d8fc..ad8ff638 100644 --- a/MP-ADM/WebMasterPages/MoonPro.master +++ b/MP-ADM/WebMasterPages/MoonPro.master @@ -3,82 +3,82 @@ <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <%@ Register Src="~/WebUserControls/mod_menuTop.ascx" TagName="mod_menuTop" TagPrefix="uc1" %> <%@ Register Src="~/WebUserControls/mod_pageTitleAndSearch.ascx" TagName="mod_pageTitleAndSearch" - TagPrefix="uc3" %> + TagPrefix="uc3" %> <%@ Register Src="~/WebUserControls/mod_ricercaGenerica.ascx" TagName="mod_ricercaGenerica" - TagPrefix="uc4" %> + TagPrefix="uc4" %> <%@ Register Src="~/WebUserControls/mod_menuBottom.ascx" TagName="mod_menuBottom" - TagPrefix="uc5" %> + TagPrefix="uc5" %> - MP-ADM: <%: SteamWare.devicesAuthProxy.getPage(Request.Url) %> - - - - - - - - - + MP-ADM: <%: SteamWare.devicesAuthProxy.getPage(Request.Url) %> + + + + + + + + + - <%-- - --%> - - <%: Scripts.Render("~/bundles/jquery") %> - <%: Scripts.Render("~/bundles/jqueryui") %> - - - + <%-- + --%> + + <%: Scripts.Render("~/bundles/jquery") %> + <%: Scripts.Render("~/bundles/jqueryui") %> + + + -
- - - <%--Framework Scripts--%> - - - - - - - - - - - <%--Site Scripts--%> - - - <%-- + + + + <%--Framework Scripts--%> + + + + + + + + + + + <%--Site Scripts--%> + + + <%-- --%> - -
-
-
- - -
-
-
-
- -
-
- -
-
+ +
+
+
+ + +
+
+
+
+ +
+
+ +
+
+
+
+ + +
+
+
+
-
- - -
-
- - +
-
-
- - + + diff --git a/MP-ADM/WebMasterPages/MoonPro.master.cs b/MP-ADM/WebMasterPages/MoonPro.master.cs index b45e1963..9fadd0a2 100644 --- a/MP-ADM/WebMasterPages/MoonPro.master.cs +++ b/MP-ADM/WebMasterPages/MoonPro.master.cs @@ -3,37 +3,37 @@ using System; public partial class MoonPro : System.Web.UI.MasterPage { - protected void Page_Load(object sender, EventArgs e) - { - } - protected string _mainCssClass; - /// - /// classe css area BODY - /// - public string mainCssClass - { - get + protected void Page_Load(object sender, EventArgs e) { - return _mainCssClass; } - set + protected string _mainCssClass; + /// + /// classe css area BODY + /// + public string mainCssClass { - _mainCssClass = value; + get + { + return _mainCssClass; + } + set + { + _mainCssClass = value; + } } - } - protected string _headCssClass; - /// - /// classe css area HEADER - /// - public string headCssClass - { - get + protected string _headCssClass; + /// + /// classe css area HEADER + /// + public string headCssClass { - return _headCssClass; + get + { + return _headCssClass; + } + set + { + _headCssClass = value; + } } - set - { - _headCssClass = value; - } - } } diff --git a/MP-ADM/WebMasterPages/MoonPro.master.designer.cs b/MP-ADM/WebMasterPages/MoonPro.master.designer.cs index 794bc26c..cc9cc78c 100644 --- a/MP-ADM/WebMasterPages/MoonPro.master.designer.cs +++ b/MP-ADM/WebMasterPages/MoonPro.master.designer.cs @@ -9,8 +9,9 @@ -public partial class MoonPro { - +public partial class MoonPro +{ + /// /// Controllo PlaceHolder1. /// @@ -19,7 +20,7 @@ public partial class MoonPro { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.PlaceHolder PlaceHolder1; - + /// /// Controllo BundleReference2. /// @@ -28,7 +29,7 @@ public partial class MoonPro { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::Microsoft.AspNet.Web.Optimization.WebForms.BundleReference BundleReference2; - + /// /// Controllo BundleReference1. /// @@ -37,7 +38,7 @@ public partial class MoonPro { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::Microsoft.AspNet.Web.Optimization.WebForms.BundleReference BundleReference1; - + /// /// Controllo form1. /// @@ -46,7 +47,7 @@ public partial class MoonPro { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// Controllo ScriptManager1. /// @@ -55,7 +56,7 @@ public partial class MoonPro { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.ScriptManager ScriptManager1; - + /// /// Controllo Mod_menuTop1. /// @@ -63,8 +64,8 @@ public partial class MoonPro { /// Campo generato automaticamente. /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// - protected global::MoonPro_site.WebUserControls.mod_menuTop Mod_menuTop1; - + protected global::MP_ADM.WebUserControls.mod_menuTop Mod_menuTop1; + /// /// Controllo UpdatePanel1. /// @@ -73,7 +74,7 @@ public partial class MoonPro { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.UpdatePanel UpdatePanel1; - + /// /// Controllo Mod_pageTitleAndSearch1. /// @@ -82,7 +83,7 @@ public partial class MoonPro { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::mod_pageTitleAndSearch Mod_pageTitleAndSearch1; - + /// /// Controllo Mod_ricercaGenerica1. /// @@ -91,7 +92,7 @@ public partial class MoonPro { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::mod_ricercaGenerica Mod_ricercaGenerica1; - + /// /// Controllo ContentPlaceHolder1. /// @@ -100,13 +101,13 @@ public partial class MoonPro { /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.ContentPlaceHolder ContentPlaceHolder1; - + /// - /// Controllo Mod_menuBottom1. + /// Controllo mod_menuBottom. /// /// /// Campo generato automaticamente. /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// - protected global::mod_menuBottom Mod_menuBottom1; + protected global::MP_ADM.WebUserControls.mod_menuBottom mod_menuBottom; } diff --git a/MP-ADM/WebUserControls/cmp_HwSwInfo.ascx b/MP-ADM/WebUserControls/cmp_HwSwInfo.ascx index cd59fce9..ac810dac 100644 --- a/MP-ADM/WebUserControls/cmp_HwSwInfo.ascx +++ b/MP-ADM/WebUserControls/cmp_HwSwInfo.ascx @@ -19,7 +19,7 @@
Module
-

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

+

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

diff --git a/MP-ADM/WebUserControls/cmp_HwSwInfo.ascx.cs b/MP-ADM/WebUserControls/cmp_HwSwInfo.ascx.cs index ed314d83..c87dae36 100644 --- a/MP-ADM/WebUserControls/cmp_HwSwInfo.ascx.cs +++ b/MP-ADM/WebUserControls/cmp_HwSwInfo.ascx.cs @@ -7,7 +7,7 @@ using System.Web.UI.WebControls; namespace MP_ADM.WebUserControls { - public partial class cmp_HwSwInfo : System.Web.UI.UserControl + public partial class cmp_HwSwInfo : BaseUserControl { protected void Page_Load(object sender, EventArgs e) { diff --git a/MP-ADM/WebUserControls/mod_anagArticoli.ascx.cs b/MP-ADM/WebUserControls/mod_anagArticoli.ascx.cs index 4d160e49..ce08ac7b 100644 --- a/MP-ADM/WebUserControls/mod_anagArticoli.ascx.cs +++ b/MP-ADM/WebUserControls/mod_anagArticoli.ascx.cs @@ -6,7 +6,7 @@ using System.Web.UI.WebControls; namespace MP_ADM.WebUserControls { - public partial class mod_anagArticoli : System.Web.UI.UserControl + public partial class mod_anagArticoli : BaseUserControl { /// @@ -37,7 +37,7 @@ namespace MP_ADM.WebUserControls protected void grView_SelectedIndexChanged(object sender, EventArgs e) { // salvo in session il valore selezionato... - SteamWare.memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, false); + memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, false); // sollevo evento nuovo valore... if (eh_selValore != null) { @@ -167,7 +167,7 @@ namespace MP_ADM.WebUserControls /// public void resetSelezione() { - SteamWare.memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView)); + memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView)); grView.SelectedIndex = -1; grView.DataBind(); lblWarning.Visible = false; diff --git a/MP-ADM/WebUserControls/mod_approvProd.ascx.cs b/MP-ADM/WebUserControls/mod_approvProd.ascx.cs index fa76d94f..59907a25 100644 --- a/MP-ADM/WebUserControls/mod_approvProd.ascx.cs +++ b/MP-ADM/WebUserControls/mod_approvProd.ascx.cs @@ -6,161 +6,148 @@ using System.Web.UI.WebControls; namespace MP_ADM.WebUserControls { - public partial class mod_approvProd : System.Web.UI.UserControl - { - /// - /// Oggetto datalayer specifico - /// - DataLayer DataLayerObj = new DataLayer(); - protected void Page_Load(object sender, EventArgs e) + public partial class mod_approvProd : BaseUserControl { - if (!Page.IsPostBack) - { - grView.PageSize = pageSize; - } - } - /// - /// dimensione pagina - /// - public int pageSize - { - get - { - int answ = 10; - try + protected void Page_Load(object sender, EventArgs e) { - answ = Convert.ToInt32(txtPageSize.Text); + if (!Page.IsPostBack) + { + grView.PageSize = pageSize; + } } - catch - { } - return answ; - } - set - { - txtPageSize.Text = value.ToString(); - } - } - /// - /// wrapper traduzione - /// - /// - /// - public string traduci(object lemma) - { - return user_std.UtSn.Traduci(lemma.ToString()); - } - /// - /// seleziona/deseleziona le righe indicate... - /// - /// - /// - protected void btnSelAll_Click(object sender, EventArgs e) - { - // seleziono tutti i valori visibili nel datagrid - CheckBox chkbox = ((CheckBox)sender); - bool isChecked = chkbox.Checked; - if (!isChecked) - { - chkbox.ToolTip = traduci("btnSelAll"); - } - else - { - chkbox.ToolTip = traduci("btnDeselAll"); - } - foreach (GridViewRow riga in grView.Rows) - { - ((CheckBox)riga.FindControl("chkSelect")).Checked = isChecked; - } - } - /// - /// conferma dati produzione verso As400 - /// - /// - /// - protected void lbtApprovaProd_Click(object sender, EventArgs e) - { - foreach (GridViewRow riga in grView.Rows) - { - int IdxODL = 0; - DateTime DataRif = DateTime.Now.Date; - if (((CheckBox)riga.FindControl("chkSelect")).Checked && ((CheckBox)riga.FindControl("chkSelect")).Visible) + /// + /// dimensione pagina + /// + public int pageSize { - try - { - IdxODL = Convert.ToInt32(((Label)riga.FindControl("lblIdxODL")).Text); - DataRif = Convert.ToDateTime(((Label)riga.FindControl("lblDataRif")).Text); - } - catch - { } - DataLayerObj.taAs400.insProdAs400(IdxODL, DataRif); + get + { + int answ = 10; + try + { + answ = Convert.ToInt32(txtPageSize.Text); + } + catch + { } + return answ; + } + set + { + txtPageSize.Text = value.ToString(); + } + } + /// + /// seleziona/deseleziona le righe indicate... + /// + /// + /// + protected void btnSelAll_Click(object sender, EventArgs e) + { + // seleziono tutti i valori visibili nel datagrid + CheckBox chkbox = ((CheckBox)sender); + bool isChecked = chkbox.Checked; + if (!isChecked) + { + chkbox.ToolTip = traduci("btnSelAll"); + } + else + { + chkbox.ToolTip = traduci("btnDeselAll"); + } + foreach (GridViewRow riga in grView.Rows) + { + ((CheckBox)riga.FindControl("chkSelect")).Checked = isChecked; + } + } + /// + /// conferma dati produzione verso As400 + /// + /// + /// + protected void lbtApprovaProd_Click(object sender, EventArgs e) + { + foreach (GridViewRow riga in grView.Rows) + { + int IdxODL = 0; + DateTime DataRif = DateTime.Now.Date; + if (((CheckBox)riga.FindControl("chkSelect")).Checked && ((CheckBox)riga.FindControl("chkSelect")).Visible) + { + try + { + IdxODL = Convert.ToInt32(((Label)riga.FindControl("lblIdxODL")).Text); + DataRif = Convert.ToDateTime(((Label)riga.FindControl("lblDataRif")).Text); + } + catch + { } + DataLayerObj.taAs400.insProdAs400(IdxODL, DataRif); + } + } + grView.DataBind(); + } + /// + /// salvo comando + /// + /// + /// + protected void lbt_Command(object sender, CommandEventArgs e) + { + memLayer.ML.setSessionVal("nextObjCommand", ((LinkButton)sender).CommandArgument); + } + /// + /// evento selezione riga: salvo tempo e qta nei campi input... + /// + /// + /// + protected void grView_SelectedIndexChanged(object sender, EventArgs e) + { + // ricavo i dati selezionati + int IdxODL = 0; + DateTime DataRif = DateTime.Now.Date; + try + { + IdxODL = Convert.ToInt32(grView.SelectedDataKey[0]); + DataRif = Convert.ToDateTime(grView.SelectedDataKey[1]); + } + catch + { } + // gestione buttons approvazione + string _comando = ""; + if (memLayer.ML.isInSessionObject("nextObjCommand")) + { + _comando = memLayer.ML.StringSessionObj("nextObjCommand"); + memLayer.ML.emptySessionVal("nextObjCommand"); + } + switch (_comando) + { + case "Approva": + DataLayerObj.taAs400.insProdAs400(IdxODL, DataRif); + break; + default: + break; + } + grView.SelectedIndex = -1; + grView.DataBind(); + } + /// + /// cambio dim pagina + /// + /// + /// + protected void txtPageSize_TextChanged(object sender, EventArgs e) + { + grView.PageSize = pageSize; + } + /// + /// effettua caricamento interventi pending + /// + /// + /// + protected void lbtImportPending_Click(object sender, EventArgs e) + { + // forzo rilettura dati da approvare... + DataLayerObj.taAs400.ImportDati_ElencoConfermeProd(); + // update tab... + grView.DataBind(); } - } - grView.DataBind(); } - /// - /// salvo comando - /// - /// - /// - protected void lbt_Command(object sender, CommandEventArgs e) - { - SteamWare.memLayer.ML.setSessionVal("nextObjCommand", ((LinkButton)sender).CommandArgument); - } - /// - /// evento selezione riga: salvo tempo e qta nei campi input... - /// - /// - /// - protected void grView_SelectedIndexChanged(object sender, EventArgs e) - { - // ricavo i dati selezionati - int IdxODL = 0; - DateTime DataRif = DateTime.Now.Date; - try - { - IdxODL = Convert.ToInt32(grView.SelectedDataKey[0]); - DataRif = Convert.ToDateTime(grView.SelectedDataKey[1]); - } - catch - { } - // gestione buttons approvazione - string _comando = ""; - if (SteamWare.memLayer.ML.isInSessionObject("nextObjCommand")) - { - _comando = SteamWare.memLayer.ML.StringSessionObj("nextObjCommand"); - SteamWare.memLayer.ML.emptySessionVal("nextObjCommand"); - } - switch (_comando) - { - case "Approva": - DataLayerObj.taAs400.insProdAs400(IdxODL, DataRif); - break; - default: - break; - } - grView.SelectedIndex = -1; - grView.DataBind(); - } - /// - /// cambio dim pagina - /// - /// - /// - protected void txtPageSize_TextChanged(object sender, EventArgs e) - { - grView.PageSize = pageSize; - } - /// - /// effettua caricamento interventi pending - /// - /// - /// - protected void lbtImportPending_Click(object sender, EventArgs e) - { - // forzo rilettura dati da approvare... - DataLayerObj.taAs400.ImportDati_ElencoConfermeProd(); - // update tab... - grView.DataBind(); - } - } } \ No newline at end of file diff --git a/MP-ADM/WebUserControls/mod_approvazioneODL.ascx.cs b/MP-ADM/WebUserControls/mod_approvazioneODL.ascx.cs index ecee21bb..f343e6d9 100644 --- a/MP-ADM/WebUserControls/mod_approvazioneODL.ascx.cs +++ b/MP-ADM/WebUserControls/mod_approvazioneODL.ascx.cs @@ -6,167 +6,131 @@ using System.Web.UI.WebControls; namespace MP_ADM.WebUserControls { - public partial class mod_approvazioneODL : System.Web.UI.UserControl - { - /// - /// Oggetto datalayer specifico - /// - DataLayer DataLayerObj = new DataLayer(); - protected void Page_Load(object sender, EventArgs e) + public partial class mod_approvazioneODL : BaseUserControl { - if (!Page.IsPostBack) - { - grView.PageSize = pageSize; - } - } - /// - /// dimensione pagina - /// - public int pageSize - { - get - { - int answ = 10; - try + protected void Page_Load(object sender, EventArgs e) { - answ = Convert.ToInt32(txtPageSize.Text); + if (!Page.IsPostBack) + { + grView.PageSize = pageSize; + } + } + /// + /// dimensione pagina + /// + public int pageSize + { + get + { + int answ = 10; + try + { + answ = Convert.ToInt32(txtPageSize.Text); + } + catch + { } + return answ; + } + set + { + txtPageSize.Text = value.ToString(); + } + } + /// + /// reset della selezione + /// + /// + /// + protected void btnReset_Click(object sender, EventArgs e) + { + resetSelezione(); + } + /// + /// resetta la selezione dei valori in caso di modifiche su altri controlli + /// + public void resetSelezione() + { + grView.SelectedIndex = -1; + grView.DataBind(); + } + /// + /// salvo comando + /// + /// + /// + protected void lbt_Command(object sender, CommandEventArgs e) + { + memLayer.ML.setSessionVal("nextObjCommand", ((LinkButton)sender).CommandArgument); + } + /// + /// evento selezione riga: salvo tempo e qta nei campi input... + /// + /// + /// + protected void grView_SelectedIndexChanged(object sender, EventArgs e) + { + // ricavo i dati selezionati + int idxOdl = 0; + try + { + idxOdl = Convert.ToInt32(grView.SelectedValue); + } + catch + { } + MapoDb.DS_ProdTempi.ODLRow rigaOdl = DataLayerObj.taODL.getByIdx(idxOdl, false)[0]; + // gestione buttons approvazione + string _comando = ""; + if (memLayer.ML.isInSessionObject("nextObjCommand")) + { + _comando = memLayer.ML.StringSessionObj("nextObjCommand"); + memLayer.ML.emptySessionVal("nextObjCommand"); + } + switch (_comando) + { + case "Approva": + DataLayerObj.taODL.approvaTC(idxOdl, string.Format("{0}{1}Approvato da: {2}", rigaOdl.Note, Environment.NewLine, user_std.UtSn.CognomeNome), user_std.UtSn.CognomeNome, true); + break; + case "Rifiuta": + DataLayerObj.taODL.approvaTC(idxOdl, string.Format("{0}{1}Rifiutato da: {2}", rigaOdl.Note, Environment.NewLine, user_std.UtSn.CognomeNome), user_std.UtSn.CognomeNome, false); + break; + default: + break; + } + grView.SelectedIndex = -1; + grView.DataBind(); + } + /// + /// cambio dim pagina + /// + /// + /// + protected void txtPageSize_TextChanged(object sender, EventArgs e) + { + grView.PageSize = pageSize; + } + /// + /// Classe css colore testo calcolato in abse ai TC + /// + /// + /// + /// + public string cssFromTempi(object _tcAssegnato, object _tcAttrezzato) + { + string answ = "text-dark"; + double tcAssegnato = 0; + double tcAttrezzato = 0; + double.TryParse(_tcAssegnato.ToString(), out tcAssegnato); + double.TryParse(_tcAttrezzato.ToString(), out tcAttrezzato); + if (tcAttrezzato > tcAssegnato) + { + answ = "text-danger"; + } + else + if (tcAttrezzato < tcAssegnato) + { + answ = "text-success"; + } + return answ; } - catch - { } - return answ; - } - set - { - txtPageSize.Text = value.ToString(); - } } - /// - /// reset della selezione - /// - /// - /// - protected void btnReset_Click(object sender, EventArgs e) - { - resetSelezione(); - } - /// - /// resetta la selezione dei valori in caso di modifiche su altri controlli - /// - public void resetSelezione() - { - grView.SelectedIndex = -1; - grView.DataBind(); - } - /// - /// salvo comando - /// - /// - /// - protected void lbt_Command(object sender, CommandEventArgs e) - { - SteamWare.memLayer.ML.setSessionVal("nextObjCommand", ((LinkButton)sender).CommandArgument); - } - /// - /// evento selezione riga: salvo tempo e qta nei campi input... - /// - /// - /// - protected void grView_SelectedIndexChanged(object sender, EventArgs e) - { - // ricavo i dati selezionati - int idxOdl = 0; - try - { - idxOdl = Convert.ToInt32(grView.SelectedValue); - } - catch - { } - MapoDb.DS_ProdTempi.ODLRow rigaOdl = DataLayerObj.taODL.getByIdx(idxOdl, false)[0]; - // gestione buttons approvazione - string _comando = ""; - if (SteamWare.memLayer.ML.isInSessionObject("nextObjCommand")) - { - _comando = SteamWare.memLayer.ML.StringSessionObj("nextObjCommand"); - SteamWare.memLayer.ML.emptySessionVal("nextObjCommand"); - } - switch (_comando) - { - case "Approva": - DataLayerObj.taODL.approvaTC(idxOdl, string.Format("{0}{1}Approvato da: {2}", rigaOdl.Note, Environment.NewLine, user_std.UtSn.CognomeNome), user_std.UtSn.CognomeNome, true); - break; - case "Rifiuta": - DataLayerObj.taODL.approvaTC(idxOdl, string.Format("{0}{1}Rifiutato da: {2}", rigaOdl.Note, Environment.NewLine, user_std.UtSn.CognomeNome), user_std.UtSn.CognomeNome, false); - break; - default: - break; - } - grView.SelectedIndex = -1; - grView.DataBind(); - } - /// - /// cambio dim pagina - /// - /// - /// - protected void txtPageSize_TextChanged(object sender, EventArgs e) - { - grView.PageSize = pageSize; - } - /// - /// formatta in minuti/sec partendo da min.cent - /// - /// - /// - public string minSec(object minCent) - { - string answ = ""; - try - { - answ = string.Format("{0:mm}:{0:ss}", minCent2Sec(Convert.ToDecimal(minCent.ToString().Replace(".", ",")))); - } - catch - { } - return answ; - } - /// - /// conversione da tempo minuti centesimali a minuti/secondi - /// - /// - /// - protected TimeSpan minCent2Sec(decimal valore) - { - TimeSpan answ = new TimeSpan(0, 0, 1); - try - { - answ = new TimeSpan(0, Convert.ToInt32(valore), Convert.ToInt32((valore - Convert.ToInt32(valore)) * 60)); - } - catch - { } - return answ; - } - /// - /// Classe css colore testo calcolato in abse ai TC - /// - /// - /// - /// - public string cssFromTempi(object _tcAssegnato, object _tcAttrezzato) - { - string answ = "text-dark"; - double tcAssegnato = 0; - double tcAttrezzato = 0; - double.TryParse(_tcAssegnato.ToString(), out tcAssegnato); - double.TryParse(_tcAttrezzato.ToString(), out tcAttrezzato); - if (tcAttrezzato > tcAssegnato) - { - answ = "text-danger"; - } - else - if (tcAttrezzato < tcAssegnato) - { - answ = "text-success"; - } - return answ; - } - } } \ No newline at end of file diff --git a/MP-ADM/WebUserControls/mod_barcode.ascx.cs b/MP-ADM/WebUserControls/mod_barcode.ascx.cs index 1f467abb..f608d7a4 100644 --- a/MP-ADM/WebUserControls/mod_barcode.ascx.cs +++ b/MP-ADM/WebUserControls/mod_barcode.ascx.cs @@ -7,703 +7,672 @@ using System.Web.UI; namespace MP_ADM.WebUserControls { - public partial class mod_barcode : System.Web.UI.UserControl - { - /// - /// Oggetto datalayer specifico - /// - DataLayer DataLayerObj = new DataLayer(); + public partial class mod_barcode : BaseUserControl + { - #region setup VARS + #region setup VARS - /// - /// RegExp x RESET / CANCEL - /// - protected string regExp_KO = memLayer.ML.cdv("regExp_KO"); - /// - /// RegExp x CONFERMA - /// - protected string regExp_OK = memLayer.ML.cdv("regExp_OK"); - /// - /// RegExp x START KIT - /// - protected string regExp_KitStart = memLayer.ML.cdv("regExp_KitStart"); - /// - /// RegExp x SAVE KIT - /// - protected string regExp_KitSave = memLayer.ML.cdv("regExp_KitSave"); - /// - /// RegExp x Find --> replace (se vettore è | delimited) - /// - protected string regExp_Find = memLayer.ML.cdv("regExp_Find"); - /// - /// RegExp x Replace da Find (se vettore è | delimited) - /// - protected string regExp_Replace = memLayer.ML.cdv("regExp_Replace"); + /// + /// RegExp x RESET / CANCEL + /// + protected string regExp_KO = memLayer.ML.cdv("regExp_KO"); + /// + /// RegExp x CONFERMA + /// + protected string regExp_OK = memLayer.ML.cdv("regExp_OK"); + /// + /// RegExp x START KIT + /// + protected string regExp_KitStart = memLayer.ML.cdv("regExp_KitStart"); + /// + /// RegExp x SAVE KIT + /// + protected string regExp_KitSave = memLayer.ML.cdv("regExp_KitSave"); + /// + /// RegExp x Find --> replace (se vettore è | delimited) + /// + protected string regExp_Find = memLayer.ML.cdv("regExp_Find"); + /// + /// RegExp x Replace da Find (se vettore è | delimited) + /// + protected string regExp_Replace = memLayer.ML.cdv("regExp_Replace"); - #endregion + #endregion - #region variabili in sessione + #region variabili in sessione - /// - /// UID formattato con "_" - /// - public string uid - { - get - { - return this.UniqueID.Replace("$", "_").Replace("-", "_"); - } - } - /// - /// Valore validazione codici ORDINE come STARTING (es: OPR,KIT) - /// - public string codOrdPre - { - get - { - return memLayer.ML.StringSessionObj(string.Format("codOrdPre_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("codOrdPre_{0}", uid), value); - } - } - public string codArt - { - get - { - return memLayer.ML.StringSessionObj(string.Format("codArt_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("codArt_{0}", uid), value); - } - } - public string descArt - { - get - { - return memLayer.ML.StringSessionObj(string.Format("descArt_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("descArt_{0}", uid), value); - } - } - public string kitCode - { - get - { - return memLayer.ML.StringSessionObj(string.Format("kitCode_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("kitCode_{0}", uid), value); - } - } - public string codOrd - { - get - { - return memLayer.ML.StringSessionObj(string.Format("codOrd_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("codOrd_{0}", uid), value); - } - } - public int qta - { - get - { - return memLayer.ML.IntSessionObj(string.Format("qta_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("qta_{0}", uid), value); - } - } - public string idxMacc - { - get - { - return memLayer.ML.StringSessionObj(string.Format("idxMacc_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("idxMacc_{0}", uid), value); - } - } - public string nomeMacc - { - get - { - return memLayer.ML.StringSessionObj(string.Format("nomeMacc_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("nomeMacc_{0}", uid), value); - } - } - public string codGruppo - { - get - { - return memLayer.ML.StringSessionObj(string.Format("codGruppo_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("codGruppo_{0}", uid), value); - } - } - /// - /// Verifica se il cod ordine è OK: - /// coerenza tra ordine e iniziale ordine (OPR/KIT) - /// - public bool checkOrdOk - { - get - { - return codOrd.StartsWith(codOrdPre); - } - } - /// - /// titolo pagina - /// - public string titolo - { - get - { - return devicesAuthProxy.getPage(Request.Url).Replace(".aspx", ""); - } - } - #endregion - #region area protected - - /// - /// dictionary comandi ammessi - /// - protected Dictionary _comandi = new Dictionary(); - /// - /// dictionary dei valori ammessi - /// - protected Dictionary _tabValori = new Dictionary(); - /// - /// oggetto comando locale alla classe - /// - protected SteamWare.inputComando comando - { - get - { - SteamWare.inputComando answ; - if (memLayer.ML.isInSessionObject("barcodeCmd")) + /// + /// Valore validazione codici ORDINE come STARTING (es: OPR,KIT) + /// + public string codOrdPre { - answ = (SteamWare.inputComando)memLayer.ML.objSessionObj("barcodeCmd"); - } - else - { - answ = new SteamWare.inputComando(); - } - return answ; - } - set - { - memLayer.ML.setSessionVal("barcodeCmd", value, false); - } - } - /// - /// oggetto comando locale alla classe - /// - public string rawInput - { - get - { - string answ; - if (memLayer.ML.isInSessionObject("barcodeRaw")) - { - answ = memLayer.ML.StringSessionObj("barcodeRaw"); - } - else - { - answ = ""; - } - return answ; - } - set - { - memLayer.ML.setSessionVal("barcodeRaw", value, false); - } - } - /// - /// al caricamento della pagina... - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) - { - if (!Page.IsPostBack) - { - resetData(); - } - - DetectAgent(); - myInitialize(); - } - /// - /// inizializzazione specifica barcode - /// - private void myInitialize() - { - if (!Page.IsPostBack) - { - lblInput.Text = traduci("PregoInserireBarcode"); - comando = new SteamWare.inputComando(); - } - } - - public string BCodeVal - { - get - { - return txtInput.Text.Trim().ToUpper(); - } - set - { - txtInput.Text = value; - } - } - - /// - /// barcode completato con invio... - /// - /// - /// - protected void txtInput_TextChanged(object sender, EventArgs e) - { - processInput(); - } - - public void processInput() - { - comando.isValid = false; - bool gotIt = false; - gotIt = checkComandi(); - if (!gotIt) - { - gotIt = checkMacc(); - } - if (!gotIt) - { - gotIt = checkIntServ(); - } - // ora check globale... - checkParam(); - // verifico se c'è stato input evento - if (comando.isValid) - { - if (comando.currCmdIn != "" || comando.descrComando != "") - { - txtInput2show = comando.descrComando; - } - else - { - txtInput2show = "---"; - } - if (comando.valore != "") - { - txtVal2show = comando.valoreTrad; - } - else - { - txtVal2show = "---"; - } - if (eh_comandoRegistrato != null) - { - eh_comandoRegistrato(this, new EventArgs()); - } - } - else - { - lblInput.Text = traduci("ComandoSconosciuto"); - lblValore.Text = BCodeVal; - comando = new SteamWare.inputComando(); - rawInput = BCodeVal; - if (eh_dataRead != null) - { - eh_dataRead(this, new EventArgs()); - } - } - BCodeVal = ""; - } - - private bool checkComandi() - { - bool answ = false; - // controllo eventuali comandi CUSTOM - if (BCodeVal == regExp_KO) - { - comando.isValid = true; - answ = true; - resetData(); - } - else if (BCodeVal == regExp_KitStart) - { - comando.isValid = true; - answ = true; - resetData(); - } - else if (BCodeVal == regExp_KitSave) - { - comando.isValid = true; - answ = true; - resetData(); - } - else if (BCodeVal == regExp_OK) - { - // comando valido SE ho ordine coerente... - if (checkOrdOk) - { - comando.isValid = true; - // recupero il codGruppo da macchina... (primo) - if (codGruppo == "") - { - var tabAG = DataLayerObj.taAG.getFaseByIdxMacc(idxMacc); - if (tabAG.Rows.Count > 0) + get { - codGruppo = tabAG[0].CodGruppo; + return memLayer.ML.StringSessionObj(string.Format("codOrdPre_{0}", uid)); } - } - // controllo se ho tutti i dati necessari... - if (codOrd != "" && codArt != "" && codGruppo != "" && idxMacc != "" && qta > 0) - { - // recupero TC promessa da ultimo per articolo/macchina - decimal TCiclo = 0; - int pzPallet = 1; - DS_ProdTempi.ODLDataTable tabODL = DataLayerObj.taODL.getByMacchinaArticolo(codArt, idxMacc); - // se non lo trovo prendo da SOLO ARTICOLO - if (tabODL.Rows.Count == 0) + set { - tabODL = DataLayerObj.taODL.getByMacchinaArticolo(codArt, ""); + memLayer.ML.setSessionVal(string.Format("codOrdPre_{0}", uid), value); } - // recupero TCiclo - if (tabODL.Rows.Count > 0) + } + public string codArt + { + get { - TCiclo = tabODL[0].TCAssegnato; - pzPallet = tabODL[0].PzPallet; + return memLayer.ML.StringSessionObj(string.Format("codArt_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("codArt_{0}", uid), value); + } + } + public string descArt + { + get + { + return memLayer.ML.StringSessionObj(string.Format("descArt_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("descArt_{0}", uid), value); + } + } + public string kitCode + { + get + { + return memLayer.ML.StringSessionObj(string.Format("kitCode_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("kitCode_{0}", uid), value); + } + } + public string codOrd + { + get + { + return memLayer.ML.StringSessionObj(string.Format("codOrd_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("codOrd_{0}", uid), value); + } + } + public int qta + { + get + { + return memLayer.ML.IntSessionObj(string.Format("qta_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("qta_{0}", uid), value); + } + } + public string idxMacc + { + get + { + return memLayer.ML.StringSessionObj(string.Format("idxMacc_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("idxMacc_{0}", uid), value); + } + } + public string nomeMacc + { + get + { + return memLayer.ML.StringSessionObj(string.Format("nomeMacc_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("nomeMacc_{0}", uid), value); + } + } + public string codGruppo + { + get + { + return memLayer.ML.StringSessionObj(string.Format("codGruppo_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("codGruppo_{0}", uid), value); + } + } + /// + /// Verifica se il cod ordine è OK: + /// coerenza tra ordine e iniziale ordine (OPR/KIT) + /// + public bool checkOrdOk + { + get + { + return codOrd.StartsWith(codOrdPre); + } + } + + #endregion + + #region area protected + + /// + /// dictionary comandi ammessi + /// + protected Dictionary _comandi = new Dictionary(); + /// + /// dictionary dei valori ammessi + /// + protected Dictionary _tabValori = new Dictionary(); + /// + /// oggetto comando locale alla classe + /// + protected inputComando comando + { + get + { + inputComando answ; + if (memLayer.ML.isInSessionObject("barcodeCmd")) + { + answ = (inputComando)memLayer.ML.objSessionObj("barcodeCmd"); + } + else + { + answ = new inputComando(); + } + return answ; + } + set + { + memLayer.ML.setSessionVal("barcodeCmd", value, false); + } + } + /// + /// oggetto comando locale alla classe + /// + public string rawInput + { + get + { + string answ; + if (memLayer.ML.isInSessionObject("barcodeRaw")) + { + answ = memLayer.ML.StringSessionObj("barcodeRaw"); + } + else + { + answ = ""; + } + return answ; + } + set + { + memLayer.ML.setSessionVal("barcodeRaw", value, false); + } + } + /// + /// al caricamento della pagina... + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!Page.IsPostBack) + { + resetData(); + } + + DetectAgent(); + myInitialize(); + } + /// + /// inizializzazione specifica barcode + /// + private void myInitialize() + { + if (!Page.IsPostBack) + { + lblInput.Text = traduci("PregoInserireBarcode"); + comando = new inputComando(); + } + } + + public string BCodeVal + { + get + { + return txtInput.Text.Trim().ToUpper(); + } + set + { + txtInput.Text = value; + } + } + + /// + /// barcode completato con invio... + /// + /// + /// + protected void txtInput_TextChanged(object sender, EventArgs e) + { + processInput(); + } + + public void processInput() + { + comando.isValid = false; + bool gotIt = false; + gotIt = checkComandi(); + if (!gotIt) + { + gotIt = checkMacc(); + } + if (!gotIt) + { + gotIt = checkIntServ(); + } + // ora check globale... + checkParam(); + // verifico se c'è stato input evento + if (comando.isValid) + { + if (comando.currCmdIn != "" || comando.descrComando != "") + { + txtInput2show = comando.descrComando; + } + else + { + txtInput2show = "---"; + } + if (comando.valore != "") + { + txtVal2show = comando.valoreTrad; + } + else + { + txtVal2show = "---"; + } + if (eh_comandoRegistrato != null) + { + eh_comandoRegistrato(this, new EventArgs()); + } } - // se non lo trovo è valore default da config DB (oppure 59...) else { - TCiclo = memLayer.ML.CRI("TCicloStd"); + lblInput.Text = traduci("ComandoSconosciuto"); + lblValore.Text = BCodeVal; + comando = new inputComando(); + rawInput = BCodeVal; + if (eh_dataRead != null) + { + eh_dataRead(this, new EventArgs()); + } } - if (TCiclo == 0) + BCodeVal = ""; + } + + private bool checkComandi() + { + bool answ = false; + // controllo eventuali comandi CUSTOM + if (BCodeVal == regExp_KO) { - TCiclo = 59; + comando.isValid = true; + answ = true; + resetData(); } - // creo nuova PROMESSA ODL... - DataLayerObj.taPODL.insertQuery(codOrd, codOrd, true, codArt, codGruppo, idxMacc, qta, TCiclo, DateTime.Now, 1, pzPallet, descArt); - } - } - // resetto ricaricando - Response.Redirect(titolo); - } - return answ; - } - - private void resetData() - { - // resetto - idxMacc = ""; - nomeMacc = ""; - codArt = ""; - descArt = ""; - codGruppo = ""; - codOrd = ""; - qta = 0; - } - - private bool checkMacc() - { - bool answ = false; - // verifico se il barcode è di una macchina... - var risultato = DataLayerObj.taMacchine.GetByIdx(BCodeVal); - if (risultato.Rows.Count > 0) - { - idxMacc = BCodeVal; - comando.valore = BCodeVal; - comando.isValid = true; - answ = true; - // recupero altri dati - var rRes = risultato[0]; - nomeMacc = rRes.Descrizione; - // imposto il gruppo cercandolo... - var gruppi = DataLayerObj.taAG.getByIdxMacc(BCodeVal); - if (gruppi.Rows.Count > 0) - { - // salvo primo... - codGruppo = gruppi[0].CodGruppo; - } - } - return answ; - } - - /// - /// verifica parametri in sessione x i valori eventualmente da mettere al comando... - /// - private void checkParam() - { - // ho macchina ed articolo? - bool hasAllData = (idxMacc != "" && codArt != ""); - string valOut = ""; - if (codArt != "") - { - valOut += string.Format("{0}
Art: {1} | qta: {2:N0} | kit: {3}
{4}", codOrd, codArt, qta, kitCode, descArt); - } - if (idxMacc != "") - { - valOut += string.Format("
{0} | {1}", idxMacc, nomeMacc); - } - // imposto... - comando.valoreTrad = valOut; - // controllo se ho tutto... - comando.descrComando = ""; - if (idxMacc == "") - { - comando.descrComando += " - Manca Impianto - "; - } - if (codArt == "" || codOrd == "") - { - comando.descrComando += " - Manca Ordine Produzione - "; - } - if (!checkOrdOk) - { - comando.descrComando += " - Tipo Ordine errato - "; - } - if (hasAllData && checkOrdOk) - { - comando.descrComando = "Confermare caricamento"; - } - } - - private bool checkIntServ() - { - bool answ = false; - // IN PRIMIS se c'è in config preprocesso BCode x Find-Replace - string BCodeFilt = BCodeVal; - if (regExp_Find != "") - { - // splitto i vettori - var vettFind = regExp_Find.Split('|'); - var vettRepl = regExp_Replace.Split('|'); - // se ho tanti find quanti replace procedo... - if (vettFind.Length == vettRepl.Length) - { - for (int i = 0; i < vettFind.Length; i++) - { - BCodeFilt = BCodeFilt.Replace(vettFind[i], vettRepl[i]); - } - } - else - { - logger.lg.scriviLog(string.Format("Attenzione: problema in decodifica barcode find/replace, i parametri non corrispondono una volta esplosi i vettori:{0}find: {1}{0}replace: {2}", Environment.NewLine, regExp_Find, regExp_Replace)); - } - } - // cerco esplicitamente sul DB IntegrationServices... - var risultato = DataLayerObj.taIS_TrDati.getOrdini(BCodeFilt); - if (risultato.Rows.Count > 0) - { - var rRes = risultato[0]; - // verifico da config COME decodificare IS... - string BCodeIS_DType = memLayer.ML.cdv("BCodeIS_DType"); - // verifico corrispondano i formati... - if (rRes.DataType == BCodeIS_DType) - { - // cerco i dati e decodifico... togliendo eventuale VETTORE "[..]" - var jsonData = risultato[0].ValueOUT.Replace("[", "").Replace("]", ""); - try - { - if (BCodeIS_DType == "Colcom_Order") + else if (BCodeVal == regExp_KitStart) { - // a seconda del tipo decodifico... - ISTD_OrderColcom currVal = JsonConvert.DeserializeObject(jsonData); - comando.isValid = true; - answ = true; - // salvo ordine / articolo / qta - codOrd = currVal.CodOrdine; - codArt = currVal.CodArticolo; - descArt = currVal.DescrArticolo; - kitCode = currVal.KitCode; - qta = (int)currVal.Qta; - comando.valore = jsonData;// string.Format("{0}#{1}#{2:N0}", codOrd, codArt, qta); - comando.currCmdIn = "OrdArtQta"; + comando.isValid = true; + answ = true; + resetData(); } - } - catch (Exception exc) - { - logger.lg.scriviLog(string.Format("Errore in decodifica obj JSON:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION); - } + else if (BCodeVal == regExp_KitSave) + { + comando.isValid = true; + answ = true; + resetData(); + } + else if (BCodeVal == regExp_OK) + { + // comando valido SE ho ordine coerente... + if (checkOrdOk) + { + comando.isValid = true; + // recupero il codGruppo da macchina... (primo) + if (codGruppo == "") + { + var tabAG = DataLayerObj.taAG.getFaseByIdxMacc(idxMacc); + if (tabAG.Rows.Count > 0) + { + codGruppo = tabAG[0].CodGruppo; + } + } + // controllo se ho tutti i dati necessari... + if (codOrd != "" && codArt != "" && codGruppo != "" && idxMacc != "" && qta > 0) + { + // recupero TC promessa da ultimo per articolo/macchina + decimal TCiclo = 0; + int pzPallet = 1; + DS_ProdTempi.ODLDataTable tabODL = DataLayerObj.taODL.getByMacchinaArticolo(codArt, idxMacc); + // se non lo trovo prendo da SOLO ARTICOLO + if (tabODL.Rows.Count == 0) + { + tabODL = DataLayerObj.taODL.getByMacchinaArticolo(codArt, ""); + } + // recupero TCiclo + if (tabODL.Rows.Count > 0) + { + TCiclo = tabODL[0].TCAssegnato; + pzPallet = tabODL[0].PzPallet; + } + // se non lo trovo è valore default da config DB (oppure 59...) + else + { + TCiclo = memLayer.ML.CRI("TCicloStd"); + } + if (TCiclo == 0) + { + TCiclo = 59; + } + // creo nuova PROMESSA ODL... + DataLayerObj.taPODL.insertQuery(codOrd, codOrd, true, codArt, codGruppo, idxMacc, qta, TCiclo, DateTime.Now, 1, pzPallet, descArt); + } + } + // resetto ricaricando + Response.Redirect(titolo); + } + return answ; } - } - return answ; - } - /// - /// verifico se sia un valore compreso nell'elenco fornito - /// - private void isValore() - { - if (_tabValori.ContainsKey(BCodeVal)) // verifico se il comando digitato esista... - { - comando.isValid = true; - comando.valore = BCodeVal; - _tabValori.TryGetValue(BCodeVal, out comando.valoreTrad); - } - } - /// - /// verifica se il comando inserito sia valido - /// - private void isInputEvent() - { - if (_comandi.ContainsKey(BCodeVal)) // verifico se il comando digitato esista... - { - comando.isValid = true; - // salvo comando precedente (se c'è...) - comando.prevCmdIn = comando.currCmdIn; - comando.descrComandoPrev = comando.descrComando; - comando.currCmdIn = BCodeVal; - _comandi.TryGetValue(BCodeVal, out comando.descrComando); - } - } - /// - /// verifica quale browser usato e applica css corretto al div attorno al box - /// - private void DetectAgent() - { - System.Web.HttpBrowserCapabilities browser = Request.Browser; - if (browser.Browser == "IE") - { - pnlBarcodeBox.CssClass = "barcodeBoxIE"; - } - else - { - pnlBarcodeBox.CssClass = "barcodeBoxOther"; - } - } + private void resetData() + { + // resetto + idxMacc = ""; + nomeMacc = ""; + codArt = ""; + descArt = ""; + codGruppo = ""; + codOrd = ""; + qta = 0; + } + + private bool checkMacc() + { + bool answ = false; + // verifico se il barcode è di una macchina... + var risultato = DataLayerObj.taMacchine.GetByIdx(BCodeVal); + if (risultato.Rows.Count > 0) + { + idxMacc = BCodeVal; + comando.valore = BCodeVal; + comando.isValid = true; + answ = true; + // recupero altri dati + var rRes = risultato[0]; + nomeMacc = rRes.Descrizione; + // imposto il gruppo cercandolo... + var gruppi = DataLayerObj.taAG.getByIdxMacc(BCodeVal); + if (gruppi.Rows.Count > 0) + { + // salvo primo... + codGruppo = gruppi[0].CodGruppo; + } + } + return answ; + } + + /// + /// verifica parametri in sessione x i valori eventualmente da mettere al comando... + /// + private void checkParam() + { + // ho macchina ed articolo? + bool hasAllData = (idxMacc != "" && codArt != ""); + string valOut = ""; + if (codArt != "") + { + valOut += string.Format("{0}
Art: {1} | qta: {2:N0} | kit: {3}
{4}", codOrd, codArt, qta, kitCode, descArt); + } + if (idxMacc != "") + { + valOut += string.Format("
{0} | {1}", idxMacc, nomeMacc); + } + // imposto... + comando.valoreTrad = valOut; + // controllo se ho tutto... + comando.descrComando = ""; + if (idxMacc == "") + { + comando.descrComando += " - Manca Impianto - "; + } + if (codArt == "" || codOrd == "") + { + comando.descrComando += " - Manca Ordine Produzione - "; + } + if (!checkOrdOk) + { + comando.descrComando += " - Tipo Ordine errato - "; + } + if (hasAllData && checkOrdOk) + { + comando.descrComando = "Confermare caricamento"; + } + } + + private bool checkIntServ() + { + bool answ = false; + // IN PRIMIS se c'è in config preprocesso BCode x Find-Replace + string BCodeFilt = BCodeVal; + if (regExp_Find != "") + { + // splitto i vettori + var vettFind = regExp_Find.Split('|'); + var vettRepl = regExp_Replace.Split('|'); + // se ho tanti find quanti replace procedo... + if (vettFind.Length == vettRepl.Length) + { + for (int i = 0; i < vettFind.Length; i++) + { + BCodeFilt = BCodeFilt.Replace(vettFind[i], vettRepl[i]); + } + } + else + { + logger.lg.scriviLog(string.Format("Attenzione: problema in decodifica barcode find/replace, i parametri non corrispondono una volta esplosi i vettori:{0}find: {1}{0}replace: {2}", Environment.NewLine, regExp_Find, regExp_Replace)); + } + } + // cerco esplicitamente sul DB IntegrationServices... + var risultato = DataLayerObj.taIS_TrDati.getOrdini(BCodeFilt); + if (risultato.Rows.Count > 0) + { + var rRes = risultato[0]; + // verifico da config COME decodificare IS... + string BCodeIS_DType = memLayer.ML.cdv("BCodeIS_DType"); + // verifico corrispondano i formati... + if (rRes.DataType == BCodeIS_DType) + { + // cerco i dati e decodifico... togliendo eventuale VETTORE "[..]" + var jsonData = risultato[0].ValueOUT.Replace("[", "").Replace("]", ""); + try + { + if (BCodeIS_DType == "Colcom_Order") + { + // a seconda del tipo decodifico... + ISTD_OrderColcom currVal = JsonConvert.DeserializeObject(jsonData); + comando.isValid = true; + answ = true; + // salvo ordine / articolo / qta + codOrd = currVal.CodOrdine; + codArt = currVal.CodArticolo; + descArt = currVal.DescrArticolo; + kitCode = currVal.KitCode; + qta = (int)currVal.Qta; + comando.valore = jsonData;// string.Format("{0}#{1}#{2:N0}", codOrd, codArt, qta); + comando.currCmdIn = "OrdArtQta"; + } + } + catch (Exception exc) + { + logger.lg.scriviLog(string.Format("Errore in decodifica obj JSON:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION); + } + } + } + return answ; + } + + /// + /// verifico se sia un valore compreso nell'elenco fornito + /// + private void isValore() + { + if (_tabValori.ContainsKey(BCodeVal)) // verifico se il comando digitato esista... + { + comando.isValid = true; + comando.valore = BCodeVal; + _tabValori.TryGetValue(BCodeVal, out comando.valoreTrad); + } + } + /// + /// verifica se il comando inserito sia valido + /// + private void isInputEvent() + { + if (_comandi.ContainsKey(BCodeVal)) // verifico se il comando digitato esista... + { + comando.isValid = true; + // salvo comando precedente (se c'è...) + comando.prevCmdIn = comando.currCmdIn; + comando.descrComandoPrev = comando.descrComando; + comando.currCmdIn = BCodeVal; + _comandi.TryGetValue(BCodeVal, out comando.descrComando); + } + } + /// + /// verifica quale browser usato e applica css corretto al div attorno al box + /// + private void DetectAgent() + { + System.Web.HttpBrowserCapabilities browser = Request.Browser; + if (browser.Browser == "IE") + { + pnlBarcodeBox.CssClass = "barcodeBoxIE"; + } + else + { + pnlBarcodeBox.CssClass = "barcodeBoxOther"; + } + } - #endregion + #endregion - #region area public + #region area public - /// - /// effettua al ettura da sessione del comando cliccato e lo inserisce come fosse barcode - /// - public void loadBtnClickComando() - { - BCodeVal = memLayer.ML.StringSessionObj("btnCmdPress"); - memLayer.ML.emptySessionVal("btnCmdPress"); - processInput(); - } + /// + /// effettua al ettura da sessione del comando cliccato e lo inserisce come fosse barcode + /// + public void loadBtnClickComando() + { + BCodeVal = memLayer.ML.StringSessionObj("btnCmdPress"); + memLayer.ML.emptySessionVal("btnCmdPress"); + processInput(); + } - /// - /// elenco dei comandi riconosciuti - /// - public Dictionary comandiAmmessi - { - get - { - return _comandi; - } - set - { - _comandi = value; - } - } - /// - /// tabella di valori ammissibili - /// - public Dictionary tabValori - { - get - { - return _tabValori; - } - set - { - _tabValori = value; - } - } - /// - /// evento comando registrato - /// - public event EventHandler eh_comandoRegistrato; - /// - /// evento lettura dati (grezza) effettuata - /// - public event EventHandler eh_dataRead; - /// - /// comando registrato dal barcode - /// - public SteamWare.inputComando comandoRegistrato - { - get - { - return comando; - } - } - /// - /// scrive nella label input - /// - public string txtInput2show - { - set - { - lblInput.Text = value; - } - } - /// - /// scrive nella label valore - /// - public string txtVal2show - { - set - { - lblValore.Text = value; - } - } - /// - /// scrive nella label richiesta - /// - public string txtRich2show - { - set - { - lblRichiesta.Text = value; - } - } - /// - /// reset del controllo - /// - public void resetMe() - { - comando = new SteamWare.inputComando(); - txtInput2show = "Prego inserire barcode"; - txtVal2show = ""; - txtRich2show = ""; - } - /// - /// wrapper traduzione termini - /// - /// - /// - public string traduci(string lemma) - { - return user_std.UtSn.Traduci(lemma); - } + /// + /// elenco dei comandi riconosciuti + /// + public Dictionary comandiAmmessi + { + get + { + return _comandi; + } + set + { + _comandi = value; + } + } + /// + /// tabella di valori ammissibili + /// + public Dictionary tabValori + { + get + { + return _tabValori; + } + set + { + _tabValori = value; + } + } + /// + /// evento comando registrato + /// + public event EventHandler eh_comandoRegistrato; + /// + /// evento lettura dati (grezza) effettuata + /// + public event EventHandler eh_dataRead; + /// + /// comando registrato dal barcode + /// + public inputComando comandoRegistrato + { + get + { + return comando; + } + } + /// + /// scrive nella label input + /// + public string txtInput2show + { + set + { + lblInput.Text = value; + } + } + /// + /// scrive nella label valore + /// + public string txtVal2show + { + set + { + lblValore.Text = value; + } + } + /// + /// scrive nella label richiesta + /// + public string txtRich2show + { + set + { + lblRichiesta.Text = value; + } + } + /// + /// reset del controllo + /// + public void resetMe() + { + comando = new inputComando(); + txtInput2show = "Prego inserire barcode"; + txtVal2show = ""; + txtRich2show = ""; + } - #endregion - } + #endregion + } } \ No newline at end of file diff --git a/MP-ADM/WebUserControls/mod_calChiusura.ascx b/MP-ADM/WebUserControls/mod_calChiusura.ascx index 2a1b4b4a..67b8b668 100644 --- a/MP-ADM/WebUserControls/mod_calChiusura.ascx +++ b/MP-ADM/WebUserControls/mod_calChiusura.ascx @@ -1,5 +1,5 @@ <%@ Control Language="C#" AutoEventWireup="true" - Inherits="mod_calChiusura" CodeBehind="mod_calChiusura.ascx.cs" %> + Inherits="MP_ADM.WebUserControls.mod_calChiusura" CodeBehind="mod_calChiusura.ascx.cs" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> diff --git a/MP-ADM/WebUserControls/mod_calChiusura.ascx.cs b/MP-ADM/WebUserControls/mod_calChiusura.ascx.cs index 67025092..f479c29c 100644 --- a/MP-ADM/WebUserControls/mod_calChiusura.ascx.cs +++ b/MP-ADM/WebUserControls/mod_calChiusura.ascx.cs @@ -4,114 +4,117 @@ using System; using System.Web.UI; using System.Web.UI.WebControls; -public partial class mod_calChiusura : ApplicationUserControl +namespace MP_ADM.WebUserControls { - /// - /// Oggetto datalayer specifico - /// - DataLayer DataLayerObj = new DataLayer(); - public event EventHandler eh_resetSelezione; + public partial class mod_calChiusura : ApplicationUserControl + { + /// + /// Oggetto datalayer specifico + /// + DataLayer DataLayerObj = new DataLayer(); + public event EventHandler eh_resetSelezione; - protected override void Page_Load(object sender, EventArgs e) - { - base.Page_Load(sender, e); - if (!Page.IsPostBack) - { - grView.PageSize = _righeDataGridMed; - btnShowInsPeriodo.Text = traduci("btnShowInsPeriodo"); - btnInsPeriodo.Text = traduci("btnInsPeriodo"); - } - } - - /// - /// gestione evento inserimento nuovo record standard (se ZERO presenti) - /// - /// - /// - protected void btnNewFromEmpty_Click(object sender, EventArgs e) - { - // reset selezione... - resetSelezione(); - // i primi valori ("0") di default sono "ND"... li inserisco come standard... - DataLayerObj.taCalFF.Insert(DateTime.Now.Date, "-- [NUOVO] non definito --"); - grView.DataBind(); - } - /// - /// resetta la selezione dei valori in caso di modifiche su altri controlli - /// - public void resetSelezione() - { - grView.SelectedIndex = -1; - grView.DataBind(); - if (eh_resetSelezione != null) - { - eh_resetSelezione(this, new EventArgs()); - } - } - /// - /// evento dati associati a controllo - /// - /// - /// - protected void grView_DataBound(object sender, EventArgs e) - { - if (grView.Rows.Count > 0) - { - LinkButton lb; - // aggiorno gli headers - foreach (TableCell cella in grView.HeaderRow.Cells) - { - try + protected override void Page_Load(object sender, EventArgs e) { - lb = (LinkButton)cella.Controls[0]; - lb.Text = traduci(lb.Text); + base.Page_Load(sender, e); + if (!Page.IsPostBack) + { + grView.PageSize = _righeDataGridMed; + btnShowInsPeriodo.Text = traduci("btnShowInsPeriodo"); + btnInsPeriodo.Text = traduci("btnInsPeriodo"); + } + } + + /// + /// gestione evento inserimento nuovo record standard (se ZERO presenti) + /// + /// + /// + protected void btnNewFromEmpty_Click(object sender, EventArgs e) + { + // reset selezione... + resetSelezione(); + // i primi valori ("0") di default sono "ND"... li inserisco come standard... + DataLayerObj.taCalFF.Insert(DateTime.Now.Date, "-- [NUOVO] non definito --"); + grView.DataBind(); + } + /// + /// resetta la selezione dei valori in caso di modifiche su altri controlli + /// + public void resetSelezione() + { + grView.SelectedIndex = -1; + grView.DataBind(); + if (eh_resetSelezione != null) + { + eh_resetSelezione(this, new EventArgs()); + } + } + /// + /// evento dati associati a controllo + /// + /// + /// + protected void grView_DataBound(object sender, EventArgs e) + { + if (grView.Rows.Count > 0) + { + LinkButton lb; + // aggiorno gli headers + foreach (TableCell cella in grView.HeaderRow.Cells) + { + try + { + lb = (LinkButton)cella.Controls[0]; + lb.Text = traduci(lb.Text); + } + catch + { } + } + int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1); + lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord); + } + else + { + lblNumRec.Text = ""; + } + } + protected void btnShowInsPeriodo_Click(object sender, EventArgs e) + { + pnlInsPeriodo.Visible = !pnlInsPeriodo.Visible; + if (pnlInsPeriodo.Visible) + { + btnShowInsPeriodo.Text = traduci("btnHideInsPeriodo"); + } + else + { + btnShowInsPeriodo.Text = traduci("btnShowInsPeriodo"); + } + } + protected void btnInsPeriodo_Click(object sender, EventArgs e) + { + // verifico date congrue... + DateTime inizio = Convert.ToDateTime(txtDataFrom.Text); + DateTime fine = Convert.ToDateTime(txtDataTo.Text); + if (fine.CompareTo(inizio) >= 0) + { + // inserisco le voci x tutte le date nell'intervallo... + while (fine.CompareTo(inizio) >= 0) + { + DataLayerObj.taCalFF.Insert(inizio, txtDescrizione.Text); + inizio = inizio.AddDays(1); + } + // update e nascondo pannello + grView.DataBind(); + pnlInsPeriodo.Visible = false; + btnShowInsPeriodo.Text = traduci("btnShowInsPeriodo"); + lblWarning.Visible = false; + } + else + { + lblWarning.Visible = true; + lblWarning.Text = traduci("OrdineDateErrato"); + } } - catch - { } - } - int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1); - lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord); } - else - { - lblNumRec.Text = ""; - } - } - protected void btnShowInsPeriodo_Click(object sender, EventArgs e) - { - pnlInsPeriodo.Visible = !pnlInsPeriodo.Visible; - if (pnlInsPeriodo.Visible) - { - btnShowInsPeriodo.Text = traduci("btnHideInsPeriodo"); - } - else - { - btnShowInsPeriodo.Text = traduci("btnShowInsPeriodo"); - } - } - protected void btnInsPeriodo_Click(object sender, EventArgs e) - { - // verifico date congrue... - DateTime inizio = Convert.ToDateTime(txtDataFrom.Text); - DateTime fine = Convert.ToDateTime(txtDataTo.Text); - if (fine.CompareTo(inizio) >= 0) - { - // inserisco le voci x tutte le date nell'intervallo... - while (fine.CompareTo(inizio) >= 0) - { - DataLayerObj.taCalFF.Insert(inizio, txtDescrizione.Text); - inizio = inizio.AddDays(1); - } - // update e nascondo pannello - grView.DataBind(); - pnlInsPeriodo.Visible = false; - btnShowInsPeriodo.Text = traduci("btnShowInsPeriodo"); - lblWarning.Visible = false; - } - else - { - lblWarning.Visible = true; - lblWarning.Text = traduci("OrdineDateErrato"); - } - } -} +} \ No newline at end of file diff --git a/MP-ADM/WebUserControls/mod_calChiusura.ascx.designer.cs b/MP-ADM/WebUserControls/mod_calChiusura.ascx.designer.cs index 8c115f5d..f3c9b5e5 100644 --- a/MP-ADM/WebUserControls/mod_calChiusura.ascx.designer.cs +++ b/MP-ADM/WebUserControls/mod_calChiusura.ascx.designer.cs @@ -1,121 +1,125 @@ //------------------------------------------------------------------------------ -// -// This code was generated by a tool. +// +// Codice generato da uno strumento. // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// //------------------------------------------------------------------------------ +namespace MP_ADM.WebUserControls +{ -public partial class mod_calChiusura { - - /// - /// grView control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.GridView grView; - - /// - /// lblNumRec control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label lblNumRec; - - /// - /// ods control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.ObjectDataSource ods; - - /// - /// btnShowInsPeriodo control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button btnShowInsPeriodo; - - /// - /// pnlInsPeriodo control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel pnlInsPeriodo; - - /// - /// txtDataFrom control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox txtDataFrom; - - /// - /// CalendarExtender2 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::AjaxControlToolkit.CalendarExtender CalendarExtender2; - - /// - /// txtDataTo control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox txtDataTo; - - /// - /// CalendarExtender3 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::AjaxControlToolkit.CalendarExtender CalendarExtender3; - - /// - /// txtDescrizione control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox txtDescrizione; - - /// - /// btnInsPeriodo control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button btnInsPeriodo; - - /// - /// lblWarning control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label lblWarning; + public partial class mod_calChiusura + { + + /// + /// Controllo grView. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.GridView grView; + + /// + /// Controllo lblNumRec. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblNumRec; + + /// + /// Controllo ods. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.ObjectDataSource ods; + + /// + /// Controllo btnShowInsPeriodo. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Button btnShowInsPeriodo; + + /// + /// Controllo pnlInsPeriodo. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Panel pnlInsPeriodo; + + /// + /// Controllo txtDataFrom. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.TextBox txtDataFrom; + + /// + /// Controllo CalendarExtender2. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::AjaxControlToolkit.CalendarExtender CalendarExtender2; + + /// + /// Controllo txtDataTo. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.TextBox txtDataTo; + + /// + /// Controllo CalendarExtender3. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::AjaxControlToolkit.CalendarExtender CalendarExtender3; + + /// + /// Controllo txtDescrizione. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.TextBox txtDescrizione; + + /// + /// Controllo btnInsPeriodo. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Button btnInsPeriodo; + + /// + /// Controllo lblWarning. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblWarning; + } } diff --git a/MP-ADM/WebUserControls/mod_fixCal.ascx b/MP-ADM/WebUserControls/mod_fixCal.ascx index b7d3dd46..3d3a02b7 100644 --- a/MP-ADM/WebUserControls/mod_fixCal.ascx +++ b/MP-ADM/WebUserControls/mod_fixCal.ascx @@ -1,4 +1,4 @@ -<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_fixCal" Codebehind="mod_fixCal.ascx.cs" %> +<%@ Control Language="C#" AutoEventWireup="true" Inherits="MP_ADM.WebUserControls.mod_fixCal" Codebehind="mod_fixCal.ascx.cs" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %> diff --git a/MP-ADM/WebUserControls/mod_fixCal.ascx.cs b/MP-ADM/WebUserControls/mod_fixCal.ascx.cs index d50ca791..57fa0692 100644 --- a/MP-ADM/WebUserControls/mod_fixCal.ascx.cs +++ b/MP-ADM/WebUserControls/mod_fixCal.ascx.cs @@ -1,9 +1,13 @@ using System; -public partial class mod_fixCal : System.Web.UI.UserControl -{ - protected void Page_Load(object sender, EventArgs e) - { +namespace MP_ADM.WebUserControls +{ + public partial class mod_fixCal : BaseUserControl + { + protected void Page_Load(object sender, EventArgs e) + { + + } } } diff --git a/MP-ADM/WebUserControls/mod_fixCal.ascx.designer.cs b/MP-ADM/WebUserControls/mod_fixCal.ascx.designer.cs index cecce86d..24a45d8d 100644 --- a/MP-ADM/WebUserControls/mod_fixCal.ascx.designer.cs +++ b/MP-ADM/WebUserControls/mod_fixCal.ascx.designer.cs @@ -1,32 +1,33 @@ //------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4927 +// +// Codice generato da uno strumento. // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// //------------------------------------------------------------------------------ +namespace MP_ADM.WebUserControls +{ + public partial class mod_fixCal + { + /// + /// Controllo TextBox1. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.TextBox TextBox1; -public partial class mod_fixCal { - - /// - /// TextBox1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox TextBox1; - - /// - /// CalendarExtender1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::AjaxControlToolkit.CalendarExtender CalendarExtender1; + /// + /// Controllo CalendarExtender1. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::AjaxControlToolkit.CalendarExtender CalendarExtender1; + } } diff --git a/MP-ADM/WebUserControls/mod_footer.ascx.cs b/MP-ADM/WebUserControls/mod_footer.ascx.cs index 3ec6be7f..4437812e 100644 --- a/MP-ADM/WebUserControls/mod_footer.ascx.cs +++ b/MP-ADM/WebUserControls/mod_footer.ascx.cs @@ -2,12 +2,12 @@ namespace MP_ADM.WebUserControls { - public partial class mod_footer : System.Web.UI.UserControl - { - protected void Page_Load(object sender, EventArgs e) + public partial class mod_footer : BaseUserControl { - lblLastUpdt.Text = DateTime.Now.ToString("yyyy.MM.dd HH:mm:ss"); - lblVers.Text = string.Format("v.{0}", System.Reflection.Assembly.GetExecutingAssembly().GetName().Version); + protected void Page_Load(object sender, EventArgs e) + { + lblLastUpdt.Text = DateTime.Now.ToString("yyyy.MM.dd HH:mm:ss"); + lblVers.Text = string.Format("v.{0}", System.Reflection.Assembly.GetExecutingAssembly().GetName().Version); + } } - } } \ No newline at end of file diff --git a/MP-ADM/WebUserControls/mod_gestKIT.ascx.cs b/MP-ADM/WebUserControls/mod_gestKIT.ascx.cs index 6dfd25a1..b5bd5759 100644 --- a/MP-ADM/WebUserControls/mod_gestKIT.ascx.cs +++ b/MP-ADM/WebUserControls/mod_gestKIT.ascx.cs @@ -4,266 +4,243 @@ using System; namespace MP_ADM.WebUserControls { - public partial class mod_gestKIT : System.Web.UI.UserControl - { - /// - /// Oggetto datalayer specifico - /// - DataLayer DataLayerObj = new DataLayer(); - - public event EventHandler eh_selKit; - - #region setup VARS - - /// - /// RegExp x RESET / CANCEL - /// - protected string regExp_KO = memLayer.ML.cdv("regExp_KO"); - /// - /// RegExp x CONFERMA - /// - protected string regExp_OK = memLayer.ML.cdv("regExp_OK"); - /// - /// RegExp x START KIT - /// - protected string regExp_KitStart = memLayer.ML.cdv("regExp_KitStart"); - /// - /// RegExp x SAVE KIT - /// - protected string regExp_KitSave = memLayer.ML.cdv("regExp_KitSave"); - - #endregion - - #region variabili in sessione - - /// - /// UID formattato con "_" - /// - public string uid + public partial class mod_gestKIT : BaseUserControl { - get - { - return this.UniqueID.Replace("$", "_").Replace("-", "_"); - } - } - /// - /// titolo pagina - /// - public string titolo - { - get - { - return devicesAuthProxy.getPage(Request.Url).Replace(".aspx", ""); - } - } - public string codKitTemp - { - get - { - return memLayer.ML.StringSessionObj(string.Format("codKitTemp_{0}", uid)); - } - set - { - memLayer.ML.setSessionVal(string.Format("codKitTemp_{0}", uid), value); - hlCodKitTemp.Value = value; - grViewWSK.DataBind(); - } - } - /// - /// Ultimo Codice KIT creato - /// - public string lastKitMade - { - get - { - return memLayer.ML.StringSessionObj("lastKitMade"); - } - set - { - memLayer.ML.setSessionVal("lastKitMade", value); - } - } - /// - /// Aggiunge (in obj OrdineKit) l'ordine coi parametri indicati - /// - /// - /// - /// - /// - /// - public bool addOrdArt(string codOrd, string codArt, string descArt, int qta) - { - bool answ = false; - // verifico di avere un codiceKIT - checkCodKit(); - // salvo info x il cod temporaneo... - DataLayerObj.taWKS.insertQuery(codKitTemp, codOrd, codArt, descArt, qta); - // verifico SE HO un KIT riconosciuto e quindi un CodArt di KIT valido... - string currCodArtKit = "###"; - var TksTab = DataLayerObj.taTKS.GetData(codKitTemp, 1); - bool showPODL = false; - if (TksTab.Rows.Count > 0) - { - // verifico se ho aderenza 100%... - if (TksTab[0].TotalScore == 1) + public event EventHandler eh_selKit; + + #region setup VARS + + /// + /// RegExp x RESET / CANCEL + /// + protected string regExp_KO = memLayer.ML.cdv("regExp_KO"); + /// + /// RegExp x CONFERMA + /// + protected string regExp_OK = memLayer.ML.cdv("regExp_OK"); + /// + /// RegExp x START KIT + /// + protected string regExp_KitStart = memLayer.ML.cdv("regExp_KitStart"); + /// + /// RegExp x SAVE KIT + /// + protected string regExp_KitSave = memLayer.ML.cdv("regExp_KitSave"); + + #endregion + + #region variabili in sessione + + + + public string codKitTemp { - currCodArtKit = TksTab[0].CodArtParent; - showPODL = true; + get + { + return memLayer.ML.StringSessionObj(string.Format("codKitTemp_{0}", uid)); + } + set + { + memLayer.ML.setSessionVal(string.Format("codKitTemp_{0}", uid), value); + hlCodKitTemp.Value = value; + grViewWSK.DataBind(); + } } - } - hfCodArtKit.Value = currCodArtKit; - divPODL.Visible = showPODL; - answ = true; - grViewWSK.DataBind(); - grViewKitSel.DataBind(); - grViewPODL.DataBind(); - grViewIstanzeKIT.DataBind(); - return answ; - } - - #endregion - - /// - /// Caricamento pagina - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) - { - bool OptAdmKitEnabled = memLayer.ML.CRB("OptAdmKitEnabled"); - if (!Page.IsPostBack && OptAdmKitEnabled) - { - doReset(); - } - } - /// - /// Ultimo input registrato - /// - public string lastInput - { - get - { - return hlLastInput.Value; - } - set - { - hlLastInput.Value = value; - } - } - /// - /// Aggiorno controllo secondo ULTIMO input - /// - public void doUpdate() - { - // aggiorno label... - messOut = ""; - // controllo input (reset/inizio o salva...) - if (lastInput == regExp_KO) - { - // resetto dati - doReset(); - messOut = "Effettuato reset!"; - } - else if (lastInput == regExp_KitStart) - { - // resetto dati - doReset(); - messOut = "Inizio configurazione KIT"; - } - else if (lastInput == regExp_KitSave) - { - // controllo SE HO un kit selezionato... - string currCodArtKit = "###"; - var TksTab = DataLayerObj.taTKS.GetData(codKitTemp, 1); - bool showPODL = false; - if (TksTab.Rows.Count > 0) + /// + /// Ultimo Codice KIT creato + /// + public string lastKitMade { - // verifico se ho aderenza 100%... - if (TksTab[0].TotalScore == 1) - { - currCodArtKit = TksTab[0].CodArtParent; - showPODL = true; - } + get + { + return memLayer.ML.StringSessionObj("lastKitMade"); + } + set + { + memLayer.ML.setSessionVal("lastKitMade", value); + } } - if (showPODL) + /// + /// Aggiunge (in obj OrdineKit) l'ordine coi parametri indicati + /// + /// + /// + /// + /// + /// + public bool addOrdArt(string codOrd, string codArt, string descArt, int qta) { - // in questo caso creo istanza! - creazioneIstanzaKit(currCodArtKit); + bool answ = false; + // verifico di avere un codiceKIT + checkCodKit(); + // salvo info x il cod temporaneo... + DataLayerObj.taWKS.insertQuery(codKitTemp, codOrd, codArt, descArt, qta); + // verifico SE HO un KIT riconosciuto e quindi un CodArt di KIT valido... + string currCodArtKit = "###"; + var TksTab = DataLayerObj.taTKS.GetData(codKitTemp, 1); + bool showPODL = false; + if (TksTab.Rows.Count > 0) + { + // verifico se ho aderenza 100%... + if (TksTab[0].TotalScore == 1) + { + currCodArtKit = TksTab[0].CodArtParent; + showPODL = true; + } + } + hfCodArtKit.Value = currCodArtKit; + divPODL.Visible = showPODL; + answ = true; + grViewWSK.DataBind(); + grViewKitSel.DataBind(); + grViewPODL.DataBind(); + grViewIstanzeKIT.DataBind(); + return answ; } - } - else if (lastInput == regExp_OK) - { - } - // ennesimo check cod TEMP - checkCodKit(); - } + #endregion - private void doReset() - { - // elimino eventuali record ODL - DataLayerObj.taWKS.deleteQuery(codKitTemp); - codKitTemp = ""; - divPODL.Visible = false; - checkCodKit(); - } - /// - /// Verifico SE HO un codKit Temporaneo sennò lo creo... - /// - private void checkCodKit() - { - if (codKitTemp == "") - { - // genero un NUOVO cod temp kit... - codKitTemp = string.Format("KIT_{0:yyMMdd_HHmmss}", DateTime.Now); - } - } - - public string messOut - { - set - { - lblOut.Text = value; - } - get - { - return lblOut.Text; - } - } - - protected void grViewKitSel_SelectedIndexChanged(object sender, EventArgs e) - { - // se ho selezionato recupero CHIAVE = CodArticolo del KIT - string CodArtParent = grViewKitSel.SelectedValue.ToString(); - // crea KIT x quel CodArtParent... - creazioneIstanzaKit(CodArtParent); - } - /// - /// Crea una NUOVA istanza KIT - /// - /// CodArt dell'Assieme/KIT - private void creazioneIstanzaKit(string CodArtParent) - { - // calcolo NUOVO codice kit... - var tabKey = DataLayerObj.taIstK.getNewKey(); - if (tabKey.Rows.Count == 1) - { - // stacco un NUOVO codice KIT - lastKitMade = tabKey[0].KeyKit; - // inserisco ISTANZA KIT! - DataLayerObj.taIstK.insertByWKS(lastKitMade, CodArtParent, codKitTemp); - // faccio reset valori WKS... - doReset(); - // ora resetto ordine caricato... - messOut = string.Format("Creato NUOVA P.ODL cod {0} per il KIT {1}", lastKitMade, CodArtParent); - // sollevo evento x impostare lettura KIT a BARCODE (x conferma successiva...) - // sollevo evento nuovo valore... - if (eh_selKit != null) + /// + /// Caricamento pagina + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) { - eh_selKit(this, new EventArgs()); + bool OptAdmKitEnabled = memLayer.ML.CRB("OptAdmKitEnabled"); + if (!Page.IsPostBack && OptAdmKitEnabled) + { + doReset(); + } + } + /// + /// Ultimo input registrato + /// + public string lastInput + { + get + { + return hlLastInput.Value; + } + set + { + hlLastInput.Value = value; + } + } + /// + /// Aggiorno controllo secondo ULTIMO input + /// + public void doUpdate() + { + // aggiorno label... + messOut = ""; + // controllo input (reset/inizio o salva...) + if (lastInput == regExp_KO) + { + // resetto dati + doReset(); + messOut = "Effettuato reset!"; + } + else if (lastInput == regExp_KitStart) + { + // resetto dati + doReset(); + messOut = "Inizio configurazione KIT"; + } + else if (lastInput == regExp_KitSave) + { + // controllo SE HO un kit selezionato... + string currCodArtKit = "###"; + var TksTab = DataLayerObj.taTKS.GetData(codKitTemp, 1); + bool showPODL = false; + if (TksTab.Rows.Count > 0) + { + // verifico se ho aderenza 100%... + if (TksTab[0].TotalScore == 1) + { + currCodArtKit = TksTab[0].CodArtParent; + showPODL = true; + } + } + if (showPODL) + { + // in questo caso creo istanza! + creazioneIstanzaKit(currCodArtKit); + } + } + else if (lastInput == regExp_OK) + { + + } + // ennesimo check cod TEMP + checkCodKit(); + } + + private void doReset() + { + // elimino eventuali record ODL + DataLayerObj.taWKS.deleteQuery(codKitTemp); + codKitTemp = ""; + divPODL.Visible = false; + checkCodKit(); + } + /// + /// Verifico SE HO un codKit Temporaneo sennò lo creo... + /// + private void checkCodKit() + { + if (codKitTemp == "") + { + // genero un NUOVO cod temp kit... + codKitTemp = string.Format("KIT_{0:yyMMdd_HHmmss}", DateTime.Now); + } + } + + public string messOut + { + set + { + lblOut.Text = value; + } + get + { + return lblOut.Text; + } + } + + protected void grViewKitSel_SelectedIndexChanged(object sender, EventArgs e) + { + // se ho selezionato recupero CHIAVE = CodArticolo del KIT + string CodArtParent = grViewKitSel.SelectedValue.ToString(); + // crea KIT x quel CodArtParent... + creazioneIstanzaKit(CodArtParent); + } + /// + /// Crea una NUOVA istanza KIT + /// + /// CodArt dell'Assieme/KIT + private void creazioneIstanzaKit(string CodArtParent) + { + // calcolo NUOVO codice kit... + var tabKey = DataLayerObj.taIstK.getNewKey(); + if (tabKey.Rows.Count == 1) + { + // stacco un NUOVO codice KIT + lastKitMade = tabKey[0].KeyKit; + // inserisco ISTANZA KIT! + DataLayerObj.taIstK.insertByWKS(lastKitMade, CodArtParent, codKitTemp); + // faccio reset valori WKS... + doReset(); + // ora resetto ordine caricato... + messOut = string.Format("Creato NUOVA P.ODL cod {0} per il KIT {1}", lastKitMade, CodArtParent); + // sollevo evento x impostare lettura KIT a BARCODE (x conferma successiva...) + // sollevo evento nuovo valore... + if (eh_selKit != null) + { + eh_selKit(this, new EventArgs()); + } + } } - } } - } } \ No newline at end of file diff --git a/MP-ADM/WebUserControls/mod_gestPromODL.ascx.cs b/MP-ADM/WebUserControls/mod_gestPromODL.ascx.cs index cafad97d..ff3d2e0a 100644 --- a/MP-ADM/WebUserControls/mod_gestPromODL.ascx.cs +++ b/MP-ADM/WebUserControls/mod_gestPromODL.ascx.cs @@ -7,633 +7,597 @@ using System.Web.UI.WebControls; namespace MP_ADM.WebUserControls { - public partial class mod_gestPromODL : System.Web.UI.UserControl - { - /// - /// Oggetto datalayer specifico - /// - DataLayer DataLayerObj = new DataLayer(); - /// - /// Determina se sia solo readonly il controllo... - /// - public bool readOnly; - /// - /// Chiave PRE selezione tipo richiesta ordine - /// - public string codOrdPre + public partial class mod_gestPromODL : BaseUserControl { - get - { - return hfCodPre.Value.Trim(); - } - set - { - hfCodPre.Value = value; - } - } - /// - /// dimensione pagina - /// - public int pageSize - { - get - { - int answ = 10; - try + /// + /// Determina se sia solo readonly il controllo... + /// + public bool readOnly; + /// + /// Chiave PRE selezione tipo richiesta ordine + /// + public string codOrdPre { - answ = Convert.ToInt32(txtPageSize.Text); + get + { + return hfCodPre.Value.Trim(); + } + set + { + hfCodPre.Value = value; + } } - catch - { } - return answ; - } - set - { - txtPageSize.Text = value.ToString(); - } - } - - /// - /// Abilitazione modifica selettore fase - /// - public bool enableSelFase - { - get - { - return ddlCodGruppo.Enabled; - } - set - { - ddlCodGruppo.Enabled = value; - } - } - /// - /// Gruppo selezionato - /// - public string CodGruppo - { - get - { - return ddlCodGruppo.SelectedValue; - } - set - { - ddlCodGruppo.SelectedValue = value; - } - } - - #region area da NON modificare - - #region area protected - - protected string _idxGridView; - - /// - /// reset della selezione - /// - /// - /// - protected void btnReset_Click(object sender, EventArgs e) - { - resetSelezione(); - } - - /// - /// salvo comando - /// - /// - /// - protected void lbt_Command(object sender, CommandEventArgs e) - { - SteamWare.memLayer.ML.setSessionVal("nextObjCommand", ((LinkButton)sender).CommandArgument); - } - /// - /// gestione cambio selezione valore - /// - /// - /// - protected void grView_SelectedIndexChanged(object sender, EventArgs e) - { - // salvo in session il valore selezionato... - memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, false); - bool doClone = false; - bool doEdit = false; - // gestione buttons richieste - string _comando = ""; - if (memLayer.ML.isInSessionObject("nextObjCommand")) - { - _comando = memLayer.ML.StringSessionObj("nextObjCommand"); - memLayer.ML.emptySessionVal("nextObjCommand"); - } - switch (_comando) - { - case "Clona": - doClone = true; - break; - case "Edit": - doEdit = true; - break; - default: - break; - } - if (doClone) - { - memLayer.ML.setSessionVal("idxProm2Clone", grView.SelectedValue, false); - showAddNewPODL(); - mod_newPromessaODL.doSelPODL(); - } - else if (doEdit) - { - memLayer.ML.setSessionVal("idxProm2Edit", grView.SelectedValue, false); - showAddNewPODL(); - mod_newPromessaODL.doSelPODL(); - } - else - { - // mostro edit quantità... - divEditQta.Visible = true; - lbtNewPODL.Visible = true; - mod_newPromessaODL.Visible = false; - var riga = DataLayerObj.taPODL.getByKey(idxPOdlSel)[0]; - numPz = riga.NumPezzi; - pzPallet = riga.PzPallet; - } - } - /// - /// traduce gli header delle colonne - /// - /// - /// - protected void grView_DataBound(object sender, EventArgs e) - { - if (grView.Rows.Count > 0) - { - LinkButton lb; - // aggiorno gli headers - foreach (TableCell cella in grView.HeaderRow.Cells) + /// + /// dimensione pagina + /// + public int pageSize { - try - { - lb = (LinkButton)cella.Controls[0]; - lb.Text = traduci(lb.Text); - } - catch - { } - } - int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1); - lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord); - } - else - { - lblNumRec.Text = ""; - } - } - /// - /// recupera i dati di un nuovo record contenuti nel footer di un gridView; - /// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...) - /// - /// - /// - protected void recuperaFooter(object sender, ObjectDataSourceMethodEventArgs e) - { - //recupero la riga footer... - DataColumnCollection colonne = colonneObj(); - string nomeCol; - string tipoColonna = ""; - foreach (DataColumn colonna in colonne) - { - nomeCol = colonna.ColumnName; - // cerco un textbox o quello che sia... - if (grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol)) != null) - { - tipoColonna = "textBox"; - } - else if (grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol)) != null) - { - tipoColonna = "dropDownList"; - } - else if (grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol)) != null) - { - tipoColonna = "checkBox"; - } - else if (grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol)) != null) - { - tipoColonna = "selAjax"; - } - // in base al tipo salvo negli inputparameters dell'ODS - switch (tipoColonna) - { - case "textBox": - e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text; - break; - case "dropDownList": - e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue; - break; - case "checkBox": - e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol))).Checked; - break; - //case "selAjax": - // e.InputParameters[nomeCol] = ((mod_selettore_ajax)grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol))).valore; - // break; - default: - break; - } - tipoColonna = ""; - } - } - /// - /// svuoto da cache post update - /// - /// - /// - protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e) - { - // evento come nuovo... - if (eh_nuovoValore != null) - { - eh_nuovoValore(this, new EventArgs()); - } - } - - #endregion - - #region are public - - /// - /// effettua traduzione del lemma - /// - /// - /// - public string traduci(string lemma) - { - return user_std.UtSn.Traduci(lemma); - } - /// - /// effettua traduzione in inglese del lemma - /// - /// - /// - public string traduciEn(string lemma) - { - return user_std.UtSn.TraduciEn(lemma); - } - /// - /// resetta la selezione dei valori in caso di modifiche su altri controlli - /// - public void resetSelezione() - { - SteamWare.memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView)); - grView.SelectedIndex = -1; - grView.DataBind(); - divEditQta.Visible = false; - mod_newPromessaODL.Visible = false; - lbtNewPODL.Visible = true; - lblWarning.Visible = false; - if (eh_resetSelezione != null) - { - eh_resetSelezione(this, new EventArgs()); - } - - } - #endregion - - #endregion - - #region gestione eventi - - public event EventHandler eh_resetSelezione; - public event EventHandler eh_nuovoValore; - - #endregion - - #region area da modificare - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - if (!Page.IsPostBack) - { - mod_newPromessaODL.Visible = false; - grView.PageSize = pageSize; - // se ho in sessione selezione la recupero... - if (memLayer.ML.isInSessionObject("selFaseBCode") && enableSelFase) - { - ddlCodGruppo.SelectedValue = memLayer.ML.StringSessionObj("selFaseBCode"); - } - } - mod_newPromessaODL.eh_nuovoValore += new EventHandler(mod_newOdl1_eh_nuovoValore); - } - - /// inizializzazione valori di default - /// - /// - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - _idxGridView = "IdxODL"; - } - /// - /// nuovo valore creato... - /// - /// - /// - void mod_newOdl1_eh_nuovoValore(object sender, EventArgs e) - { - // nascondo controllo e mostro button - mod_newPromessaODL.Visible = false; - lbtNewPODL.Visible = true; - // aggiorno! - resetSelezione(); - } - - /// - /// elenco colonne del datagrid - /// - /// - protected DataColumnCollection colonneObj() - { - DS_ProdTempi.ODLDataTable tabella = new DS_ProdTempi.ODLDataTable(); - DataColumnCollection colonne = tabella.Columns; - return colonne; - } - public bool delEnabled(object _idxOdl) - { - bool answ = false; - int idxOdl = 0; - // controllo non sia già stata iniziata la produzione sennò non posso cancellare... - try - { - idxOdl = Convert.ToInt32(_idxOdl); - answ = (DataLayerObj.taODL.getByIdx(idxOdl, true).Count > 0); - } - catch - { } - return answ; - } - /// - /// mostra creazione nuovo ODL - /// - /// - /// - protected void lbtNewPODL_Click(object sender, EventArgs e) - { - showAddNewPODL(); - } - - private void showAddNewPODL() - { - // mostro controllo creazione ODL - mod_newPromessaODL.Visible = true; - divEditQta.Visible = false; - lbtNewPODL.Visible = false; - grView.SelectedIndex = -1; - grView.DataBind(); - } - - /// - /// formatot url x stampa ODL - /// - /// - /// - public string formattaUrlOdl(object idx) - { - string answ = String.Format(memLayer.ML.CRS("exportFormat1"), Convert.ToInt32(reportRichiesto.SchedaODL), idx); - return answ; - } - - /// - /// cambio dim pagina - /// - /// - /// - protected void txtPageSize_TextChanged(object sender, EventArgs e) - { - grView.PageSize = pageSize; - } - - - /// - /// elimina commento - /// - /// - /// - protected void lbtDel_Click(object sender, EventArgs e) - { - LinkButton imgBtn = (LinkButton)sender; - int IdxProm = 0; - int.TryParse(imgBtn.CommandArgument, out IdxProm); - DataLayerObj.taPODL.deleteQuery(IdxProm); - doUpdate(); - } - - private void doUpdate() - { - grView.DataBind(); - } - - #endregion - - protected void btnOk_Click(object sender, EventArgs e) - { - if (idxPOdlSel > 0) - { - DataLayerObj.taPODL.updateQta(numPz, pzPallet, idxPOdlSel); - } - updateCtrl(); - } - - private void updateCtrl() - { - divEditQta.Visible = false; - grView.SelectedIndex = -1; - grView.DataBind(); - } - /// - /// idxOdl selezionato - /// - protected int idxPOdlSel - { - get - { - int answ = 0; - try - { - answ = Convert.ToInt32(grView.SelectedValue); - } - catch - { } - return answ; - } - } - /// - /// Nuovo num pz - /// - protected int numPz - { - get - { - int answ = 0; - try - { - answ = Convert.ToInt32(txtNewQta.Text.Trim()); - } - catch - { } - return answ; - } - set - { - txtNewQta.Text = value.ToString(); - } - } - /// - /// Nuovo num pz per pallet - /// - protected int pzPallet - { - get - { - int answ = 1; - try - { - answ = Convert.ToInt32(txtNewPzPallet.Text.Trim()); - } - catch - { } - // controllo sia > 0... - if (answ < 1) - { - answ = 1; + get + { + int answ = 10; + try + { + answ = Convert.ToInt32(txtPageSize.Text); + } + catch + { } + return answ; + } + set + { + txtPageSize.Text = value.ToString(); + } } - return answ; - } - set - { - txtNewPzPallet.Text = value.ToString(); - } - } - protected void btnCancel_Click(object sender, EventArgs e) - { - updateCtrl(); - } + /// + /// Abilitazione modifica selettore fase + /// + public bool enableSelFase + { + get + { + return ddlCodGruppo.Enabled; + } + set + { + ddlCodGruppo.Enabled = value; + } + } + /// + /// Gruppo selezionato + /// + public string CodGruppo + { + get + { + return ddlCodGruppo.SelectedValue; + } + set + { + ddlCodGruppo.SelectedValue = value; + } + } - protected void chkUnassigned_CheckedChanged(object sender, EventArgs e) - { - updateGrView(); - } - /// - /// Aggiorno Gridview - /// - private void updateGrView() - { - grView.DataBind(); - } + #region area da NON modificare - /// - /// IdxMacchina filtrata - /// - protected string idxMacc - { - get - { - return lblIdxMacc.Text; - } - set - { - lblIdxMacc.Text = value; - } - } - /// - /// Nome filtrata - /// - protected string NomeMacc - { - get - { - return lblNomeMacc.Text; - } - set - { - lblNomeMacc.Text = value; - } - } - /// - /// CodArt filtrato - /// - protected string CodArt - { - get - { - return lblCodArt.Text; - } - set - { - lblCodArt.Text = value; - } - } - /// - /// CodArt filtrato - /// - protected string DescArt - { - get - { - return lblDescArt.Text; - } - set - { - lblDescArt.Text = value; - } - } + #region area protected - /// - /// Selezionato un condominio --> riporto selezione - /// - /// - /// - protected void lbtSelArt_Click(object sender, EventArgs e) - { - LinkButton lb = (LinkButton)sender; - // imposto articolo, splittando - string[] artData = lb.CommandArgument.Split('|'); - CodArt = artData[0]; - DescArt = artData[1]; - updateGrView(); - } - /// - /// Selezionato un condominio --> riporto selezione - /// - /// - /// - protected void lbtSelMacc_Click(object sender, EventArgs e) - { - LinkButton lb = (LinkButton)sender; - // imposto articolo, splittando - string[] maccData = lb.CommandArgument.Split('|'); - idxMacc = maccData[0]; - NomeMacc = maccData[1]; - updateGrView(); - } + protected string _idxGridView; - protected void lbtResArt_Click(object sender, EventArgs e) - { - CodArt = ""; - DescArt = ""; - updateGrView(); - } + /// + /// reset della selezione + /// + /// + /// + protected void btnReset_Click(object sender, EventArgs e) + { + resetSelezione(); + } - protected void lbtResMacc_Click(object sender, EventArgs e) - { - idxMacc = ""; - NomeMacc = ""; - updateGrView(); - } + /// + /// salvo comando + /// + /// + /// + protected void lbt_Command(object sender, CommandEventArgs e) + { + memLayer.ML.setSessionVal("nextObjCommand", ((LinkButton)sender).CommandArgument); + } + /// + /// gestione cambio selezione valore + /// + /// + /// + protected void grView_SelectedIndexChanged(object sender, EventArgs e) + { + // salvo in session il valore selezionato... + memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, false); + bool doClone = false; + bool doEdit = false; + // gestione buttons richieste + string _comando = ""; + if (memLayer.ML.isInSessionObject("nextObjCommand")) + { + _comando = memLayer.ML.StringSessionObj("nextObjCommand"); + memLayer.ML.emptySessionVal("nextObjCommand"); + } + switch (_comando) + { + case "Clona": + doClone = true; + break; + case "Edit": + doEdit = true; + break; + default: + break; + } + if (doClone) + { + memLayer.ML.setSessionVal("idxProm2Clone", grView.SelectedValue, false); + showAddNewPODL(); + mod_newPromessaODL.doSelPODL(); + } + else if (doEdit) + { + memLayer.ML.setSessionVal("idxProm2Edit", grView.SelectedValue, false); + showAddNewPODL(); + mod_newPromessaODL.doSelPODL(); + } + else + { + // mostro edit quantità... + divEditQta.Visible = true; + lbtNewPODL.Visible = true; + mod_newPromessaODL.Visible = false; + var riga = DataLayerObj.taPODL.getByKey(idxPOdlSel)[0]; + numPz = riga.NumPezzi; + pzPallet = riga.PzPallet; + } + } + /// + /// traduce gli header delle colonne + /// + /// + /// + protected void grView_DataBound(object sender, EventArgs e) + { + if (grView.Rows.Count > 0) + { + LinkButton lb; + // aggiorno gli headers + foreach (TableCell cella in grView.HeaderRow.Cells) + { + try + { + lb = (LinkButton)cella.Controls[0]; + lb.Text = traduci(lb.Text); + } + catch + { } + } + int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1); + lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord); + } + else + { + lblNumRec.Text = ""; + } + } + /// + /// recupera i dati di un nuovo record contenuti nel footer di un gridView; + /// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...) + /// + /// + /// + protected void recuperaFooter(object sender, ObjectDataSourceMethodEventArgs e) + { + //recupero la riga footer... + DataColumnCollection colonne = colonneObj(); + string nomeCol; + string tipoColonna = ""; + foreach (DataColumn colonna in colonne) + { + nomeCol = colonna.ColumnName; + // cerco un textbox o quello che sia... + if (grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol)) != null) + { + tipoColonna = "textBox"; + } + else if (grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol)) != null) + { + tipoColonna = "dropDownList"; + } + else if (grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol)) != null) + { + tipoColonna = "checkBox"; + } + else if (grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol)) != null) + { + tipoColonna = "selAjax"; + } + // in base al tipo salvo negli inputparameters dell'ODS + switch (tipoColonna) + { + case "textBox": + e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text; + break; + case "dropDownList": + e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue; + break; + case "checkBox": + e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol))).Checked; + break; + //case "selAjax": + // e.InputParameters[nomeCol] = ((mod_selettore_ajax)grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol))).valore; + // break; + default: + break; + } + tipoColonna = ""; + } + } + /// + /// svuoto da cache post update + /// + /// + /// + protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e) + { + raiseNewVal(); + } - protected void ddlCodGruppo_SelectedIndexChanged(object sender, EventArgs e) - { - // salvo in sessione selezione... - memLayer.ML.setSessionVal("selFaseBCode", ddlCodGruppo.SelectedValue); + #endregion + + #region are public + + + /// + /// resetta la selezione dei valori in caso di modifiche su altri controlli + /// + public void resetSelezione() + { + memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView)); + grView.SelectedIndex = -1; + grView.DataBind(); + divEditQta.Visible = false; + mod_newPromessaODL.Visible = false; + lbtNewPODL.Visible = true; + lblWarning.Visible = false; + raiseReset(); + } + #endregion + + #endregion + + #region area da modificare + + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + if (!Page.IsPostBack) + { + mod_newPromessaODL.Visible = false; + grView.PageSize = pageSize; + // se ho in sessione selezione la recupero... + if (memLayer.ML.isInSessionObject("selFaseBCode") && enableSelFase) + { + ddlCodGruppo.SelectedValue = memLayer.ML.StringSessionObj("selFaseBCode"); + } + } + mod_newPromessaODL.eh_nuovoValore += new EventHandler(mod_newOdl1_eh_nuovoValore); + } + + /// inizializzazione valori di default + /// + /// + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + _idxGridView = "IdxODL"; + } + /// + /// nuovo valore creato... + /// + /// + /// + void mod_newOdl1_eh_nuovoValore(object sender, EventArgs e) + { + // nascondo controllo e mostro button + mod_newPromessaODL.Visible = false; + lbtNewPODL.Visible = true; + // aggiorno! + resetSelezione(); + } + + /// + /// elenco colonne del datagrid + /// + /// + protected DataColumnCollection colonneObj() + { + DS_ProdTempi.ODLDataTable tabella = new DS_ProdTempi.ODLDataTable(); + DataColumnCollection colonne = tabella.Columns; + return colonne; + } + public bool delEnabled(object _idxOdl) + { + bool answ = false; + int idxOdl = 0; + // controllo non sia già stata iniziata la produzione sennò non posso cancellare... + try + { + idxOdl = Convert.ToInt32(_idxOdl); + answ = (DataLayerObj.taODL.getByIdx(idxOdl, true).Count > 0); + } + catch + { } + return answ; + } + /// + /// mostra creazione nuovo ODL + /// + /// + /// + protected void lbtNewPODL_Click(object sender, EventArgs e) + { + showAddNewPODL(); + } + + private void showAddNewPODL() + { + // mostro controllo creazione ODL + mod_newPromessaODL.Visible = true; + divEditQta.Visible = false; + lbtNewPODL.Visible = false; + grView.SelectedIndex = -1; + grView.DataBind(); + } + + /// + /// formatot url x stampa ODL + /// + /// + /// + public string formattaUrlOdl(object idx) + { + string answ = String.Format(memLayer.ML.CRS("exportFormat1"), Convert.ToInt32(reportRichiesto.SchedaODL), idx); + return answ; + } + + /// + /// cambio dim pagina + /// + /// + /// + protected void txtPageSize_TextChanged(object sender, EventArgs e) + { + grView.PageSize = pageSize; + } + + + /// + /// elimina commento + /// + /// + /// + protected void lbtDel_Click(object sender, EventArgs e) + { + LinkButton imgBtn = (LinkButton)sender; + int IdxProm = 0; + int.TryParse(imgBtn.CommandArgument, out IdxProm); + DataLayerObj.taPODL.deleteQuery(IdxProm); + doUpdate(); + } + + private void doUpdate() + { + grView.DataBind(); + } + + #endregion + + protected void btnOk_Click(object sender, EventArgs e) + { + if (idxPOdlSel > 0) + { + DataLayerObj.taPODL.updateQta(numPz, pzPallet, idxPOdlSel); + } + updateCtrl(); + } + + private void updateCtrl() + { + divEditQta.Visible = false; + grView.SelectedIndex = -1; + grView.DataBind(); + } + /// + /// idxOdl selezionato + /// + protected int idxPOdlSel + { + get + { + int answ = 0; + try + { + answ = Convert.ToInt32(grView.SelectedValue); + } + catch + { } + return answ; + } + } + /// + /// Nuovo num pz + /// + protected int numPz + { + get + { + int answ = 0; + try + { + answ = Convert.ToInt32(txtNewQta.Text.Trim()); + } + catch + { } + return answ; + } + set + { + txtNewQta.Text = value.ToString(); + } + } + /// + /// Nuovo num pz per pallet + /// + protected int pzPallet + { + get + { + int answ = 1; + try + { + answ = Convert.ToInt32(txtNewPzPallet.Text.Trim()); + } + catch + { } + // controllo sia > 0... + if (answ < 1) + { + answ = 1; + } + + return answ; + } + set + { + txtNewPzPallet.Text = value.ToString(); + } + } + protected void btnCancel_Click(object sender, EventArgs e) + { + updateCtrl(); + } + + protected void chkUnassigned_CheckedChanged(object sender, EventArgs e) + { + updateGrView(); + } + /// + /// Aggiorno Gridview + /// + private void updateGrView() + { + grView.DataBind(); + } + + /// + /// IdxMacchina filtrata + /// + protected string idxMacc + { + get + { + return lblIdxMacc.Text; + } + set + { + lblIdxMacc.Text = value; + } + } + /// + /// Nome filtrata + /// + protected string NomeMacc + { + get + { + return lblNomeMacc.Text; + } + set + { + lblNomeMacc.Text = value; + } + } + /// + /// CodArt filtrato + /// + protected string CodArt + { + get + { + return lblCodArt.Text; + } + set + { + lblCodArt.Text = value; + } + } + /// + /// CodArt filtrato + /// + protected string DescArt + { + get + { + return lblDescArt.Text; + } + set + { + lblDescArt.Text = value; + } + } + + /// + /// Selezionato un condominio --> riporto selezione + /// + /// + /// + protected void lbtSelArt_Click(object sender, EventArgs e) + { + LinkButton lb = (LinkButton)sender; + // imposto articolo, splittando + string[] artData = lb.CommandArgument.Split('|'); + CodArt = artData[0]; + DescArt = artData[1]; + updateGrView(); + } + /// + /// Selezionato un condominio --> riporto selezione + /// + /// + /// + protected void lbtSelMacc_Click(object sender, EventArgs e) + { + LinkButton lb = (LinkButton)sender; + // imposto articolo, splittando + string[] maccData = lb.CommandArgument.Split('|'); + idxMacc = maccData[0]; + NomeMacc = maccData[1]; + updateGrView(); + } + + protected void lbtResArt_Click(object sender, EventArgs e) + { + CodArt = ""; + DescArt = ""; + updateGrView(); + } + + protected void lbtResMacc_Click(object sender, EventArgs e) + { + idxMacc = ""; + NomeMacc = ""; + updateGrView(); + } + + protected void ddlCodGruppo_SelectedIndexChanged(object sender, EventArgs e) + { + // salvo in sessione selezione... + memLayer.ML.setSessionVal("selFaseBCode", ddlCodGruppo.SelectedValue); + } } - } } \ No newline at end of file diff --git a/MP-ADM/WebUserControls/mod_gestPromODL_OUT.ascx.cs b/MP-ADM/WebUserControls/mod_gestPromODL_OUT.ascx.cs index 84b6e48a..7a9ada12 100644 --- a/MP-ADM/WebUserControls/mod_gestPromODL_OUT.ascx.cs +++ b/MP-ADM/WebUserControls/mod_gestPromODL_OUT.ascx.cs @@ -7,691 +7,656 @@ using System.Web.UI.WebControls; namespace MP_ADM.WebUserControls { - public partial class mod_gestPromODL_OUT : System.Web.UI.UserControl - { - /// - /// Oggetto datalayer specifico - /// - DataLayer DataLayerObj = new DataLayer(); - /// - /// Determina se sia solo readonly il controllo... - /// - public bool readOnly; - /// - /// Chiave PRE selezione tipo richiesta ordine - /// - public string codOrdPre + public partial class mod_gestPromODL_OUT : BaseUserControl { - get - { - return hfCodPre.Value.Trim(); - } - set - { - hfCodPre.Value = value; - } - } - /// - /// dimensione pagina - /// - public int pageSize - { - get - { - int answ = 10; - try + /// + /// Determina se sia solo readonly il controllo... + /// + public bool readOnly; + /// + /// Chiave PRE selezione tipo richiesta ordine + /// + public string codOrdPre { - answ = Convert.ToInt32(txtPageSize.Text); + get + { + return hfCodPre.Value.Trim(); + } + set + { + hfCodPre.Value = value; + } } - catch - { } - return answ; - } - set - { - txtPageSize.Text = value.ToString(); - } - } - - /// - /// Abilitazione modifica selettore fase - /// - public bool enableSelFase - { - get - { - return ddlCodGruppo.Enabled; - } - set - { - ddlCodGruppo.Enabled = value; - } - } - /// - /// Gruppo selezionato - /// - public string CodGruppo - { - get - { - return ddlCodGruppo.SelectedValue; - } - set - { - ddlCodGruppo.SelectedValue = value; - } - } - - #region area da NON modificare - - #region area protected - - protected string _idxGridView; - - /// - /// reset della selezione - /// - /// - /// - protected void btnReset_Click(object sender, EventArgs e) - { - resetSelezione(); - } - - /// - /// salvo comando - /// - /// - /// - protected void lbt_Command(object sender, CommandEventArgs e) - { - SteamWare.memLayer.ML.setSessionVal("nextObjCommand", ((LinkButton)sender).CommandArgument); - } - /// - /// gestione cambio selezione valore - /// - /// - /// - protected void grView_SelectedIndexChanged(object sender, EventArgs e) - { - // salvo in session il valore selezionato... - memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, false); - bool doClone = false; - bool doEdit = false; - // gestione buttons richieste - string _comando = ""; - if (memLayer.ML.isInSessionObject("nextObjCommand")) - { - _comando = memLayer.ML.StringSessionObj("nextObjCommand"); - memLayer.ML.emptySessionVal("nextObjCommand"); - } - switch (_comando) - { - case "Clona": - doClone = true; - break; - case "Edit": - doEdit = true; - break; - default: - break; - } - if (doClone) - { - memLayer.ML.setSessionVal("idxProm2Clone", grView.SelectedValue, false); - showAddNewPODL(); - mod_newPromessaODL.doSelPODL(); - } - else if (doEdit) - { - memLayer.ML.setSessionVal("idxProm2Edit", grView.SelectedValue, false); - showAddNewPODL(); - mod_newPromessaODL.doSelPODL(); - } - else - { - // mostro edit quantità... - divEditQta.Visible = true; - lbtNewPODL.Visible = true; - mod_newPromessaODL.Visible = false; - var riga = DataLayerObj.taPODL.getByKey(idxPOdlSel)[0]; - numPz = riga.NumPezzi; - pzPallet = riga.PzPallet; - } - } - /// - /// traduce gli header delle colonne - /// - /// - /// - protected void grView_DataBound(object sender, EventArgs e) - { - if (grView.Rows.Count > 0) - { - LinkButton lb; - // aggiorno gli headers - foreach (TableCell cella in grView.HeaderRow.Cells) + /// + /// dimensione pagina + /// + public int pageSize { - try - { - lb = (LinkButton)cella.Controls[0]; - lb.Text = traduci(lb.Text); - } - catch - { } - } - int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1); - lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord); - } - else - { - lblNumRec.Text = ""; - } - } - /// - /// recupera i dati di un nuovo record contenuti nel footer di un gridView; - /// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...) - /// - /// - /// - protected void recuperaFooter(object sender, ObjectDataSourceMethodEventArgs e) - { - //recupero la riga footer... - DataColumnCollection colonne = colonneObj(); - string nomeCol; - string tipoColonna = ""; - foreach (DataColumn colonna in colonne) - { - nomeCol = colonna.ColumnName; - // cerco un textbox o quello che sia... - if (grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol)) != null) - { - tipoColonna = "textBox"; - } - else if (grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol)) != null) - { - tipoColonna = "dropDownList"; - } - else if (grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol)) != null) - { - tipoColonna = "checkBox"; - } - else if (grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol)) != null) - { - tipoColonna = "selAjax"; - } - // in base al tipo salvo negli inputparameters dell'ODS - switch (tipoColonna) - { - case "textBox": - e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text; - break; - case "dropDownList": - e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue; - break; - case "checkBox": - e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol))).Checked; - break; - //case "selAjax": - // e.InputParameters[nomeCol] = ((mod_selettore_ajax)grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol))).valore; - // break; - default: - break; - } - tipoColonna = ""; - } - } - /// - /// svuoto da cache post update - /// - /// - /// - protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e) - { - // evento come nuovo... - if (eh_nuovoValore != null) - { - eh_nuovoValore(this, new EventArgs()); - } - } - - #endregion - - #region are public - - /// - /// effettua traduzione del lemma - /// - /// - /// - public string traduci(string lemma) - { - return user_std.UtSn.Traduci(lemma); - } - /// - /// effettua traduzione in inglese del lemma - /// - /// - /// - public string traduciEn(string lemma) - { - return user_std.UtSn.TraduciEn(lemma); - } - /// - /// resetta la selezione dei valori in caso di modifiche su altri controlli - /// - public void resetSelezione() - { - memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView)); - grView.SelectedIndex = -1; - grView.DataBind(); - divEditQta.Visible = false; - mod_newPromessaODL.Visible = false; - lbtNewPODL.Visible = true; - lblWarning.Visible = false; - if (eh_resetSelezione != null) - { - eh_resetSelezione(this, new EventArgs()); - } - - } - #endregion - - #endregion - - #region gestione eventi - - public event EventHandler eh_resetSelezione; - public event EventHandler eh_nuovoValore; - - #endregion - - #region area da modificare - - protected override void OnLoad(EventArgs e) - { - base.OnLoad(e); - if (!Page.IsPostBack) - { - mod_newPromessaODL.Visible = false; - grView.PageSize = pageSize; - // se ho in sessione selezione la recupero... - if (memLayer.ML.isInSessionObject("selFaseBCode") && enableSelFase) - { - ddlCodGruppo.SelectedValue = memLayer.ML.StringSessionObj("selFaseBCode"); - } - } - mod_newPromessaODL.eh_nuovoValore += new EventHandler(mod_newOdl1_eh_nuovoValore); - } - - /// inizializzazione valori di default - /// - /// - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - _idxGridView = "IdxODL"; - } - /// - /// nuovo valore creato... - /// - /// - /// - void mod_newOdl1_eh_nuovoValore(object sender, EventArgs e) - { - // nascondo controllo e mostro button - mod_newPromessaODL.Visible = false; - lbtNewPODL.Visible = true; - // aggiorno! - resetSelezione(); - } - - /// - /// elenco colonne del datagrid - /// - /// - protected DataColumnCollection colonneObj() - { - MapoDb.DS_ProdTempi.ODLDataTable tabella = new MapoDb.DS_ProdTempi.ODLDataTable(); - DataColumnCollection colonne = tabella.Columns; - return colonne; - } - public bool delEnabled(object _idxOdl) - { - bool answ = false; - int idxOdl = 0; - // controllo non sia già stata iniziata la produzione sennò non posso cancellare... - try - { - idxOdl = Convert.ToInt32(_idxOdl); - answ = (DataLayerObj.taODL.getByIdx(idxOdl, true).Count > 0); - } - catch - { } - return answ; - } - /// - /// mostra creazione nuovo ODL - /// - /// - /// - protected void lbtNewPODL_Click(object sender, EventArgs e) - { - showAddNewPODL(); - } - - private void showAddNewPODL() - { - // mostro controllo creazione ODL - mod_newPromessaODL.Visible = true; - divEditQta.Visible = false; - lbtNewPODL.Visible = false; - grView.SelectedIndex = -1; - grView.DataBind(); - } - - /// - /// formatot url x stampa ODL - /// - /// - /// - public string formattaUrlOdl(object idx) - { - string answ = String.Format(memLayer.ML.CRS("exportFormat1"), Convert.ToInt32(reportRichiesto.SchedaODL), idx); - return answ; - } - - /// - /// cambio dim pagina - /// - /// - /// - protected void txtPageSize_TextChanged(object sender, EventArgs e) - { - grView.PageSize = pageSize; - } - - - /// - /// elimina commento - /// - /// - /// - protected void lbtDel_Click(object sender, EventArgs e) - { - LinkButton imgBtn = (LinkButton)sender; - int IdxProm = 0; - int.TryParse(imgBtn.CommandArgument, out IdxProm); - DataLayerObj.taPODL.deleteQuery(IdxProm); - doUpdate(); - } - - protected void doUpdate() - { - updateGrView(); - } - - #endregion - - protected void btnOk_Click(object sender, EventArgs e) - { - if (idxPOdlSel > 0) - { - DataLayerObj.taPODL.updateQta(numPz, pzPallet, idxPOdlSel); - } - updateCtrl(); - } - - private void updateCtrl() - { - divEditQta.Visible = false; - grView.SelectedIndex = -1; - grView.DataBind(); - } - /// - /// idxOdl selezionato - /// - protected int idxPOdlSel - { - get - { - int answ = 0; - try - { - answ = Convert.ToInt32(grView.SelectedValue); - } - catch - { } - return answ; - } - } - /// - /// Nuovo num pz - /// - protected int numPz - { - get - { - int answ = 0; - try - { - answ = Convert.ToInt32(txtNewQta.Text.Trim()); - } - catch - { } - return answ; - } - set - { - txtNewQta.Text = value.ToString(); - } - } - /// - /// Nuovo num pz per pallet - /// - protected int pzPallet - { - get - { - int answ = 1; - try - { - answ = Convert.ToInt32(txtNewPzPallet.Text.Trim()); - } - catch - { } - // controllo sia > 0... - if (answ < 1) - { - answ = 1; + get + { + int answ = 10; + try + { + answ = Convert.ToInt32(txtPageSize.Text); + } + catch + { } + return answ; + } + set + { + txtPageSize.Text = value.ToString(); + } } - return answ; - } - set - { - txtNewPzPallet.Text = value.ToString(); - } - } - protected void btnCancel_Click(object sender, EventArgs e) - { - updateCtrl(); - } + /// + /// Abilitazione modifica selettore fase + /// + public bool enableSelFase + { + get + { + return ddlCodGruppo.Enabled; + } + set + { + ddlCodGruppo.Enabled = value; + } + } + /// + /// Gruppo selezionato + /// + public string CodGruppo + { + get + { + return ddlCodGruppo.SelectedValue; + } + set + { + ddlCodGruppo.SelectedValue = value; + } + } - protected void chkUnassigned_CheckedChanged(object sender, EventArgs e) - { - updateGrView(); - } - /// - /// Aggiorno Gridview - /// - private void updateGrView() - { - grView.DataBind(); - } - /// - /// IdxMacchina filtrata - /// - protected string idxMacc - { - get - { - return lblIdxMacc.Text; - } - set - { - lblIdxMacc.Text = value; - } - } - /// - /// Nome filtrata - /// - protected string NomeMacc - { - get - { - return lblNomeMacc.Text; - } - set - { - lblNomeMacc.Text = value; - } - } - /// - /// CodArt filtrato - /// - protected string CodArt - { - get - { - return lblCodArt.Text; - } - set - { - lblCodArt.Text = value; - } - } - /// - /// CodArt filtrato - /// - protected string DescArt - { - get - { - return lblDescArt.Text; - } - set - { - lblDescArt.Text = value; - } - } + #region area da NON modificare - /// - /// Selezionato un condominio --> riporto selezione - /// - /// - /// - protected void lbtSelArt_Click(object sender, EventArgs e) - { - LinkButton lb = (LinkButton)sender; - // imposto articolo, splittando - string[] artData = lb.CommandArgument.Split('|'); - CodArt = artData[0]; - DescArt = artData[1]; - updateGrView(); - } - /// - /// Selezionato un condominio --> riporto selezione - /// - /// - /// - protected void lbtSelMacc_Click(object sender, EventArgs e) - { - LinkButton lb = (LinkButton)sender; - // imposto articolo, splittando - string[] maccData = lb.CommandArgument.Split('|'); - idxMacc = maccData[0]; - NomeMacc = maccData[1]; - updateGrView(); - } + #region area protected - /// - /// Richiesto abbassamento priorità = ANTICIPA - /// - /// - /// - protected void lnkMoveDown_Click(object sender, EventArgs e) - { - LinkButton lb = (LinkButton)sender; - // imposto articolo, splittando - int IdxPromessa = 0; - int.TryParse(lb.CommandArgument, out IdxPromessa); - // chiamo stored - DataLayerObj.taPromOut.movePrio(IdxPromessa, -1); - //update! - updateGrView(); - } - /// - /// Richiesto aumento priorità = RITARDA - /// - /// - /// - protected void lnkMoveUp_Click(object sender, EventArgs e) - { - LinkButton lb = (LinkButton)sender; - // imposto articolo, splittando - int IdxPromessa = 0; - int.TryParse(lb.CommandArgument, out IdxPromessa); - // chiamo stored - DataLayerObj.taPromOut.movePrio(IdxPromessa, 1); - //update! - updateGrView(); - } + protected string _idxGridView; + + /// + /// reset della selezione + /// + /// + /// + protected void btnReset_Click(object sender, EventArgs e) + { + resetSelezione(); + } + + /// + /// salvo comando + /// + /// + /// + protected void lbt_Command(object sender, CommandEventArgs e) + { + memLayer.ML.setSessionVal("nextObjCommand", ((LinkButton)sender).CommandArgument); + } + /// + /// gestione cambio selezione valore + /// + /// + /// + protected void grView_SelectedIndexChanged(object sender, EventArgs e) + { + // salvo in session il valore selezionato... + memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, false); + bool doClone = false; + bool doEdit = false; + // gestione buttons richieste + string _comando = ""; + if (memLayer.ML.isInSessionObject("nextObjCommand")) + { + _comando = memLayer.ML.StringSessionObj("nextObjCommand"); + memLayer.ML.emptySessionVal("nextObjCommand"); + } + switch (_comando) + { + case "Clona": + doClone = true; + break; + case "Edit": + doEdit = true; + break; + default: + break; + } + if (doClone) + { + memLayer.ML.setSessionVal("idxProm2Clone", grView.SelectedValue, false); + showAddNewPODL(); + mod_newPromessaODL.doSelPODL(); + } + else if (doEdit) + { + memLayer.ML.setSessionVal("idxProm2Edit", grView.SelectedValue, false); + showAddNewPODL(); + mod_newPromessaODL.doSelPODL(); + } + else + { + // mostro edit quantità... + divEditQta.Visible = true; + lbtNewPODL.Visible = true; + mod_newPromessaODL.Visible = false; + var riga = DataLayerObj.taPODL.getByKey(idxPOdlSel)[0]; + numPz = riga.NumPezzi; + pzPallet = riga.PzPallet; + } + } + /// + /// traduce gli header delle colonne + /// + /// + /// + protected void grView_DataBound(object sender, EventArgs e) + { + if (grView.Rows.Count > 0) + { + LinkButton lb; + // aggiorno gli headers + foreach (TableCell cella in grView.HeaderRow.Cells) + { + try + { + lb = (LinkButton)cella.Controls[0]; + lb.Text = traduci(lb.Text); + } + catch + { } + } + int totRecord = grView.Rows.Count + grView.PageSize * (grView.PageCount - 1); + lblNumRec.Text = string.Format("{0} records of ~ {1}", grView.Rows.Count, totRecord); + } + else + { + lblNumRec.Text = ""; + } + } + /// + /// recupera i dati di un nuovo record contenuti nel footer di un gridView; + /// questi devono esses opportunamente nominati (es: txt{0}, dl{0}, ...) + /// + /// + /// + protected void recuperaFooter(object sender, ObjectDataSourceMethodEventArgs e) + { + //recupero la riga footer... + DataColumnCollection colonne = colonneObj(); + string nomeCol; + string tipoColonna = ""; + foreach (DataColumn colonna in colonne) + { + nomeCol = colonna.ColumnName; + // cerco un textbox o quello che sia... + if (grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol)) != null) + { + tipoColonna = "textBox"; + } + else if (grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol)) != null) + { + tipoColonna = "dropDownList"; + } + else if (grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol)) != null) + { + tipoColonna = "checkBox"; + } + else if (grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol)) != null) + { + tipoColonna = "selAjax"; + } + // in base al tipo salvo negli inputparameters dell'ODS + switch (tipoColonna) + { + case "textBox": + e.InputParameters[nomeCol] = ((TextBox)grView.FooterRow.FindControl(string.Format("txt{0}", nomeCol))).Text; + break; + case "dropDownList": + e.InputParameters[nomeCol] = ((DropDownList)grView.FooterRow.FindControl(string.Format("dl{0}", nomeCol))).SelectedValue; + break; + case "checkBox": + e.InputParameters[nomeCol] = ((CheckBox)grView.FooterRow.FindControl(string.Format("chk{0}", nomeCol))).Checked; + break; + //case "selAjax": + // e.InputParameters[nomeCol] = ((mod_selettore_ajax)grView.FooterRow.FindControl(string.Format("selAjax_{0}", nomeCol))).valore; + // break; + default: + break; + } + tipoColonna = ""; + } + } + /// + /// svuoto da cache post update + /// + /// + /// + protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e) + { + raiseNewVal(); + } + + #endregion + + #region are public + + /// + /// resetta la selezione dei valori in caso di modifiche su altri controlli + /// + public void resetSelezione() + { + memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView)); + grView.SelectedIndex = -1; + grView.DataBind(); + divEditQta.Visible = false; + mod_newPromessaODL.Visible = false; + lbtNewPODL.Visible = true; + lblWarning.Visible = false; + raiseReset(); + } + #endregion + + #endregion - protected void lbtResArt_Click(object sender, EventArgs e) - { - CodArt = ""; - DescArt = ""; - updateGrView(); - } - protected void lbtResMacc_Click(object sender, EventArgs e) - { - idxMacc = ""; - NomeMacc = ""; - updateGrView(); - } + #region area da modificare - protected void ddlCodGruppo_SelectedIndexChanged(object sender, EventArgs e) - { - // salvo in sessione selezione... - memLayer.ML.setSessionVal("selFaseBCode", ddlCodGruppo.SelectedValue); + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + if (!Page.IsPostBack) + { + mod_newPromessaODL.Visible = false; + grView.PageSize = pageSize; + // se ho in sessione selezione la recupero... + if (memLayer.ML.isInSessionObject("selFaseBCode") && enableSelFase) + { + ddlCodGruppo.SelectedValue = memLayer.ML.StringSessionObj("selFaseBCode"); + } + } + mod_newPromessaODL.eh_nuovoValore += new EventHandler(mod_newOdl1_eh_nuovoValore); + } + + /// inizializzazione valori di default + /// + /// + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + _idxGridView = "IdxODL"; + } + /// + /// nuovo valore creato... + /// + /// + /// + void mod_newOdl1_eh_nuovoValore(object sender, EventArgs e) + { + // nascondo controllo e mostro button + mod_newPromessaODL.Visible = false; + lbtNewPODL.Visible = true; + // aggiorno! + resetSelezione(); + } + + /// + /// elenco colonne del datagrid + /// + /// + protected DataColumnCollection colonneObj() + { + MapoDb.DS_ProdTempi.ODLDataTable tabella = new MapoDb.DS_ProdTempi.ODLDataTable(); + DataColumnCollection colonne = tabella.Columns; + return colonne; + } + public bool delEnabled(object _idxOdl) + { + bool answ = false; + int idxOdl = 0; + // controllo non sia già stata iniziata la produzione sennò non posso cancellare... + try + { + idxOdl = Convert.ToInt32(_idxOdl); + answ = (DataLayerObj.taODL.getByIdx(idxOdl, true).Count > 0); + } + catch + { } + return answ; + } + /// + /// mostra creazione nuovo ODL + /// + /// + /// + protected void lbtNewPODL_Click(object sender, EventArgs e) + { + showAddNewPODL(); + } + + private void showAddNewPODL() + { + // mostro controllo creazione ODL + mod_newPromessaODL.Visible = true; + divEditQta.Visible = false; + lbtNewPODL.Visible = false; + grView.SelectedIndex = -1; + grView.DataBind(); + } + + /// + /// formatot url x stampa ODL + /// + /// + /// + public string formattaUrlOdl(object idx) + { + string answ = String.Format(memLayer.ML.CRS("exportFormat1"), Convert.ToInt32(reportRichiesto.SchedaODL), idx); + return answ; + } + + /// + /// cambio dim pagina + /// + /// + /// + protected void txtPageSize_TextChanged(object sender, EventArgs e) + { + grView.PageSize = pageSize; + } + + + /// + /// elimina commento + /// + /// + /// + protected void lbtDel_Click(object sender, EventArgs e) + { + LinkButton imgBtn = (LinkButton)sender; + int IdxProm = 0; + int.TryParse(imgBtn.CommandArgument, out IdxProm); + DataLayerObj.taPODL.deleteQuery(IdxProm); + doUpdate(); + } + + protected void doUpdate() + { + updateGrView(); + } + + #endregion + + protected void btnOk_Click(object sender, EventArgs e) + { + if (idxPOdlSel > 0) + { + DataLayerObj.taPODL.updateQta(numPz, pzPallet, idxPOdlSel); + } + updateCtrl(); + } + + private void updateCtrl() + { + divEditQta.Visible = false; + grView.SelectedIndex = -1; + grView.DataBind(); + } + /// + /// idxOdl selezionato + /// + protected int idxPOdlSel + { + get + { + int answ = 0; + try + { + answ = Convert.ToInt32(grView.SelectedValue); + } + catch + { } + return answ; + } + } + /// + /// Nuovo num pz + /// + protected int numPz + { + get + { + int answ = 0; + try + { + answ = Convert.ToInt32(txtNewQta.Text.Trim()); + } + catch + { } + return answ; + } + set + { + txtNewQta.Text = value.ToString(); + } + } + /// + /// Nuovo num pz per pallet + /// + protected int pzPallet + { + get + { + int answ = 1; + try + { + answ = Convert.ToInt32(txtNewPzPallet.Text.Trim()); + } + catch + { } + // controllo sia > 0... + if (answ < 1) + { + answ = 1; + } + + return answ; + } + set + { + txtNewPzPallet.Text = value.ToString(); + } + } + protected void btnCancel_Click(object sender, EventArgs e) + { + updateCtrl(); + } + + protected void chkUnassigned_CheckedChanged(object sender, EventArgs e) + { + updateGrView(); + } + /// + /// Aggiorno Gridview + /// + private void updateGrView() + { + grView.DataBind(); + } + /// + /// IdxMacchina filtrata + /// + protected string idxMacc + { + get + { + return lblIdxMacc.Text; + } + set + { + lblIdxMacc.Text = value; + } + } + /// + /// Nome filtrata + /// + protected string NomeMacc + { + get + { + return lblNomeMacc.Text; + } + set + { + lblNomeMacc.Text = value; + } + } + /// + /// CodArt filtrato + /// + protected string CodArt + { + get + { + return lblCodArt.Text; + } + set + { + lblCodArt.Text = value; + } + } + /// + /// CodArt filtrato + /// + protected string DescArt + { + get + { + return lblDescArt.Text; + } + set + { + lblDescArt.Text = value; + } + } + + /// + /// Selezionato un condominio --> riporto selezione + /// + /// + /// + protected void lbtSelArt_Click(object sender, EventArgs e) + { + LinkButton lb = (LinkButton)sender; + // imposto articolo, splittando + string[] artData = lb.CommandArgument.Split('|'); + CodArt = artData[0]; + DescArt = artData[1]; + updateGrView(); + } + /// + /// Selezionato un condominio --> riporto selezione + /// + /// + /// + protected void lbtSelMacc_Click(object sender, EventArgs e) + { + LinkButton lb = (LinkButton)sender; + // imposto articolo, splittando + string[] maccData = lb.CommandArgument.Split('|'); + idxMacc = maccData[0]; + NomeMacc = maccData[1]; + updateGrView(); + } + + /// + /// Richiesto abbassamento priorità = ANTICIPA + /// + /// + /// + protected void lnkMoveDown_Click(object sender, EventArgs e) + { + LinkButton lb = (LinkButton)sender; + // imposto articolo, splittando + int IdxPromessa = 0; + int.TryParse(lb.CommandArgument, out IdxPromessa); + // chiamo stored + DataLayerObj.taPromOut.movePrio(IdxPromessa, -1); + //update! + updateGrView(); + } + /// + /// Richiesto aumento priorità = RITARDA + /// + /// + /// + protected void lnkMoveUp_Click(object sender, EventArgs e) + { + LinkButton lb = (LinkButton)sender; + // imposto articolo, splittando + int IdxPromessa = 0; + int.TryParse(lb.CommandArgument, out IdxPromessa); + // chiamo stored + DataLayerObj.taPromOut.movePrio(IdxPromessa, 1); + //update! + updateGrView(); + } + + + protected void lbtResArt_Click(object sender, EventArgs e) + { + CodArt = ""; + DescArt = ""; + updateGrView(); + } + + protected void lbtResMacc_Click(object sender, EventArgs e) + { + idxMacc = ""; + NomeMacc = ""; + updateGrView(); + } + + protected void ddlCodGruppo_SelectedIndexChanged(object sender, EventArgs e) + { + // salvo in sessione selezione... + memLayer.ML.setSessionVal("selFaseBCode", ddlCodGruppo.SelectedValue); + } + /// + /// Verifica se sia permesso cambio priorità (NON può andare a 0 ne oltre il max x macchina) + /// + /// + /// + /// + /// + public bool checkChgPrio(string IdxMacchina, string priorStr, int delta) + { + bool answ = false; + int priorita = 0; + int.TryParse(priorStr, out priorita); + // calcolo i limiti priorità x macchina (0 --> max x macchina)... LPI/LPS liminte priorità inferiore / superiore + int LPI = 1; + int LPS = 1; + var tabella = DataLayerObj.taPromOut.getMaxPrioByMacc(IdxMacchina, true); + if (tabella.Rows.Count > 0) + { + LPS = tabella[0].Priorita; + } + // è ok SE sono ENTRO i 2 limiti + answ = ((priorita + delta) >= LPI && (priorita + delta) <= LPS); + //return + return answ; + } } - /// - /// Verifica se sia permesso cambio priorità (NON può andare a 0 ne oltre il max x macchina) - /// - /// - /// - /// - /// - public bool checkChgPrio(string IdxMacchina, string priorStr, int delta) - { - bool answ = false; - int priorita = 0; - int.TryParse(priorStr, out priorita); - // calcolo i limiti priorità x macchina (0 --> max x macchina)... LPI/LPS liminte priorità inferiore / superiore - int LPI = 1; - int LPS = 1; - var tabella = DataLayerObj.taPromOut.getMaxPrioByMacc(IdxMacchina, true); - if (tabella.Rows.Count > 0) - { - LPS = tabella[0].Priorita; - } - // è ok SE sono ENTRO i 2 limiti - answ = ((priorita + delta) >= LPI && (priorita + delta) <= LPS); - //return - return answ; - } - } } \ No newline at end of file diff --git a/MP-ADM/WebUserControls/mod_gestioneDatiMacchine.ascx b/MP-ADM/WebUserControls/mod_gestioneDatiMacchine.ascx index c931a8c8..fe9b1a85 100644 --- a/MP-ADM/WebUserControls/mod_gestioneDatiMacchine.ascx +++ b/MP-ADM/WebUserControls/mod_gestioneDatiMacchine.ascx @@ -1,5 +1,5 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_gestioneDatiMacchine.ascx.cs" - Inherits="MoonPro_site.WebUserControls.mod_gestioneDatiMacchine" %> + Inherits="MP_ADM.WebUserControls.mod_gestioneDatiMacchine" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> /// traduce gli header delle colonne @@ -127,61 +123,29 @@ namespace MoonPro_site.WebUserControls /// protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e) { - // evento come nuovo... - if (eh_nuovoValore != null) - { - eh_nuovoValore(this, new EventArgs()); - } + raiseNewVal(); } #endregion #region are public - /// - /// effettua traduzione del lemma - /// - /// - /// - public string traduci(string lemma) - { - return user_std.UtSn.Traduci(lemma); - } - /// - /// effettua traduzione in inglese del lemma - /// - /// - /// - public string traduciEn(string lemma) - { - return user_std.UtSn.TraduciEn(lemma); - } /// /// resetta la selezione dei valori in caso di modifiche su altri controlli /// public void resetSelezione() { - SteamWare.memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView)); + memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView)); grView.SelectedIndex = -1; grView.DataBind(); lblWarning.Visible = false; - if (eh_resetSelezione != null) - { - eh_resetSelezione(this, new EventArgs()); - } + raiseReset(); } #endregion #endregion - #region gestione eventi - - public event EventHandler eh_resetSelezione; - public event EventHandler eh_nuovoValore; - public event EventHandler eh_selValore; - - #endregion #region area da modificare diff --git a/MP-ADM/WebUserControls/mod_gestioneDatiMacchine.ascx.designer.cs b/MP-ADM/WebUserControls/mod_gestioneDatiMacchine.ascx.designer.cs index a0aacdc2..97f6e951 100644 --- a/MP-ADM/WebUserControls/mod_gestioneDatiMacchine.ascx.designer.cs +++ b/MP-ADM/WebUserControls/mod_gestioneDatiMacchine.ascx.designer.cs @@ -1,51 +1,52 @@ //------------------------------------------------------------------------------ -// -// This code was generated by a tool. +// +// Codice generato da uno strumento. // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// //------------------------------------------------------------------------------ -namespace MoonPro_site.WebUserControls +namespace MP_ADM.WebUserControls { - public partial class mod_gestioneDatiMacchine { - + public partial class mod_gestioneDatiMacchine + { + /// - /// grView control. + /// Controllo grView. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.GridView grView; - + /// - /// lblNumRec control. + /// Controllo lblNumRec. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.Label lblNumRec; - + /// - /// lblWarning control. + /// Controllo lblWarning. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.Label lblWarning; - + /// - /// ods control. + /// Controllo ods. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.ObjectDataSource ods; } diff --git a/MP-ADM/WebUserControls/mod_gestioneODL.ascx b/MP-ADM/WebUserControls/mod_gestioneODL.ascx index a3f69ae5..2716b6a5 100644 --- a/MP-ADM/WebUserControls/mod_gestioneODL.ascx +++ b/MP-ADM/WebUserControls/mod_gestioneODL.ascx @@ -1,5 +1,5 @@ <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_gestioneODL.ascx.cs" - Inherits="MoonPro_site.WebUserControls.mod_gestioneODL" %> + Inherits="MP_ADM.WebUserControls.mod_gestioneODL" %> <%@ Register Src="mod_newOdl.ascx" TagName="mod_newOdl" TagPrefix="uc1" %> diff --git a/MP-ADM/WebUserControls/mod_gestioneODL.ascx.cs b/MP-ADM/WebUserControls/mod_gestioneODL.ascx.cs index 5676381b..60ef516e 100644 --- a/MP-ADM/WebUserControls/mod_gestioneODL.ascx.cs +++ b/MP-ADM/WebUserControls/mod_gestioneODL.ascx.cs @@ -5,14 +5,10 @@ using System.Data; using System.Web.UI; using System.Web.UI.WebControls; -namespace MoonPro_site.WebUserControls +namespace MP_ADM.WebUserControls { - public partial class mod_gestioneODL : System.Web.UI.UserControl + public partial class mod_gestioneODL : BaseUserControl { - /// - /// Oggetto datalayer specifico - /// - DataLayer DataLayerObj = new DataLayer(); /// /// dimensione pagina @@ -59,7 +55,7 @@ namespace MoonPro_site.WebUserControls protected void grView_SelectedIndexChanged(object sender, EventArgs e) { // salvo in session il valore selezionato... - SteamWare.memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, false); + memLayer.ML.setSessionVal(string.Format("{0}_sel", _idxGridView), grView.SelectedValue, false); // mostro edit quantità... divEditQta.Visible = true; lbtNewODL.Visible = enableCreateNew; @@ -158,41 +154,19 @@ namespace MoonPro_site.WebUserControls /// protected void ods_Updated(object sender, ObjectDataSourceStatusEventArgs e) { - // evento come nuovo... - if (eh_nuovoValore != null) - { - eh_nuovoValore(this, new EventArgs()); - } + raiseNewVal(); } #endregion #region are public - /// - /// effettua traduzione del lemma - /// - /// - /// - public string traduci(string lemma) - { - return user_std.UtSn.Traduci(lemma); - } - /// - /// effettua traduzione in inglese del lemma - /// - /// - /// - public string traduciEn(string lemma) - { - return user_std.UtSn.TraduciEn(lemma); - } /// /// resetta la selezione dei valori in caso di modifiche su altri controlli /// public void resetSelezione() { - SteamWare.memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView)); + memLayer.ML.emptySessionVal(string.Format("{0}_sel", _idxGridView)); grView.SelectedIndex = -1; grView.DataBind(); idxMaccEdit = ""; @@ -200,24 +174,13 @@ namespace MoonPro_site.WebUserControls mod_newOdl1.Visible = false; lbtNewODL.Visible = enableCreateNew; lblWarning.Visible = false; - if (eh_resetSelezione != null) - { - eh_resetSelezione(this, new EventArgs()); - } - + raiseReset(); } #endregion #endregion - #region gestione eventi - - public event EventHandler eh_resetSelezione; - public event EventHandler eh_nuovoValore; - - #endregion - #region area da modificare protected override void OnLoad(EventArgs e) @@ -364,7 +327,7 @@ namespace MoonPro_site.WebUserControls if (numPzEditable) { // recupero da config il max... - int numPzMaxFix = 50; + int numPzMaxFix = 100; try { numPzMaxFix = memLayer.ML.cdvi("numPzMaxFix"); diff --git a/MP-ADM/WebUserControls/mod_gestioneODL.ascx.designer.cs b/MP-ADM/WebUserControls/mod_gestioneODL.ascx.designer.cs index 6932ff3e..ebdcc1d7 100644 --- a/MP-ADM/WebUserControls/mod_gestioneODL.ascx.designer.cs +++ b/MP-ADM/WebUserControls/mod_gestioneODL.ascx.designer.cs @@ -7,7 +7,7 @@ // //------------------------------------------------------------------------------ -namespace MoonPro_site.WebUserControls +namespace MP_ADM.WebUserControls { @@ -84,7 +84,7 @@ namespace MoonPro_site.WebUserControls /// Campo generato automaticamente. /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// - protected global::MoonPro_site.WebUserControls.mod_newOdl mod_newOdl1; + protected global::MP_ADM.WebUserControls.mod_newOdl mod_newOdl1; /// /// Controllo divEditQta. diff --git a/MP-ADM/WebUserControls/mod_login.ascx b/MP-ADM/WebUserControls/mod_login.ascx index 52e6a68f..7205f707 100644 --- a/MP-ADM/WebUserControls/mod_login.ascx +++ b/MP-ADM/WebUserControls/mod_login.ascx @@ -1,4 +1,4 @@ -<%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_login" Codebehind="mod_login.ascx.cs" %> +<%@ Control Language="C#" AutoEventWireup="true" Inherits="MP_ADM.WebUserControls.mod_login" Codebehind="mod_login.ascx.cs" %> diff --git a/MP-ADM/WebUserControls/mod_login.ascx.cs b/MP-ADM/WebUserControls/mod_login.ascx.cs index 7c5831e6..7f021b71 100644 --- a/MP-ADM/WebUserControls/mod_login.ascx.cs +++ b/MP-ADM/WebUserControls/mod_login.ascx.cs @@ -2,85 +2,97 @@ using SteamWare; using System; using System.Web.UI; -/// -/// classe gestione login e forzatura login -/// -public partial class mod_login : SteamWare.ApplicationUserControl +namespace MP_ADM.WebUserControls { - #region area protected/private - - #region area proprietà - - private SteamWare.loginMode _isForceUser = SteamWare.loginMode.normale; - - #endregion - - #region area metodi - /// - /// imposta la modalità di login tra normale / forceUser + /// classe gestione login e forzatura login /// - private void setLoginMode() + public partial class mod_login : SteamWare.ApplicationUserControl { - switch (_isForceUser) - { - case SteamWare.loginMode.normale: - pnlForceUser.Visible = false; - pnlSelectUser.Visible = false; - break; - case SteamWare.loginMode.forceUser: - pnlForceUser.Visible = true; - pnlSelectUser.Visible = false; - break; - case SteamWare.loginMode.standardUser: - pnlForceUser.Visible = false; - pnlSelectUser.Visible = true; - break; - default: - break; - } - } + #region area protected/private - protected override void traduciObj() - { - lblPwd.Text = user_std.UtSn.Traduci("lblPwd"); - lblUser.Text = user_std.UtSn.Traduci("lblUser"); - lblDominio.Text = user_std.UtSn.Traduci("lblDominio"); - lblTitolo.Text = user_std.UtSn.Traduci("ForzaUtente"); - btnOk.Text = user_std.UtSn.Traduci("btnCommit"); - btnOkUserStd.Text = user_std.UtSn.Traduci("btnCommit"); - } + #region area proprietà - /// - /// prova a verificare se l'utente sia ok x AD credentials - /// - private void AdLogin() - { - lblMessage.Text = "User not authenticated..."; - if (Page.User.Identity.IsAuthenticated) + private SteamWare.loginMode _isForceUser = SteamWare.loginMode.normale; + + #endregion + + #region area metodi + + /// + /// imposta la modalità di login tra normale / forceUser + /// + private void setLoginMode() { - //recupera user windows se c'è... - string ad_name = Page.User.Identity.Name; - string delimStr = "\\"; - char[] delimiter = delimStr.ToCharArray(); - string[] dom_user = ad_name.Split(delimiter, 2); - // passo al controllo di verifica ADuserOk... - user_std _utente = new user_std(); - if (_utente.ADuserOk(dom_user[0], dom_user[1])) + switch (_isForceUser) { - bool fatto = _utente.startUpUtente(dom_user[0], dom_user[1]); - if (fatto) + case SteamWare.loginMode.normale: + pnlForceUser.Visible = false; + pnlSelectUser.Visible = false; + break; + case SteamWare.loginMode.forceUser: + pnlForceUser.Visible = true; + pnlSelectUser.Visible = false; + break; + case SteamWare.loginMode.standardUser: + pnlForceUser.Visible = false; + pnlSelectUser.Visible = true; + break; + default: + break; + } + } + + protected override void traduciObj() + { + lblPwd.Text = user_std.UtSn.Traduci("lblPwd"); + lblUser.Text = user_std.UtSn.Traduci("lblUser"); + lblDominio.Text = user_std.UtSn.Traduci("lblDominio"); + lblTitolo.Text = user_std.UtSn.Traduci("ForzaUtente"); + btnOk.Text = user_std.UtSn.Traduci("btnCommit"); + btnOkUserStd.Text = user_std.UtSn.Traduci("btnCommit"); + } + + /// + /// prova a verificare se l'utente sia ok x AD credentials + /// + private void AdLogin() + { + lblMessage.Text = "User not authenticated..."; + if (Page.User.Identity.IsAuthenticated) + { + //recupera user windows se c'è... + string ad_name = Page.User.Identity.Name; + string delimStr = "\\"; + char[] delimiter = delimStr.ToCharArray(); + string[] dom_user = ad_name.Split(delimiter, 2); + // passo al controllo di verifica ADuserOk... + user_std _utente = new user_std(); + if (_utente.ADuserOk(dom_user[0], dom_user[1])) { - SteamWare.logger.lg.scriviLog(string.Format("L'utente {0} ({1}) ha effettuato il login correttamente", _utente.CognomeNome, _utente.userNameAD), SteamWare.tipoLog.INFO); - if (Login_ok != null) + bool fatto = _utente.startUpUtente(dom_user[0], dom_user[1]); + if (fatto) { - Login_ok(this, new EventArgs()); + SteamWare.logger.lg.scriviLog(string.Format("L'utente {0} ({1}) ha effettuato il login correttamente", _utente.CognomeNome, _utente.userNameAD), SteamWare.tipoLog.INFO); + if (Login_ok != null) + { + Login_ok(this, new EventArgs()); + } + } + else + { + lblMessage.Text = String.Format("{0}
There are some problems instatiating user: {1}/{2}", user_std.UtSn.Traduci("AccessFail"), dom_user[0], dom_user[1]); + SteamWare.logger.lg.scriviLog(String.Format("Accesso fallito, problemi ad istanziare l'utente {0}/{1}", dom_user[0], dom_user[1]), SteamWare.tipoLog.ERROR); + if (Login_Error != null) + { + Login_Error(this, new EventArgs()); + } } } else { - lblMessage.Text = String.Format("{0}
There are some problems instatiating user: {1}/{2}", user_std.UtSn.Traduci("AccessFail"), dom_user[0], dom_user[1]); - SteamWare.logger.lg.scriviLog(String.Format("Accesso fallito, problemi ad istanziare l'utente {0}/{1}", dom_user[0], dom_user[1]), SteamWare.tipoLog.ERROR); + lblMessage.Text = String.Format("{0}
user not allowed: {1}/{2}", user_std.UtSn.Traduci("AccessFail"), dom_user[0], dom_user[1]); + SteamWare.logger.lg.scriviLog(String.Format("Utente non autorizzato: {0}/{1}", dom_user[0], dom_user[1]), SteamWare.tipoLog.WARNING); if (Login_Error != null) { Login_Error(this, new EventArgs()); @@ -89,63 +101,64 @@ public partial class mod_login : SteamWare.ApplicationUserControl } else { - lblMessage.Text = String.Format("{0}
user not allowed: {1}/{2}", user_std.UtSn.Traduci("AccessFail"), dom_user[0], dom_user[1]); - SteamWare.logger.lg.scriviLog(String.Format("Utente non autorizzato: {0}/{1}", dom_user[0], dom_user[1]), SteamWare.tipoLog.WARNING); + lblMessage.Text = user_std.UtSn.Traduci("AccessFail") + user_std.UtSn.Traduci("UsrNotAuth"); + SteamWare.logger.lg.scriviLog(String.Format("Accesso fallito, utente non autenticato"), SteamWare.tipoLog.WARNING); if (Login_Error != null) { Login_Error(this, new EventArgs()); } } } - else - { - lblMessage.Text = user_std.UtSn.Traduci("AccessFail") + user_std.UtSn.Traduci("UsrNotAuth"); - SteamWare.logger.lg.scriviLog(String.Format("Accesso fallito, utente non autenticato"), SteamWare.tipoLog.WARNING); - if (Login_Error != null) - { - Login_Error(this, new EventArgs()); - } - } - } - /// - /// effettua verifiche e se concesso permette di forzare l'accesso utente - /// - private void ForceUserIdentity() - { - if (Page.User.Identity.IsAuthenticated) + /// + /// effettua verifiche e se concesso permette di forzare l'accesso utente + /// + private void ForceUserIdentity() { - bool _allowForceUser = false; - try + if (Page.User.Identity.IsAuthenticated) { - _allowForceUser = SteamWare.memLayer.ML.CRB("_allowForceUser"); - } - catch - { - _allowForceUser = false; - } - if (_allowForceUser) - { - if (authKey.Text == "forzaInter") // verifica passphrase... + bool _allowForceUser = false; + try { - user_std _utente = new user_std(); - user_std.UtSn.isForcedUser = true; - bool fatto = _utente.startUpUtente(dominio.Text, user.Text); - if (fatto) + _allowForceUser = memLayer.ML.CRB("_allowForceUser"); + } + catch + { + _allowForceUser = false; + } + if (_allowForceUser) + { + if (authKey.Text == "forzaInter") // verifica passphrase... { - string _rigaLog = String.Format("User {0} has forced user identity ok: logged as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text); - SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.INFO); - if (Login_ok != null) + user_std _utente = new user_std(); + user_std.UtSn.isForcedUser = true; + bool fatto = _utente.startUpUtente(dominio.Text, user.Text); + if (fatto) { - Login_ok(this, new EventArgs()); + string _rigaLog = String.Format("User {0} has forced user identity ok: logged as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text); + SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.INFO); + if (Login_ok != null) + { + Login_ok(this, new EventArgs()); + } + } + } + else + { + lblMessage.Text = String.Format("{0}
key not allowed for operation!! operation logged!!", user_std.UtSn.Traduci("AccessFail")); + mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!
L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la sua key autorizzativa e' sbagliata...", Page.User.Identity.Name, user_std.UtSn.Traduci(memLayer.ML.CRS("defaultApp")))); + string _rigaLog = String.Format("User {0}\t tried to force user - wrong password - he tried to log as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text); + SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING); + if (Login_Error != null) + { + Login_Error(this, new EventArgs()); } } } else { - lblMessage.Text = String.Format("{0}
key not allowed for operation!! operation logged!!", user_std.UtSn.Traduci("AccessFail")); - mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!
L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la sua key autorizzativa e' sbagliata...", Page.User.Identity.Name, user_std.UtSn.Traduci(SteamWare.memLayer.ML.CRS("defaultApp")))); - string _rigaLog = String.Format("User {0}\t tried to force user - wrong password - he tried to log as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text); + mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!
L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la funzione e' disabilitata...", Page.User.Identity.Name, user_std.UtSn.Traduci(memLayer.ML.CRS("defaultApp")))); + string _rigaLog = String.Format("User {0}\t tried to force user - access disabled - he tried to log as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text); SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING); if (Login_Error != null) { @@ -155,155 +168,145 @@ public partial class mod_login : SteamWare.ApplicationUserControl } else { - mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!
L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la funzione e' disabilitata...", Page.User.Identity.Name, user_std.UtSn.Traduci(SteamWare.memLayer.ML.CRS("defaultApp")))); - string _rigaLog = String.Format("User {0}\t tried to force user - access disabled - he tried to log as \t {1}\\{2}", Page.User.Identity.Name, dominio.Text, user.Text); - SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING); + lblMessage.Text = string.Format("{0}
user not authenticated!
", user_std.UtSn.Traduci("AccessFail")); if (Login_Error != null) { Login_Error(this, new EventArgs()); } + string _rigaLog = String.Format("\t Someone tried to force user - real user: \t - not autenticated - \t tried to log as \t {0}\\{1}", dominio.Text, user.Text); + SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING); } } - else + /// + /// se concesso il generico ForceUser permette di forzare l'accesso utente ad uno degli standard + /// + private void StdUserIdentity() { - lblMessage.Text = string.Format("{0}
user not authenticated!
", user_std.UtSn.Traduci("AccessFail")); - if (Login_Error != null) + if (Page.User.Identity.IsAuthenticated) { - Login_Error(this, new EventArgs()); - } - string _rigaLog = String.Format("\t Someone tried to force user - real user: \t - not autenticated - \t tried to log as \t {0}\\{1}", dominio.Text, user.Text); - SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING); - } - } - /// - /// se concesso il generico ForceUser permette di forzare l'accesso utente ad uno degli standard - /// - private void StdUserIdentity() - { - if (Page.User.Identity.IsAuthenticated) - { - bool _allowForceUser = false; - try - { - _allowForceUser = SteamWare.memLayer.ML.CRB("_allowForceUser"); - } - catch - { - _allowForceUser = false; - } - if (_allowForceUser) - { - //leggo e codifico utente indicato - string delimStr = "\\"; - char[] delimiter = delimStr.ToCharArray(); - string[] dom_user = ddlStdUser.SelectedValue.Split(delimiter, 2); - //forzo login! - user_std _utente = new user_std(); - user_std.UtSn.isForcedUser = true; - bool fatto = _utente.startUpUtente(dom_user[0], dom_user[1]); - if (fatto) + bool _allowForceUser = false; + try { - string _rigaLog = String.Format("User {0} has forced user identity ok: logged as \t {1}\\{2}", Page.User.Identity.Name, dom_user[0], dom_user[1]); - SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.INFO); - if (Login_ok != null) + _allowForceUser = memLayer.ML.CRB("_allowForceUser"); + } + catch + { + _allowForceUser = false; + } + if (_allowForceUser) + { + //leggo e codifico utente indicato + string delimStr = "\\"; + char[] delimiter = delimStr.ToCharArray(); + string[] dom_user = ddlStdUser.SelectedValue.Split(delimiter, 2); + //forzo login! + user_std _utente = new user_std(); + user_std.UtSn.isForcedUser = true; + bool fatto = _utente.startUpUtente(dom_user[0], dom_user[1]); + if (fatto) { - Login_ok(this, new EventArgs()); + string _rigaLog = String.Format("User {0} has forced user identity ok: logged as \t {1}\\{2}", Page.User.Identity.Name, dom_user[0], dom_user[1]); + SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.INFO); + if (Login_ok != null) + { + Login_ok(this, new EventArgs()); + } + } + + } + else + { + mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!
L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la funzione e' disabilitata...", Page.User.Identity.Name, user_std.UtSn.Traduci(memLayer.ML.CRS("defaultApp")))); + string _rigaLog = String.Format("User {0}\t tried to force user - access disabled - he tried to log as \t {1}", Page.User.Identity.Name, ddlStdUser.SelectedValue); + SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING); + if (Login_Error != null) + { + Login_Error(this, new EventArgs()); } } - } else { - mandaEmail(_fromEmail, _adminEmail, "Attenzione: tentativo di accesso non autorizzato!", String.Format("Tentativo di forcing user non autorizzato!
L'utente {0} ha tentato di accedere a {1} forzando l'utente ma la funzione e' disabilitata...", Page.User.Identity.Name, user_std.UtSn.Traduci(SteamWare.memLayer.ML.CRS("defaultApp")))); - string _rigaLog = String.Format("User {0}\t tried to force user - access disabled - he tried to log as \t {1}", Page.User.Identity.Name, ddlStdUser.SelectedValue); - SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING); + lblMessage.Text = string.Format("{0}
user not authenticated!
", user_std.UtSn.Traduci("AccessFail")); if (Login_Error != null) { Login_Error(this, new EventArgs()); } + string _rigaLog = String.Format("\t Someone tried to force user - real user: \t - not autenticated - \t tried to log as \t {0}\\{1}", dominio.Text, user.Text); + SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING); } } - else + + /// + /// fa login con force user e controllo pwd + /// + /// + /// + protected void btnOk_Click(object sender, EventArgs e) { - lblMessage.Text = string.Format("{0}
user not authenticated!
", user_std.UtSn.Traduci("AccessFail")); - if (Login_Error != null) + ForceUserIdentity(); + } + /// + /// fa login utente tipo standard + /// + /// + /// + protected void btnOkUserStd_Click(object sender, EventArgs e) + { + StdUserIdentity(); + } + + #endregion + + #endregion + + #region area public + + #region eventi pubblici esposti + + public event EventHandler Login_ok; + public event EventHandler Login_Error; + + #endregion + + #region area proprietà + + /// + /// modalità funzionamento controllo tra normale (ActiveDirectory e user auth di default) e forceUser + /// + public SteamWare.loginMode modoLogin + { + get { - Login_Error(this, new EventArgs()); + return _isForceUser; + } + set + { + _isForceUser = value; } - string _rigaLog = String.Format("\t Someone tried to force user - real user: \t - not autenticated - \t tried to log as \t {0}\\{1}", dominio.Text, user.Text); - SteamWare.logger.lg.scriviLog(_rigaLog, SteamWare.tipoLog.WARNING); } - } - /// - /// fa login con force user e controllo pwd - /// - /// - /// - protected void btnOk_Click(object sender, EventArgs e) - { - ForceUserIdentity(); - } - /// - /// fa login utente tipo standard - /// - /// - /// - protected void btnOkUserStd_Click(object sender, EventArgs e) - { - StdUserIdentity(); - } + #endregion - #endregion - #endregion - - #region area public - - #region eventi pubblici esposti - - public event EventHandler Login_ok; - public event EventHandler Login_Error; - - #endregion - - #region area proprietà - - /// - /// modalità funzionamento controllo tra normale (ActiveDirectory e user auth di default) e forceUser - /// - public SteamWare.loginMode modoLogin - { - get + /// + /// avvio pagina + /// + protected override void Page_Load(object sender, EventArgs e) { - return _isForceUser; - } - set - { - _isForceUser = value; + base.Page_Load(sender, e); + //carico da web.config i default values + loadDefaultsWebConfig(); + // procedo... + setLoginMode(); + Session.RemoveAll(); + if (_isForceUser == SteamWare.loginMode.normale) + { + AdLogin(); + } } + + #endregion + } - - #endregion - - - /// - /// avvio pagina - /// - protected override void Page_Load(object sender, EventArgs e) - { - base.Page_Load(sender, e); - //carico da web.config i default values - loadDefaultsWebConfig(); - // procedo... - setLoginMode(); - Session.RemoveAll(); - if (_isForceUser == SteamWare.loginMode.normale) - { - AdLogin(); - } - } - - #endregion - } diff --git a/MP-ADM/WebUserControls/mod_login.ascx.designer.cs b/MP-ADM/WebUserControls/mod_login.ascx.designer.cs index 1285a2c5..2647edf4 100644 --- a/MP-ADM/WebUserControls/mod_login.ascx.designer.cs +++ b/MP-ADM/WebUserControls/mod_login.ascx.designer.cs @@ -1,140 +1,143 @@ //------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4927 +// +// Codice generato da uno strumento. // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// //------------------------------------------------------------------------------ +namespace MP_ADM.WebUserControls +{ -public partial class mod_login { - - /// - /// pnlForceUser control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel pnlForceUser; - - /// - /// lblTitolo control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label lblTitolo; - - /// - /// lblPwd control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label lblPwd; - - /// - /// authKey control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox authKey; - - /// - /// lblDominio control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label lblDominio; - - /// - /// dominio control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox dominio; - - /// - /// lblUser control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label lblUser; - - /// - /// user control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox user; - - /// - /// btnOk control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button btnOk; - - /// - /// pnlSelectUser control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Panel pnlSelectUser; - - /// - /// ddlStdUser control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.DropDownList ddlStdUser; - - /// - /// btnOkUserStd control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button btnOkUserStd; - - /// - /// lblMessage control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label lblMessage; - - /// - /// HypLinkSSO control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.HyperLink HypLinkSSO; + public partial class mod_login + { + + /// + /// Controllo pnlForceUser. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Panel pnlForceUser; + + /// + /// Controllo lblTitolo. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblTitolo; + + /// + /// Controllo lblPwd. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblPwd; + + /// + /// Controllo authKey. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.TextBox authKey; + + /// + /// Controllo lblDominio. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblDominio; + + /// + /// Controllo dominio. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.TextBox dominio; + + /// + /// Controllo lblUser. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblUser; + + /// + /// Controllo user. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.TextBox user; + + /// + /// Controllo btnOk. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Button btnOk; + + /// + /// Controllo pnlSelectUser. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Panel pnlSelectUser; + + /// + /// Controllo ddlStdUser. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.DropDownList ddlStdUser; + + /// + /// Controllo btnOkUserStd. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Button btnOkUserStd; + + /// + /// Controllo lblMessage. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblMessage; + + /// + /// Controllo HypLinkSSO. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.HyperLink HypLinkSSO; + } } diff --git a/MP-ADM/WebUserControls/mod_main_help.ascx b/MP-ADM/WebUserControls/mod_main_help.ascx index 9bf29586..2b7b86ec 100644 --- a/MP-ADM/WebUserControls/mod_main_help.ascx +++ b/MP-ADM/WebUserControls/mod_main_help.ascx @@ -1,91 +1,91 @@ <%@ Control Language="C#" AutoEventWireup="true" Inherits="mod_main_help" CodeBehind="mod_main_help.ascx.cs" %>
-
- +
+
<%: traduci("btnAnagArticoli") %>
-
-
-
- + +
+
+
<%: traduci("btnGestPromesseOdl") %>
-
-
-
- + +
+
+
<%: traduci("btnGestOdl") %>
-
-
-
- + +
+
+
<%: traduci("btnGestDatiMacchina") %>
-
-
-
-
+
+
+
+
<%: traduci("btnApprovaTC") %>
-
-
-
- + +
+
+
<%: traduci("btnApprovaProd") %>
-
-
-
- + +
+
+
<%: traduci("btnBCode") %>
-
-
-
- + +
+
+
<%: traduci("btnGestKIT") %>
-
-
-
- + +
+
+
<%: traduci("btnPlanner") %>
-
-
-
- + +
+
+
<%: traduci("btnDataImport") %>
-
-
-
- + +
+
+
<%: traduci("btnBCodeCTrack") %>
-
-
+
+
diff --git a/MP-ADM/WebUserControls/mod_menuBottom.ascx b/MP-ADM/WebUserControls/mod_menuBottom.ascx index 5a5d0c25..0d65a478 100644 --- a/MP-ADM/WebUserControls/mod_menuBottom.ascx +++ b/MP-ADM/WebUserControls/mod_menuBottom.ascx @@ -1,5 +1,5 @@ <%@ Control Language="C#" AutoEventWireup="true" - Inherits="mod_menuBottom" CodeBehind="mod_menuBottom.ascx.cs" %> + Inherits="MP_ADM.WebUserControls.mod_menuBottom" CodeBehind="mod_menuBottom.ascx.cs" %>
- - - - - - - - - -
- -
-
-
+<%@ Control Language="C#" AutoEventWireup="true" Inherits="MP_ADM.WebUserControls.mod_unauthorized" CodeBehind="mod_unauthorized.ascx.cs" %> + +
+
+ +
+
+ +
+
+ +
+
diff --git a/MP-ADM/WebUserControls/mod_unauthorized.ascx.cs b/MP-ADM/WebUserControls/mod_unauthorized.ascx.cs index 511b8989..edbcf7d8 100644 --- a/MP-ADM/WebUserControls/mod_unauthorized.ascx.cs +++ b/MP-ADM/WebUserControls/mod_unauthorized.ascx.cs @@ -1,14 +1,15 @@ +using MP_ADM; using SteamWare; using System; -namespace MoonPro_site.WebUserControls +namespace MP_ADM.WebUserControls { - public partial class mod_unauthorized : System.Web.UI.UserControl + public partial class mod_unauthorized : BaseUserControl { protected void Page_Load(object sender, EventArgs e) { - lblTitle.Text = user_std.UtSn.Traduci("NonDisponibile"); - lblMess.Text = user_std.UtSn.Traduci("NonAuth"); + lblTitle.Text = traduci("NonDisponibile"); + lblMess.Text = traduci("NonAuth"); } } } \ No newline at end of file diff --git a/MP-ADM/WebUserControls/mod_unauthorized.ascx.designer.cs b/MP-ADM/WebUserControls/mod_unauthorized.ascx.designer.cs index 91966c1b..fac1f4a3 100644 --- a/MP-ADM/WebUserControls/mod_unauthorized.ascx.designer.cs +++ b/MP-ADM/WebUserControls/mod_unauthorized.ascx.designer.cs @@ -1,43 +1,43 @@ //------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4927 +// +// Codice generato da uno strumento. // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// //------------------------------------------------------------------------------ -namespace MoonPro_site.WebUserControls +namespace MP_ADM.WebUserControls { - public partial class mod_unauthorized { - + public partial class mod_unauthorized + { + /// - /// lblTitleMain control. + /// Controllo lblTitleMain. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.Label lblTitleMain; - + /// - /// lblTitle control. + /// Controllo lblTitle. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.Label lblTitle; - + /// - /// lblMess control. + /// Controllo lblMess. /// /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// protected global::System.Web.UI.WebControls.Label lblMess; } diff --git a/MP-ADM/anagArticoli.aspx.cs b/MP-ADM/anagArticoli.aspx.cs index 39d4469a..0759f2fc 100644 --- a/MP-ADM/anagArticoli.aspx.cs +++ b/MP-ADM/anagArticoli.aspx.cs @@ -2,7 +2,7 @@ namespace MP_ADM { - public partial class anagArticoli : System.Web.UI.Page + public partial class anagArticoli : BasePage { protected void Page_Load(object sender, EventArgs e) { diff --git a/MP-ADM/aperturaImpianti.aspx b/MP-ADM/aperturaImpianti.aspx index c7a4e246..55c8b2d3 100644 --- a/MP-ADM/aperturaImpianti.aspx +++ b/MP-ADM/aperturaImpianti.aspx @@ -1,4 +1,4 @@ -<%@ Page Title="MPADM | apertura impianti" Language="C#" MasterPageFile="~/WebMasterPages/MoonPro.master" AutoEventWireup="true" Inherits="aperturaImpianti" Codebehind="aperturaImpianti.aspx.cs" %> +<%@ Page Title="MPADM | apertura impianti" Language="C#" MasterPageFile="~/WebMasterPages/MoonPro.master" AutoEventWireup="true" Inherits="MP_ADM.aperturaImpianti" Codebehind="aperturaImpianti.aspx.cs" %> <%@ Register Src="~/WebUserControls/mod_aperturaImpianti.ascx" tagname="mod_aperturaImpianti" tagprefix="uc1" %> diff --git a/MP-ADM/aperturaImpianti.aspx.cs b/MP-ADM/aperturaImpianti.aspx.cs index c0429b4d..eec5987e 100644 --- a/MP-ADM/aperturaImpianti.aspx.cs +++ b/MP-ADM/aperturaImpianti.aspx.cs @@ -1,9 +1,12 @@ using System; -public partial class aperturaImpianti : System.Web.UI.Page +namespace MP_ADM { - protected void Page_Load(object sender, EventArgs e) + public partial class aperturaImpianti : BasePage { + protected void Page_Load(object sender, EventArgs e) + { + } } } diff --git a/MP-ADM/aperturaImpianti.aspx.designer.cs b/MP-ADM/aperturaImpianti.aspx.designer.cs index c4858b8f..0cd265e6 100644 --- a/MP-ADM/aperturaImpianti.aspx.designer.cs +++ b/MP-ADM/aperturaImpianti.aspx.designer.cs @@ -7,16 +7,20 @@ // //------------------------------------------------------------------------------ +namespace MP_ADM +{ -public partial class aperturaImpianti { - - /// - /// Controllo mod_aperturaImpianti1. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::mod_aperturaImpianti mod_aperturaImpianti1; + public partial class aperturaImpianti + { + + /// + /// Controllo mod_aperturaImpianti1. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::mod_aperturaImpianti mod_aperturaImpianti1; + } } diff --git a/MP-ADM/approvazioneODL.aspx.cs b/MP-ADM/approvazioneODL.aspx.cs index 7f861c96..74a36356 100644 --- a/MP-ADM/approvazioneODL.aspx.cs +++ b/MP-ADM/approvazioneODL.aspx.cs @@ -3,22 +3,22 @@ using System; namespace MP_ADM { - public partial class approvazioneODL : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) + public partial class approvazioneODL : BasePage { - checkEnabled(); + protected void Page_Load(object sender, EventArgs e) + { + checkEnabled(); + } + private void checkEnabled() + { + bool optPar = memLayer.ML.CRB("OptAdmApprTempiEnabled"); + divContent.Visible = optPar; + string messaggio = ""; + if (!optPar) + { + messaggio = "Attenzione: gestione approvazione cambio TC disabilitata"; + } + lblDataImportOut.Text = messaggio; + } } - private void checkEnabled() - { - bool optPar = memLayer.ML.CRB("OptAdmApprTempiEnabled"); - divContent.Visible = optPar; - string messaggio = ""; - if (!optPar) - { - messaggio = "Attenzione: gestione approvazione cambio TC disabilitata"; - } - lblDataImportOut.Text = messaggio; - } - } } \ No newline at end of file diff --git a/MP-ADM/approvazioneODL.aspx.designer.cs b/MP-ADM/approvazioneODL.aspx.designer.cs index eae322aa..f43c2f8f 100644 --- a/MP-ADM/approvazioneODL.aspx.designer.cs +++ b/MP-ADM/approvazioneODL.aspx.designer.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ + //------------------------------------------------------------------------------ // // Codice generato da uno strumento. // diff --git a/MP-ADM/approvazioneProd.aspx.cs b/MP-ADM/approvazioneProd.aspx.cs index 0d68413f..3ec88ffd 100644 --- a/MP-ADM/approvazioneProd.aspx.cs +++ b/MP-ADM/approvazioneProd.aspx.cs @@ -3,23 +3,22 @@ using System; namespace MP_ADM { - public partial class approvazioneProd : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) + public partial class approvazioneProd : BasePage { - - checkEnabled(); + protected void Page_Load(object sender, EventArgs e) + { + checkEnabled(); + } + private void checkEnabled() + { + bool optPar = memLayer.ML.CRB("OptAdmApprProdEnabled"); + divContent.Visible = optPar; + string messaggio = ""; + if (!optPar) + { + messaggio = "Attenzione: gestione approvazione produzione disabilitata"; + } + lblDataImportOut.Text = messaggio; + } } - private void checkEnabled() - { - bool optPar = memLayer.ML.CRB("OptAdmApprProdEnabled"); - divContent.Visible = optPar; - string messaggio = ""; - if (!optPar) - { - messaggio = "Attenzione: gestione approvazione produzione disabilitata"; - } - lblDataImportOut.Text = messaggio; - } - } } \ No newline at end of file diff --git a/MP-ADM/calendChiusura.aspx b/MP-ADM/calendChiusura.aspx index 309672d2..0238020d 100644 --- a/MP-ADM/calendChiusura.aspx +++ b/MP-ADM/calendChiusura.aspx @@ -1,11 +1,13 @@ -<%@ Page Title="MPADM | Calendario" Language="C#" MasterPageFile="~/WebMasterPages/MoonPro.master" AutoEventWireup="true" Inherits="calendChiusura" Codebehind="calendChiusura.aspx.cs" %> +<%@ Page Title="MPADM | Calendario" Language="C#" MasterPageFile="~/WebMasterPages/MoonPro.master" AutoEventWireup="true" Inherits="MP_ADM.calendChiusura" Codebehind="calendChiusura.aspx.cs" %> + +<%@ Register Src="~/WebUserControls/mod_fixCal.ascx" TagPrefix="uc1" TagName="mod_fixCal" %> +<%@ Register Src="~/WebUserControls/mod_calChiusura.ascx" TagPrefix="uc1" TagName="mod_calChiusura" %> + -<%@ Register Src="~/WebUserControls/mod_calChiusura.ascx" tagname="mod_calChiusura" tagprefix="uc1" %> -<%@ Register Src="~/WebUserControls/mod_fixCal.ascx" tagname="mod_fixCal" tagprefix="uc2" %> - - + + diff --git a/MP-ADM/calendChiusura.aspx.cs b/MP-ADM/calendChiusura.aspx.cs index c0817b8d..58336ed7 100644 --- a/MP-ADM/calendChiusura.aspx.cs +++ b/MP-ADM/calendChiusura.aspx.cs @@ -1,9 +1,12 @@ using System; -public partial class calendChiusura : System.Web.UI.Page +namespace MP_ADM { - protected void Page_Load(object sender, EventArgs e) + public partial class calendChiusura : BasePage { + protected void Page_Load(object sender, EventArgs e) + { + } } -} +} \ No newline at end of file diff --git a/MP-ADM/calendChiusura.aspx.designer.cs b/MP-ADM/calendChiusura.aspx.designer.cs index 9bed917b..5a4cc8a9 100644 --- a/MP-ADM/calendChiusura.aspx.designer.cs +++ b/MP-ADM/calendChiusura.aspx.designer.cs @@ -7,25 +7,29 @@ // //------------------------------------------------------------------------------ +namespace MP_ADM +{ -public partial class calendChiusura { - - /// - /// Controllo mod_fixCal1. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::mod_fixCal mod_fixCal1; - - /// - /// Controllo mod_calChiusura1. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::mod_calChiusura mod_calChiusura1; + public partial class calendChiusura + { + + /// + /// Controllo mod_fixCal. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::MP_ADM.WebUserControls.mod_fixCal mod_fixCal; + + /// + /// Controllo mod_calChiusura. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::MP_ADM.WebUserControls.mod_calChiusura mod_calChiusura; + } } diff --git a/MP-ADM/forceUser.aspx b/MP-ADM/forceUser.aspx index 425767f2..ec4c177a 100644 --- a/MP-ADM/forceUser.aspx +++ b/MP-ADM/forceUser.aspx @@ -1,9 +1,10 @@ <%@ Page Language="C#" MasterPageFile="~/WebMasterPages/AjaxSimple.master" AutoEventWireup="true" - Inherits="forceUser" Title="MPADM | ForceUser" Codebehind="forceUser.aspx.cs" %> + Inherits="MP_ADM.forceUser" Title="MPADM | ForceUser" Codebehind="forceUser.aspx.cs" %> + +<%@ Register Src="~/WebUserControls/mod_login.ascx" TagPrefix="uc1" TagName="mod_login" %> -<%@ Register Src="WebUserControls/mod_login.ascx" TagName="mod_login" TagPrefix="uc1" %>
- +
diff --git a/MP-ADM/forceUser.aspx.cs b/MP-ADM/forceUser.aspx.cs index aa1271b6..62184ad9 100644 --- a/MP-ADM/forceUser.aspx.cs +++ b/MP-ADM/forceUser.aspx.cs @@ -1,45 +1,36 @@ using System; -public partial class forceUser : System.Web.UI.Page +namespace MP_ADM { - protected string _nextPage + public partial class forceUser : BasePage { - get + + protected void Page_Load(object sender, EventArgs e) { - string pagina = SteamWare.memLayer.ML.StringSessionObj("nextPage"); - if (pagina == "") - { - pagina = "menu.aspx"; - } - return pagina; + mod_login.modoLogin = SteamWare.loginMode.forceUser; + } + + protected override void OnInit(EventArgs e) + { + base.OnInit(e); + mod_login.Login_ok += new EventHandler(Mod_login1_Login_ok); + mod_login.Login_Error += new EventHandler(Mod_login1_Login_Error); + } + + void Mod_login1_Login_Error(object sender, EventArgs e) + { + //Response.Redirect("./unauthorized.aspx"); + } + + void Mod_login1_Login_ok(object sender, EventArgs e) + { + Response.Redirect(_nextPage); + } + protected override void OnUnload(EventArgs e) + { + base.OnUnload(e); + mod_login.Login_ok -= new EventHandler(Mod_login1_Login_ok); + mod_login.Login_Error -= new EventHandler(Mod_login1_Login_Error); } } - - protected void Page_Load(object sender, EventArgs e) - { - Mod_login1.modoLogin = SteamWare.loginMode.forceUser; - } - - protected override void OnInit(EventArgs e) - { - base.OnInit(e); - Mod_login1.Login_ok += new EventHandler(Mod_login1_Login_ok); - Mod_login1.Login_Error += new EventHandler(Mod_login1_Login_Error); - } - - void Mod_login1_Login_Error(object sender, EventArgs e) - { - //Response.Redirect("./unauthorized.aspx"); - } - - void Mod_login1_Login_ok(object sender, EventArgs e) - { - Response.Redirect(_nextPage); - } - protected override void OnUnload(EventArgs e) - { - base.OnUnload(e); - Mod_login1.Login_ok -= new EventHandler(Mod_login1_Login_ok); - Mod_login1.Login_Error -= new EventHandler(Mod_login1_Login_Error); - } -} +} \ No newline at end of file diff --git a/MP-ADM/forceUser.aspx.designer.cs b/MP-ADM/forceUser.aspx.designer.cs index 75d56583..fe23e924 100644 --- a/MP-ADM/forceUser.aspx.designer.cs +++ b/MP-ADM/forceUser.aspx.designer.cs @@ -7,17 +7,20 @@ // //------------------------------------------------------------------------------ - - -public partial class forceUser +namespace MP_ADM { - /// - /// Controllo Mod_login1. - /// - /// - /// Campo generato automaticamente. - /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. - /// - protected global::mod_login Mod_login1; + + public partial class forceUser + { + + /// + /// Controllo mod_login. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::MP_ADM.WebUserControls.mod_login mod_login; + } } diff --git a/MP-ADM/gestPromesseODL.aspx.cs b/MP-ADM/gestPromesseODL.aspx.cs index 6dd65ff1..aba9602b 100644 --- a/MP-ADM/gestPromesseODL.aspx.cs +++ b/MP-ADM/gestPromesseODL.aspx.cs @@ -7,11 +7,11 @@ using System.Web.UI.WebControls; namespace MP_ADM { - public partial class gestPromesseODL : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) + public partial class gestPromesseODL : BasePage { + protected void Page_Load(object sender, EventArgs e) + { + } } - } } \ No newline at end of file diff --git a/MP-ADM/gestioneDatiMacchine.aspx b/MP-ADM/gestioneDatiMacchine.aspx index 23c13396..7f3faef3 100644 --- a/MP-ADM/gestioneDatiMacchine.aspx +++ b/MP-ADM/gestioneDatiMacchine.aspx @@ -1,4 +1,4 @@ -<%@ Page Title="MPADM | Gest Dati Macc" Language="C#" MasterPageFile="~/WebMasterPages/MoonPro.master" AutoEventWireup="true" CodeBehind="gestioneDatiMacchine.aspx.cs" Inherits="MoonPro_site.gestioneDatiMacchine" %> +<%@ Page Title="MPADM | Gest Dati Macc" Language="C#" MasterPageFile="~/WebMasterPages/MoonPro.master" AutoEventWireup="true" CodeBehind="gestioneDatiMacchine.aspx.cs" Inherits="MP_ADM.gestioneDatiMacchine" %> <%@ Register src="WebUserControls/mod_gestioneDatiMacchine.ascx" tagname="mod_gestioneDatiMacchine" tagprefix="uc1" %> diff --git a/MP-ADM/gestioneDatiMacchine.aspx.cs b/MP-ADM/gestioneDatiMacchine.aspx.cs index 27affcc3..d97016a4 100644 --- a/MP-ADM/gestioneDatiMacchine.aspx.cs +++ b/MP-ADM/gestioneDatiMacchine.aspx.cs @@ -1,8 +1,8 @@ using System; -namespace MoonPro_site +namespace MP_ADM { - public partial class gestioneDatiMacchine : System.Web.UI.Page + public partial class gestioneDatiMacchine : BasePage { protected void Page_Load(object sender, EventArgs e) { diff --git a/MP-ADM/gestioneDatiMacchine.aspx.designer.cs b/MP-ADM/gestioneDatiMacchine.aspx.designer.cs index 02df0ad6..d0e334ec 100644 --- a/MP-ADM/gestioneDatiMacchine.aspx.designer.cs +++ b/MP-ADM/gestioneDatiMacchine.aspx.designer.cs @@ -7,7 +7,8 @@ // //------------------------------------------------------------------------------ -namespace MoonPro_site { +namespace MP_ADM +{ public partial class gestioneDatiMacchine { @@ -19,6 +20,6 @@ namespace MoonPro_site { /// Campo generato automaticamente. /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// - protected global::MoonPro_site.WebUserControls.mod_gestioneDatiMacchine mod_gestioneDatiMacchine1; + protected global::MP_ADM.WebUserControls.mod_gestioneDatiMacchine mod_gestioneDatiMacchine1; } } diff --git a/MP-ADM/gestioneODL.aspx b/MP-ADM/gestioneODL.aspx index 8efd8308..71116f4d 100644 --- a/MP-ADM/gestioneODL.aspx +++ b/MP-ADM/gestioneODL.aspx @@ -1,4 +1,4 @@ -<%@ Page Title="MPADM | ODL" Language="C#" MasterPageFile="~/WebMasterPages/MoonPro.master" AutoEventWireup="true" CodeBehind="gestioneODL.aspx.cs" Inherits="MoonPro_site.gestioneODL" %> +<%@ Page Title="MPADM | ODL" Language="C#" MasterPageFile="~/WebMasterPages/MoonPro.master" AutoEventWireup="true" CodeBehind="gestioneODL.aspx.cs" Inherits="MP_ADM.gestioneODL" %> <%@ Register src="WebUserControls/mod_gestioneODL.ascx" tagname="mod_gestioneODL" tagprefix="uc1" %> diff --git a/MP-ADM/gestioneODL.aspx.cs b/MP-ADM/gestioneODL.aspx.cs index a19912dd..3121d991 100644 --- a/MP-ADM/gestioneODL.aspx.cs +++ b/MP-ADM/gestioneODL.aspx.cs @@ -1,8 +1,8 @@ using System; -namespace MoonPro_site +namespace MP_ADM { - public partial class gestioneODL : System.Web.UI.Page + public partial class gestioneODL : BasePage { protected void Page_Load(object sender, EventArgs e) { diff --git a/MP-ADM/gestioneODL.aspx.designer.cs b/MP-ADM/gestioneODL.aspx.designer.cs index 6ad6d319..8ed003ee 100644 --- a/MP-ADM/gestioneODL.aspx.designer.cs +++ b/MP-ADM/gestioneODL.aspx.designer.cs @@ -7,7 +7,8 @@ // //------------------------------------------------------------------------------ -namespace MoonPro_site { +namespace MP_ADM +{ public partial class gestioneODL { @@ -19,6 +20,6 @@ namespace MoonPro_site { /// Campo generato automaticamente. /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// - protected global::MoonPro_site.WebUserControls.mod_gestioneODL mod_gestioneODL1; + protected global::MP_ADM.WebUserControls.mod_gestioneODL mod_gestioneODL1; } } diff --git a/MP-ADM/login.aspx b/MP-ADM/login.aspx index e7bf1113..ef03141b 100644 --- a/MP-ADM/login.aspx +++ b/MP-ADM/login.aspx @@ -1,8 +1,10 @@ -<%@ Page Title="MPADM | Login" Language="C#" MasterPageFile="~/WebMasterPages/MoonPro_noAjax.master" AutoEventWireup="true" Inherits="MoonPro_site.login" Codebehind="login.aspx.cs" %> +<%@ Page Title="MPADM | Login" Language="C#" MasterPageFile="~/WebMasterPages/MoonPro_noAjax.master" AutoEventWireup="true" Inherits="MP_ADM.login" Codebehind="login.aspx.cs" %> + +<%@ Register Src="~/WebUserControls/mod_login.ascx" TagPrefix="uc1" TagName="mod_login" %> + -<%@ Register Src="~/WebUserControls/mod_login.ascx" TagName="mod_login" TagPrefix="uc1" %>
- +
diff --git a/MP-ADM/login.aspx.cs b/MP-ADM/login.aspx.cs index 7b09792f..508db0e5 100644 --- a/MP-ADM/login.aspx.cs +++ b/MP-ADM/login.aspx.cs @@ -1,48 +1,35 @@ using System; -namespace MoonPro_site +namespace MP_ADM { - public partial class login : System.Web.UI.Page + public partial class login : BasePage { - protected string _nextPage - { - get - { - string pagina = SteamWare.memLayer.ML.StringSessionObj("nextPage"); - if (pagina == "") - { - pagina = "menu.aspx"; - } - return pagina; - } - } - protected void Page_Load(object sender, EventArgs e) { - Mod_login1.modoLogin = SteamWare.loginMode.normale; + mod_login.modoLogin = SteamWare.loginMode.normale; } protected override void OnInit(EventArgs e) { base.OnInit(e); - Mod_login1.Login_ok += new EventHandler(Mod_login1_Login_ok); - Mod_login1.Login_Error += new EventHandler(Mod_login1_Login_Error); + mod_login.Login_ok += new EventHandler(mod_login_Login_ok); + mod_login.Login_Error += new EventHandler(mod_login_Login_Error); } - void Mod_login1_Login_Error(object sender, EventArgs e) + void mod_login_Login_Error(object sender, EventArgs e) { Response.Redirect("./unauthorized.aspx"); } - void Mod_login1_Login_ok(object sender, EventArgs e) + void mod_login_Login_ok(object sender, EventArgs e) { Response.Redirect(_nextPage); } protected override void OnUnload(EventArgs e) { base.OnUnload(e); - Mod_login1.Login_ok -= new EventHandler(Mod_login1_Login_ok); - Mod_login1.Login_Error -= new EventHandler(Mod_login1_Login_Error); + mod_login.Login_ok -= new EventHandler(mod_login_Login_ok); + mod_login.Login_Error -= new EventHandler(mod_login_Login_Error); } } } \ No newline at end of file diff --git a/MP-ADM/login.aspx.designer.cs b/MP-ADM/login.aspx.designer.cs index 3568f4a5..499453f8 100644 --- a/MP-ADM/login.aspx.designer.cs +++ b/MP-ADM/login.aspx.designer.cs @@ -7,18 +7,20 @@ // //------------------------------------------------------------------------------ -namespace MoonPro_site { - - - public partial class login { - +namespace MP_ADM +{ + + + public partial class login + { + /// - /// Controllo Mod_login1. + /// Controllo mod_login. /// /// /// Campo generato automaticamente. /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. /// - protected global::mod_login Mod_login1; + protected global::MP_ADM.WebUserControls.mod_login mod_login; } } diff --git a/MP-ADM/menu.aspx b/MP-ADM/menu.aspx index 99078a93..9879fd6a 100644 --- a/MP-ADM/menu.aspx +++ b/MP-ADM/menu.aspx @@ -1,4 +1,4 @@ -<%@ Page Language="C#" MasterPageFile="~/WebMasterPages/MoonPro.master" AutoEventWireup="true" Inherits="MoonPro_site.menu" Title="MPADM" Codebehind="menu.aspx.cs" %> +<%@ Page Language="C#" MasterPageFile="~/WebMasterPages/MoonPro.master" AutoEventWireup="true" Inherits="MP_ADM.menu" Title="MPADM" Codebehind="menu.aspx.cs" %> <%@ Register Src="~/WebUserControls/mod_main_help.ascx" TagName="mod_main_help" TagPrefix="uc2" %> diff --git a/MP-ADM/menu.aspx.cs b/MP-ADM/menu.aspx.cs index 4ab870ca..f50fba71 100644 --- a/MP-ADM/menu.aspx.cs +++ b/MP-ADM/menu.aspx.cs @@ -1,6 +1,6 @@ -namespace MoonPro_site +namespace MP_ADM { - public partial class menu : System.Web.UI.Page + public partial class menu : BasePage { } } \ No newline at end of file diff --git a/MP-ADM/menu.aspx.designer.cs b/MP-ADM/menu.aspx.designer.cs index d61736b5..32f00939 100644 --- a/MP-ADM/menu.aspx.designer.cs +++ b/MP-ADM/menu.aspx.designer.cs @@ -7,7 +7,8 @@ // //------------------------------------------------------------------------------ -namespace MoonPro_site { +namespace MP_ADM +{ public partial class menu { diff --git a/MP-ADM/test.aspx b/MP-ADM/test.aspx index 0949ad31..3c4c8698 100644 --- a/MP-ADM/test.aspx +++ b/MP-ADM/test.aspx @@ -1,5 +1,5 @@ <%@ Page Language="C#" MasterPageFile="~/WebMasterPages/MoonPro.master" AutoEventWireup="true" - Inherits="test" Title="Untitled Page" CodeBehind="test.aspx.cs" %> + Inherits="MP_ADM.test" Title="TEST Page" CodeBehind="test.aspx.cs" %> <%@ Register Assembly="SteamWare" Namespace="SteamWare" TagPrefix="cc1" %> diff --git a/MP-ADM/test.aspx.cs b/MP-ADM/test.aspx.cs index 3ee0225f..f11db90d 100644 --- a/MP-ADM/test.aspx.cs +++ b/MP-ADM/test.aspx.cs @@ -1,9 +1,12 @@ using System; -public partial class test : System.Web.UI.Page +namespace MP_ADM { - protected void Page_Load(object sender, EventArgs e) + public partial class test : BasePage { - lblOut.Text = string.Format("H: {0} - W: {1}", Session["WindowHeight"], Session["WindowWidth"]); + protected void Page_Load(object sender, EventArgs e) + { + lblOut.Text = string.Format("H: {0} - W: {1}", Session["WindowHeight"], Session["WindowWidth"]); + } } } diff --git a/MP-ADM/test.aspx.designer.cs b/MP-ADM/test.aspx.designer.cs index 7daffb1c..dffaf421 100644 --- a/MP-ADM/test.aspx.designer.cs +++ b/MP-ADM/test.aspx.designer.cs @@ -1,59 +1,62 @@ //------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.4927 +// +// Codice generato da uno strumento. // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// +// Le modifiche a questo file possono causare un comportamento non corretto e verranno perse se +// il codice viene rigenerato. +// //------------------------------------------------------------------------------ +namespace MP_ADM +{ -public partial class test { - - /// - /// Image1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Image Image1; - - /// - /// Image4 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Image Image4; - - /// - /// Image2 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Image Image2; - - /// - /// Image3 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Image Image3; - - /// - /// lblOut control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label lblOut; + public partial class test + { + + /// + /// Controllo Image1. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Image Image1; + + /// + /// Controllo Image4. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Image Image4; + + /// + /// Controllo Image2. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Image Image2; + + /// + /// Controllo Image3. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Image Image3; + + /// + /// Controllo lblOut. + /// + /// + /// Campo generato automaticamente. + /// Per la modifica, spostare la dichiarazione di campo dal file di progettazione al file code-behind. + /// + protected global::System.Web.UI.WebControls.Label lblOut; + } } diff --git a/MP-ADM/testUtente.aspx.cs b/MP-ADM/testUtente.aspx.cs index cb47df2b..80d0038a 100644 --- a/MP-ADM/testUtente.aspx.cs +++ b/MP-ADM/testUtente.aspx.cs @@ -3,7 +3,7 @@ using System.Web.UI; namespace MP_ADM { - public partial class testUtente : System.Web.UI.Page + public partial class testUtente : BasePage { protected void Page_Load(object sender, EventArgs e) { diff --git a/MP-Site/Web.config b/MP-Site/Web.config index 68bbab3a..da60d84a 100644 --- a/MP-Site/Web.config +++ b/MP-Site/Web.config @@ -1,4 +1,4 @@ - + - - - + + + - - - - - + + + + + - + - - - + + + - - - - - + + + + + - - + + - + - + - + - + - + - - + + - - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - + - - - - - + + + + + - - + + @@ -143,12 +351,12 @@ See http://code.google.com/p/elmah/wiki/SecuringErrorLogPages for more information on remote access and securing ELMAH. --> - + - +