From 81ea19eb0afdd09b3ec8f02154d601ed94e7ca7a Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 7 Sep 2020 19:01:35 +0200 Subject: [PATCH] Ancora conversione a BasePage x WebForms --- MP-ADM/ApplicationInsights.config | 3 -- MP-ADM/BCode.aspx.cs | 48 ++++++++++++------------ MP-ADM/Barcode.aspx.cs | 2 +- MP-ADM/CTrackBCode.aspx.cs | 44 +++++++++++----------- MP-ADM/MP-ADM.csproj | 3 -- MP-ADM/anagArticoli.aspx.cs | 2 +- MP-ADM/aperturaImpianti.aspx | 2 +- MP-ADM/aperturaImpianti.aspx.cs | 7 +++- MP-ADM/aperturaImpianti.aspx.designer.cs | 24 +++++++----- MP-ADM/approvazioneProd.aspx.cs | 33 ++++++++-------- MP-ADM/calendChiusura.aspx.cs | 9 +++-- 11 files changed, 90 insertions(+), 87 deletions(-) delete mode 100644 MP-ADM/ApplicationInsights.config 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/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/MP-ADM.csproj b/MP-ADM/MP-ADM.csproj index dcbcb9ce..8cbda36f 100644 --- a/MP-ADM/MP-ADM.csproj +++ b/MP-ADM/MP-ADM.csproj @@ -282,9 +282,6 @@ - - PreserveNewest - 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/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.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