From 70b9bf7b21f95a14aa5ead2f9c2914081827cc2b Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 6 Nov 2018 12:24:39 +0100 Subject: [PATCH] Update di TUTTI i metodi in avvio con MP_Startup.Init() --- Jenkinsfile | 2 +- MP-ADM/App_Start/MP_Startup.cs | 13 ++++++ MP-ADM/App_Start/RouteConfig.cs | 19 ++++----- MP-ADM/Global.asax.cs | 7 ++- MP-ADM/MP-ADM.csproj | 1 + MP-IO/Global.asax.cs | 6 +-- MP-LAND/App_Start/MP_Startup.cs | 13 ++++++ MP-LAND/App_Start/RouteConfig.cs | 20 ++++----- MP-LAND/Global.asax.cs | 20 +++++---- MP-LAND/MP-LAND.csproj | 1 + MP-MON/App_Start/MP_Startup.cs | 13 ++++++ MP-MON/App_Start/RouteConfig.cs | 20 ++++----- MP-MON/Global.asax.cs | 20 +++++---- MP-MON/MP-MON.csproj | 1 + MP-Site/App_Start/MP_Startup.cs | 13 ++++++ MP-Site/Global.asax.cs | 10 ++--- MP-Site/MP-Site.csproj | 1 + MP-TAB/App_Start/MP_Startup.cs | 13 ++++++ MP-TAB/Global.asax.cs | 73 +++++++++++++++----------------- MP-TAB/MP-TAB.csproj | 9 ++-- 20 files changed, 171 insertions(+), 104 deletions(-) create mode 100644 MP-ADM/App_Start/MP_Startup.cs create mode 100644 MP-LAND/App_Start/MP_Startup.cs create mode 100644 MP-MON/App_Start/MP_Startup.cs create mode 100644 MP-Site/App_Start/MP_Startup.cs create mode 100644 MP-TAB/App_Start/MP_Startup.cs diff --git a/Jenkinsfile b/Jenkinsfile index 10d88194..68cd66ef 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ pipeline { /* calcolo numero versione... diverso x branch MASTER/DEVELOP */ script { - withEnv(['NEXT_BUILD_NUMBER=983']) { + withEnv(['NEXT_BUILD_NUMBER=985']) { // env.versionNumber = VersionNumber(versionNumberString : '6.2.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true) env.versionNumber = VersionNumber(versionNumberString : '6.2.${BUILD_DATE_FORMATTED, "yyMM"}.${BUILDS_ALL_TIME}', projectStartDate : '2006-01-01', skipFailedBuilds: true, overrideBuildsAllTime: '${NEXT_BUILD_NUMBER}') env.APP_NAME = 'MAPO' diff --git a/MP-ADM/App_Start/MP_Startup.cs b/MP-ADM/App_Start/MP_Startup.cs new file mode 100644 index 00000000..8957c290 --- /dev/null +++ b/MP-ADM/App_Start/MP_Startup.cs @@ -0,0 +1,13 @@ +using SteamWare; + +namespace MP_ADM +{ + public class MP_Startup + { + public static void Init() + { + // inizializzo appConf prima di tutto il resto... + memLayer.ML.resetAppConf(); + } + } +} \ No newline at end of file diff --git a/MP-ADM/App_Start/RouteConfig.cs b/MP-ADM/App_Start/RouteConfig.cs index fa427e82..101eed23 100644 --- a/MP-ADM/App_Start/RouteConfig.cs +++ b/MP-ADM/App_Start/RouteConfig.cs @@ -1,18 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Web; -using System.Web.Routing; using Microsoft.AspNet.FriendlyUrls; +using System.Web.Routing; namespace MP_ADM { - public static class RouteConfig + public static class RouteConfig + { + public static void RegisterRoutes(RouteCollection routes) { - public static void RegisterRoutes(RouteCollection routes) - { - var settings = new FriendlyUrlSettings(); - settings.AutoRedirectMode = RedirectMode.Permanent; - routes.EnableFriendlyUrls(settings); - } + var settings = new FriendlyUrlSettings(); + settings.AutoRedirectMode = RedirectMode.Permanent; + routes.EnableFriendlyUrls(settings); } + } } diff --git a/MP-ADM/Global.asax.cs b/MP-ADM/Global.asax.cs index 16cb6922..46d55b85 100644 --- a/MP-ADM/Global.asax.cs +++ b/MP-ADM/Global.asax.cs @@ -1,11 +1,7 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.Web; using System.Web.Optimization; using System.Web.Routing; -using System.Web.Security; -using System.Web.SessionState; namespace MP_ADM { @@ -16,6 +12,9 @@ namespace MP_ADM // Codice eseguito all'avvio dell'applicazione RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); + + // avvio il metodo init x applicazione... + MP_Startup.Init(); } } } \ No newline at end of file diff --git a/MP-ADM/MP-ADM.csproj b/MP-ADM/MP-ADM.csproj index cbbe8b36..cc9e950d 100644 --- a/MP-ADM/MP-ADM.csproj +++ b/MP-ADM/MP-ADM.csproj @@ -493,6 +493,7 @@ approvazioneProd.aspx + Barcode.aspx diff --git a/MP-IO/Global.asax.cs b/MP-IO/Global.asax.cs index 483ec3f0..238500e8 100644 --- a/MP-IO/Global.asax.cs +++ b/MP-IO/Global.asax.cs @@ -9,13 +9,11 @@ namespace MP_IO { protected void Application_Start() { + // Codice eseguito all'avvio dell'applicazione AreaRegistration.RegisterAllAreas(); - //GlobalConfiguration.Configure(WebApiConfig.Register); - //FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); - //BundleConfig.RegisterBundles(BundleTable.Bundles); - // avvio il metodo init... + // avvio il metodo init x applicazione... MP_Startup.Init(); } } diff --git a/MP-LAND/App_Start/MP_Startup.cs b/MP-LAND/App_Start/MP_Startup.cs new file mode 100644 index 00000000..79348c66 --- /dev/null +++ b/MP-LAND/App_Start/MP_Startup.cs @@ -0,0 +1,13 @@ +using SteamWare; + +namespace MP +{ + public class MP_Startup + { + public static void Init() + { + // inizializzo appConf prima di tutto il resto... + memLayer.ML.resetAppConf(); + } + } +} \ No newline at end of file diff --git a/MP-LAND/App_Start/RouteConfig.cs b/MP-LAND/App_Start/RouteConfig.cs index 4cf9fb2b..b04cfdd9 100644 --- a/MP-LAND/App_Start/RouteConfig.cs +++ b/MP-LAND/App_Start/RouteConfig.cs @@ -3,17 +3,17 @@ using System.Web.Routing; namespace MP { - public class RouteConfig + public class RouteConfig + { + public static void RegisterRoutes(RouteCollection routes) { - public static void RegisterRoutes(RouteCollection routes) - { - routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); + routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); - routes.MapRoute( - name: "Default", - url: "{controller}/{action}/{id}", - defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } - ); - } + routes.MapRoute( + name: "Default", + url: "{controller}/{action}/{id}", + defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } + ); } + } } diff --git a/MP-LAND/Global.asax.cs b/MP-LAND/Global.asax.cs index 46b6f5c1..b3483b77 100644 --- a/MP-LAND/Global.asax.cs +++ b/MP-LAND/Global.asax.cs @@ -4,14 +4,18 @@ using System.Web.Routing; namespace MP { - public class MvcApplication : System.Web.HttpApplication + public class MvcApplication : System.Web.HttpApplication + { + protected void Application_Start() { - protected void Application_Start() - { - AreaRegistration.RegisterAllAreas(); - FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); - RouteConfig.RegisterRoutes(RouteTable.Routes); - BundleConfig.RegisterBundles(BundleTable.Bundles); - } + // Codice eseguito all'avvio dell'applicazione + AreaRegistration.RegisterAllAreas(); + FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); + RouteConfig.RegisterRoutes(RouteTable.Routes); + BundleConfig.RegisterBundles(BundleTable.Bundles); + + // avvio il metodo init x applicazione... + MP_Startup.Init(); } + } } diff --git a/MP-LAND/MP-LAND.csproj b/MP-LAND/MP-LAND.csproj index 3dad0258..9d1084a6 100644 --- a/MP-LAND/MP-LAND.csproj +++ b/MP-LAND/MP-LAND.csproj @@ -125,6 +125,7 @@ + diff --git a/MP-MON/App_Start/MP_Startup.cs b/MP-MON/App_Start/MP_Startup.cs new file mode 100644 index 00000000..bcc5f292 --- /dev/null +++ b/MP-MON/App_Start/MP_Startup.cs @@ -0,0 +1,13 @@ +using SteamWare; + +namespace MP_MON +{ + public class MP_Startup + { + public static void Init() + { + // inizializzo appConf prima di tutto il resto... + memLayer.ML.resetAppConf(); + } + } +} \ No newline at end of file diff --git a/MP-MON/App_Start/RouteConfig.cs b/MP-MON/App_Start/RouteConfig.cs index 58d97e6f..2250301e 100644 --- a/MP-MON/App_Start/RouteConfig.cs +++ b/MP-MON/App_Start/RouteConfig.cs @@ -3,17 +3,17 @@ using System.Web.Routing; namespace MP_MON { - public class RouteConfig + public class RouteConfig + { + public static void RegisterRoutes(RouteCollection routes) { - public static void RegisterRoutes(RouteCollection routes) - { - routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); + routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); - routes.MapRoute( - name: "Default", - url: "{controller}/{action}/{id}", - defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } - ); - } + routes.MapRoute( + name: "Default", + url: "{controller}/{action}/{id}", + defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } + ); } + } } diff --git a/MP-MON/Global.asax.cs b/MP-MON/Global.asax.cs index ada66461..119a3895 100644 --- a/MP-MON/Global.asax.cs +++ b/MP-MON/Global.asax.cs @@ -4,14 +4,18 @@ using System.Web.Routing; namespace MP_MON { - public class MvcApplication : System.Web.HttpApplication + public class MvcApplication : System.Web.HttpApplication + { + protected void Application_Start() { - protected void Application_Start() - { - AreaRegistration.RegisterAllAreas(); - FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); - RouteConfig.RegisterRoutes(RouteTable.Routes); - BundleConfig.RegisterBundles(BundleTable.Bundles); - } + // Codice eseguito all'avvio dell'applicazione + AreaRegistration.RegisterAllAreas(); + FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); + RouteConfig.RegisterRoutes(RouteTable.Routes); + BundleConfig.RegisterBundles(BundleTable.Bundles); + + // avvio il metodo init x applicazione... + MP_Startup.Init(); } + } } diff --git a/MP-MON/MP-MON.csproj b/MP-MON/MP-MON.csproj index 6e2c5b61..da187401 100644 --- a/MP-MON/MP-MON.csproj +++ b/MP-MON/MP-MON.csproj @@ -139,6 +139,7 @@ + diff --git a/MP-Site/App_Start/MP_Startup.cs b/MP-Site/App_Start/MP_Startup.cs new file mode 100644 index 00000000..29984f1e --- /dev/null +++ b/MP-Site/App_Start/MP_Startup.cs @@ -0,0 +1,13 @@ +using SteamWare; + +namespace MoonPro +{ + public class MP_Startup + { + public static void Init() + { + // inizializzo appConf prima di tutto il resto... + memLayer.ML.resetAppConf(); + } + } +} \ No newline at end of file diff --git a/MP-Site/Global.asax.cs b/MP-Site/Global.asax.cs index 2bd74120..9152fbbb 100644 --- a/MP-Site/Global.asax.cs +++ b/MP-Site/Global.asax.cs @@ -9,38 +9,36 @@ namespace MoonPro protected void Application_Start(object sender, EventArgs e) { + // Codice eseguito all'avvio dell'applicazione BundleConfig.RegisterBundles(BundleTable.Bundles); RouteConfig.RegisterRoutes(RouteTable.Routes); + + // avvio il metodo init x applicazione... + MP_Startup.Init(); } protected void Session_Start(object sender, EventArgs e) { - } protected void Application_BeginRequest(object sender, EventArgs e) { - } protected void Application_AuthenticateRequest(object sender, EventArgs e) { - } protected void Application_Error(object sender, EventArgs e) { - } protected void Session_End(object sender, EventArgs e) { - } protected void Application_End(object sender, EventArgs e) { - } } } \ No newline at end of file diff --git a/MP-Site/MP-Site.csproj b/MP-Site/MP-Site.csproj index b9a23a2a..bed9b0ec 100644 --- a/MP-Site/MP-Site.csproj +++ b/MP-Site/MP-Site.csproj @@ -228,6 +228,7 @@ AnalisiProduzione.aspx + Default.aspx diff --git a/MP-TAB/App_Start/MP_Startup.cs b/MP-TAB/App_Start/MP_Startup.cs new file mode 100644 index 00000000..ba8a9fc6 --- /dev/null +++ b/MP-TAB/App_Start/MP_Startup.cs @@ -0,0 +1,13 @@ +using SteamWare; + +namespace MoonProTablet +{ + public class MP_Startup + { + public static void Init() + { + // inizializzo appConf prima di tutto il resto... + memLayer.ML.resetAppConf(); + } + } +} \ No newline at end of file diff --git a/MP-TAB/Global.asax.cs b/MP-TAB/Global.asax.cs index b630912a..53201ba5 100644 --- a/MP-TAB/Global.asax.cs +++ b/MP-TAB/Global.asax.cs @@ -4,46 +4,41 @@ using System.Web.Routing; namespace MoonProTablet { - public class Global : System.Web.HttpApplication + public class Global : System.Web.HttpApplication + { + + protected void Application_Start(object sender, EventArgs e) { + // Codice eseguito all'avvio dell'applicazione + BundleConfig.RegisterBundles(BundleTable.Bundles); + RouteConfig.RegisterRoutes(RouteTable.Routes); - protected void Application_Start(object sender, EventArgs e) - { - // Code that runs on application startup - BundleConfig.RegisterBundles(BundleTable.Bundles); - - // aggiungo friendlyUrls... - RouteConfig.RegisterRoutes(RouteTable.Routes); - } - - protected void Session_Start(object sender, EventArgs e) - { - - } - - protected void Application_BeginRequest(object sender, EventArgs e) - { - - } - - protected void Application_AuthenticateRequest(object sender, EventArgs e) - { - - } - - protected void Application_Error(object sender, EventArgs e) - { - - } - - protected void Session_End(object sender, EventArgs e) - { - - } - - protected void Application_End(object sender, EventArgs e) - { - - } + // avvio il metodo init x applicazione... + MP_Startup.Init(); } + + protected void Session_Start(object sender, EventArgs e) + { + } + + protected void Application_BeginRequest(object sender, EventArgs e) + { + } + + protected void Application_AuthenticateRequest(object sender, EventArgs e) + { + } + + protected void Application_Error(object sender, EventArgs e) + { + } + + protected void Session_End(object sender, EventArgs e) + { + } + + protected void Application_End(object sender, EventArgs e) + { + } + } } \ No newline at end of file diff --git a/MP-TAB/MP-TAB.csproj b/MP-TAB/MP-TAB.csproj index 18c2c5e9..95c03d29 100644 --- a/MP-TAB/MP-TAB.csproj +++ b/MP-TAB/MP-TAB.csproj @@ -21,9 +21,11 @@ 4.0 - 44328 - enabled - disabled + 44384 + + + + @@ -569,6 +571,7 @@ About.aspx + Commenti.aspx