diff --git a/.vs/MP/v14/.suo b/.vs/MP/v14/.suo index 87cd2813..f7735d9d 100644 Binary files a/.vs/MP/v14/.suo and b/.vs/MP/v14/.suo differ diff --git a/MP/Controllers/HomeController.cs b/MP/Controllers/HomeController.cs index 9be38583..66abf165 100644 --- a/MP/Controllers/HomeController.cs +++ b/MP/Controllers/HomeController.cs @@ -1,4 +1,5 @@ -using System; +using MP.Models; +using System; using System.Collections.Generic; using System.Linq; using System.Web; @@ -12,20 +13,35 @@ namespace MP.Controllers public ActionResult Index() { ViewBag.Title = "MoonPro"; + // x sicurezza leggo da web.config ViewBag.Environment = WebConfigurationManager.AppSettings["Environment"]; + using (var ctx = new MoonProEntities()) + { + // esegue stored procedure come function, recuperando chiave desiderata... + var keyVal = ctx.stp_AKV_getByKey("Environment").ToList(); + ViewBag.Environment = keyVal[0].valString; + // imposto URL dei vari siti + ViewBag.UrlMpSite = ctx.stp_AKV_getByKey("UrlMpSite").ToList()[0].valString; + ViewBag.UrlMpAdmin = ctx.stp_AKV_getByKey("UrlMpAdmin").ToList()[0].valString; + ViewBag.UrlMpIO = ctx.stp_AKV_getByKey("UrlMpIO").ToList()[0].valString; + ViewBag.UrlMpMON = ctx.stp_AKV_getByKey("UrlMpMON").ToList()[0].valString; + ViewBag.UrlMpTAB = ctx.stp_AKV_getByKey("UrlMpTAB").ToList()[0].valString; + } return View(); } public ActionResult About() { - ViewBag.Message = "Your application description page."; + ViewBag.Title = "MoonPro"; + ViewBag.Message = "MoonPro è il motore software di MAPO, la nostra soluzione hardware"; return View(); } public ActionResult Contact() { - ViewBag.Message = "Your contact page."; + ViewBag.Title = "MoonPro"; + ViewBag.Message = "Per contattarci"; return View(); } diff --git a/MP/MP.csproj b/MP/MP.csproj index 403e843e..4271095f 100644 --- a/MP/MP.csproj +++ b/MP/MP.csproj @@ -136,8 +136,27 @@ Global.asax - - + + MPModel.tt + + + True + True + MPModel.Context.tt + + + True + True + MPModel.tt + + + True + True + MPModel.edmx + + + MPModel.tt + @@ -167,11 +186,28 @@ + + EntityModelCodeGenerator + MPModel.Designer.cs + + + MPModel.edmx + + + TextTemplatingFileGenerator + MPModel.edmx + MPModel.Context.cs + + + TextTemplatingFileGenerator + MPModel.edmx + MPModel.cs + @@ -218,6 +254,9 @@ MapoDb + + + 10.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) diff --git a/MP/Models/MPModel.Context.cs b/MP/Models/MPModel.Context.cs index 41e0e7f5..fe076128 100644 --- a/MP/Models/MPModel.Context.cs +++ b/MP/Models/MPModel.Context.cs @@ -12,6 +12,8 @@ namespace MP.Models using System; using System.Data.Entity; using System.Data.Entity.Infrastructure; + using System.Data.Entity.Core.Objects; + using System.Linq; public partial class MoonProEntities : DbContext { @@ -26,5 +28,23 @@ namespace MP.Models } public virtual DbSet AnagKeyValue { get; set; } + + public virtual ObjectResult stp_AKV_getByKey(string nomeVar) + { + var nomeVarParameter = nomeVar != null ? + new ObjectParameter("nomeVar", nomeVar) : + new ObjectParameter("nomeVar", typeof(string)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("stp_AKV_getByKey", nomeVarParameter); + } + + public virtual ObjectResult stp_AKV_getByKey(string nomeVar, MergeOption mergeOption) + { + var nomeVarParameter = nomeVar != null ? + new ObjectParameter("nomeVar", nomeVar) : + new ObjectParameter("nomeVar", typeof(string)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("stp_AKV_getByKey", mergeOption, nomeVarParameter); + } } } diff --git a/MP/Models/MPModel.edmx b/MP/Models/MPModel.edmx index 727db01c..cf23428a 100644 --- a/MP/Models/MPModel.edmx +++ b/MP/Models/MPModel.edmx @@ -4,7 +4,7 @@ - + @@ -15,11 +15,13 @@ + + + - - + @@ -35,7 +37,17 @@ + + + + + + + + + + @@ -53,6 +65,8 @@ + + diff --git a/MP/Models/stp_AKV_getByKey_Result.cs b/MP/Models/stp_AKV_getByKey_Result.cs new file mode 100644 index 00000000..d4f458b0 --- /dev/null +++ b/MP/Models/stp_AKV_getByKey_Result.cs @@ -0,0 +1,22 @@ +//------------------------------------------------------------------------------ +// +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace MP.Models +{ + using System; + + public partial class stp_AKV_getByKey_Result + { + public string nomeVar { get; set; } + public int valInt { get; set; } + public double valFloat { get; set; } + public string valString { get; set; } + public string descrizione { get; set; } + } +} diff --git a/MP/Views/Home/About.cshtml b/MP/Views/Home/About.cshtml index 4b2d9e84..b840c0a1 100644 --- a/MP/Views/Home/About.cshtml +++ b/MP/Views/Home/About.cshtml @@ -4,4 +4,5 @@

@ViewBag.Title.

@ViewBag.Message

-

Use this area to provide additional information.

+

MoonPro / MAPO sono una suite di applicazioni e dispositivi hw dedicati per l'IOT,l'industry 4.0 e la gestione automatizzata dei processi produttivi.

+

Per maggiori informazioni visita il link sul nostro sito.

diff --git a/MP/Views/Home/Contact.cshtml b/MP/Views/Home/Contact.cshtml index 0f4327e7..ee367440 100644 --- a/MP/Views/Home/Contact.cshtml +++ b/MP/Views/Home/Contact.cshtml @@ -4,14 +4,35 @@

@ViewBag.Title.

@ViewBag.Message

-
- One Microsoft Way
- Redmond, WA 98052-6399
- P: - 425.555.0100 -
- -
- Support: Support@example.com
- Marketing: Marketing@example.com -
\ No newline at end of file +
+
+

Sede Operativa

+
+ Steamware s.r.l.
+ via Dante Alighieri, 16
+ 24068 Seriate - BG
+ P: + 035.290178
+ P: + 035.460560 +
+
+
+

Sede Legale

+
+ Steamware s.r.l.
+ via Briolo Fuori, 27
+ 24015 San Giovanni Bianco - BG
+ VAT:03274190168 +
+
+
+

Supporto

+
+ Web:
+ Accedi al supporto dal nostro sito web
+ Email:
+ Scrivi un email a info at steamware.net +
+
+
diff --git a/MP/Views/Home/Index.cshtml b/MP/Views/Home/Index.cshtml index edcad828..7c1a7096 100644 --- a/MP/Views/Home/Index.cshtml +++ b/MP/Views/Home/Index.cshtml @@ -3,7 +3,7 @@ }
-

MoonPro suite - @ViewBag.Environment

+

MoonPro - @ViewBag.Environment

Pannello di gestione della suite IOT MoonPro per l'acquisizione dei dati dai sistemi MAPO

Utilizzare i link seguenti per accedere agli applicativi

@*

Learn more »

*@ @@ -11,7 +11,7 @@
- +

MP-SITE »


@@ -26,7 +26,7 @@

- +

MP-TAB »


@@ -41,7 +41,7 @@

- +

MP-ADMIN »


@@ -55,7 +55,7 @@

- +

MP-MON »


@@ -67,7 +67,7 @@



- +

MP-IO »