diff --git a/MP-MON/Views/MSE/_StatusMap.cshtml b/MP-MON/Views/MSE/_StatusMap.cshtml
index 5573138f..ca607226 100644
--- a/MP-MON/Views/MSE/_StatusMap.cshtml
+++ b/MP-MON/Views/MSE/_StatusMap.cshtml
@@ -58,7 +58,6 @@
@Html.DisplayFor(modelItem => item.Nome)
- @*
@Html.DisplayFor(modelItem => item.DescrizioneStato)
*@
diff --git a/MP/Controllers/HomeController.cs b/MP/Controllers/HomeController.cs
index 19b0029e..1626a8e3 100644
--- a/MP/Controllers/HomeController.cs
+++ b/MP/Controllers/HomeController.cs
@@ -5,6 +5,9 @@ using System.Diagnostics;
using System.Linq;
using System.Web.Configuration;
using System.Web.Mvc;
+using ZXing.Common;
+using ZXing;
+using ZXing.QrCode;
namespace MP.Controllers
{
@@ -29,7 +32,7 @@ namespace MP.Controllers
ViewBag.UrlMpMON = ctx.stp_AKV_getByKey("UrlMpMON").ToList
()[0].valString;
ViewBag.UrlMpTAB = ctx.stp_AKV_getByKey("UrlMpTAB").ToList()[0].valString;
}
- catch(Exception exc)
+ catch (Exception exc)
{
logger.lg.scriviLog(string.Format("Eccezione in composizione HOME page LAND:{0}{1}", Environment.NewLine, exc), tipoLog.EXCEPTION);
ViewBag.UrlMpSite = WebConfigurationManager.AppSettings["UrlMpSite"];//"../MP/SITE";
@@ -156,8 +159,8 @@ namespace MP.Controllers
done += UpdateMan.obj.downloadLatest(updateUrl("ADM"), localDownloadPath("ADM"), "ADM");
done += UpdateMan.obj.downloadLatest(updateUrl("IO"), localDownloadPath("IO"), "IO");
done += UpdateMan.obj.downloadLatest(updateUrl("LAND"), localDownloadPath("LAND"), "LAND");
- done += UpdateMan.obj.downloadLatest(updateUrl("MON"), localDownloadPath("MON"),"MON");
- done += UpdateMan.obj.downloadLatest(updateUrl("SITE"), localDownloadPath("SITE"),"SITE");
+ done += UpdateMan.obj.downloadLatest(updateUrl("MON"), localDownloadPath("MON"), "MON");
+ done += UpdateMan.obj.downloadLatest(updateUrl("SITE"), localDownloadPath("SITE"), "SITE");
done += UpdateMan.obj.downloadLatest(updateUrl("TAB"), localDownloadPath("TAB"), "TAB");
stopWatch.Stop();
// calcolo elapsed time come TimeSpan value.
@@ -176,6 +179,36 @@ namespace MP.Controllers
}
+ public ActionResult UserListQR()
+ {
+ QrCodeEncodingOptions options = new QrCodeEncodingOptions
+ {
+ DisableECI = true,
+ CharacterSet = "UTF-8",
+ Width = 250,
+ Height = 250,
+ };
+ var writer = new BarcodeWriter();
+ writer.Format = BarcodeFormat.QR_CODE;
+ writer.Options = options;
+
+ ViewBag.Title = "MAPO QR";
+ ViewBag.Message = "Elenco Utenti";
+ ViewBag.Environment = WebConfigurationManager.AppSettings["Environment"];
+ using (var ctx = new MoonProEntities())
+ {
+ try
+ {
+ // esegue stored procedure come function, recuperando chiave desiderata...
+ var elOperatori = ctx.AnagraficaOperatori.ToList();
+ ViewBag.elOperatori = elOperatori;
+ }
+ catch
+ { }
+ }
+ return View(ViewBag.elOperatori);
+ }
+
///
/// Path locale dove scaricare gli installer
///
diff --git a/MP/MP.csproj b/MP/MP.csproj
index a2c7aaab..5dbf1a11 100644
--- a/MP/MP.csproj
+++ b/MP/MP.csproj
@@ -116,6 +116,12 @@
..\packages\WebGrease.1.6.0\lib\WebGrease.dll
True
+
+ ..\packages\ZXing.Net.0.16.4\lib\net461\zxing.dll
+
+
+ ..\packages\ZXing.Net.0.16.4\lib\net461\zxing.presentation.dll
+
@@ -131,6 +137,9 @@
MPModel.tt
+
+ MPModel.tt
+
True
True
@@ -264,6 +273,7 @@
+
Web.config
diff --git a/MP/Models/AnagKeyValue.cs b/MP/Models/AnagKeyValue.cs
index 61954257..3cc2010e 100644
--- a/MP/Models/AnagKeyValue.cs
+++ b/MP/Models/AnagKeyValue.cs
@@ -1,16 +1,17 @@
//------------------------------------------------------------------------------
//
-// This code was generated from a template.
+// Codice generato da un modello.
//
-// 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.
+// Le modifiche manuali a questo file potrebbero causare un comportamento imprevisto dell'applicazione.
+// Se il codice viene rigenerato, le modifiche manuali al file verranno sovrascritte.
//
//------------------------------------------------------------------------------
namespace MP.Models
{
using System;
-
+ using System.Collections.Generic;
+
public partial class AnagKeyValue
{
public string nomeVar { get; set; }
diff --git a/MP/Models/AnagraficaOperatori.cs b/MP/Models/AnagraficaOperatori.cs
new file mode 100644
index 00000000..dc5bf00d
--- /dev/null
+++ b/MP/Models/AnagraficaOperatori.cs
@@ -0,0 +1,23 @@
+//------------------------------------------------------------------------------
+//
+// Codice generato da un modello.
+//
+// Le modifiche manuali a questo file potrebbero causare un comportamento imprevisto dell'applicazione.
+// Se il codice viene rigenerato, le modifiche manuali al file verranno sovrascritte.
+//
+//------------------------------------------------------------------------------
+
+namespace MP.Models
+{
+ using System;
+ using System.Collections.Generic;
+
+ public partial class AnagraficaOperatori
+ {
+ public int MatrOpr { get; set; }
+ public string Cognome { get; set; }
+ public string Nome { get; set; }
+ public Nullable isAdmin { get; set; }
+ public string authKey { get; set; }
+ }
+}
diff --git a/MP/Models/MPModel.Context.cs b/MP/Models/MPModel.Context.cs
index 8515b287..1dec6e64 100644
--- a/MP/Models/MPModel.Context.cs
+++ b/MP/Models/MPModel.Context.cs
@@ -1,18 +1,20 @@
//------------------------------------------------------------------------------
//
-// This code was generated from a template.
+// Codice generato da un modello.
//
-// 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.
+// Le modifiche manuali a questo file potrebbero causare un comportamento imprevisto dell'applicazione.
+// Se il codice viene rigenerato, le modifiche manuali al file verranno sovrascritte.
//
//------------------------------------------------------------------------------
namespace MP.Models
{
+ using System;
using System.Data.Entity;
- using System.Data.Entity.Core.Objects;
using System.Data.Entity.Infrastructure;
-
+ using System.Data.Entity.Core.Objects;
+ using System.Linq;
+
public partial class MoonProEntities : DbContext
{
public MoonProEntities()
@@ -26,6 +28,7 @@ namespace MP.Models
}
public virtual DbSet AnagKeyValue { get; set; }
+ public virtual DbSet AnagraficaOperatori { get; set; }
public virtual ObjectResult stp_AKV_getByKey(string nomeVar)
{
diff --git a/MP/Models/MPModel.Designer.cs b/MP/Models/MPModel.Designer.cs
index 68b017c9..4d3d7778 100644
--- a/MP/Models/MPModel.Designer.cs
+++ b/MP/Models/MPModel.Designer.cs
@@ -1,10 +1,10 @@
-// T4 code generation is enabled for model 'C:\Users\samuele.STEAMWAREWIN\Documents\VisualStudioProjects\MAPO\MoonPro_dotnet\MP\Models\MPModel.edmx'.
-// To enable legacy code generation, change the value of the 'Code Generation Strategy' designer
-// property to 'Legacy ObjectContext'. This property is available in the Properties Window when the model
-// is open in the designer.
+// Generazione del codice predefinita abilitata per il modello 'C:\Users\samuele\Documents\VisualStudioProjects\MoonPro_dotnet\MP\Models\MPModel.edmx'.
+// Per abilitare la generazione del codice legacy, modificare il valore della proprietà della finestra di progettazione 'Strategia di generazione del codice
+// su 'Legacy ObjectContext'. Questa proprietà è disponibile nella finestra Proprietà quando il modello è
+// aperto nella finestra di progettazione.
-// If no context and entity classes have been generated, it may be because you created an empty model but
-// have not yet chosen which version of Entity Framework to use. To generate a context class and entity
-// classes for your model, open the model in the designer, right-click on the designer surface, and
-// select 'Update Model from Database...', 'Generate Database from Model...', or 'Add Code Generation
-// Item...'.
\ No newline at end of file
+// La mancata generazione di classi contesto ed entità può essere dovuta al fatto che è stato creato un modello vuoto, ma
+// non è ancora stata scelta la versione di Entity Framework da utilizzare. Per generare una classe contesto e classi entità
+// per il modello, aprire il modello nella finestra di progettazione, fare clic con il pulsante destro del mouse nell'area di progettazione e
+// selezionare 'Aggiorna modello da database...', 'Genera database da modello...' o 'Aggiungi elemento di generazione
+// codice...'.
\ No newline at end of file
diff --git a/MP/Models/MPModel.cs b/MP/Models/MPModel.cs
index 7cc06622..d6f4df21 100644
--- a/MP/Models/MPModel.cs
+++ b/MP/Models/MPModel.cs
@@ -1,9 +1,9 @@
//------------------------------------------------------------------------------
//
-// This code was generated from a template.
+// Codice generato da un modello.
//
-// 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.
+// Le modifiche manuali a questo file potrebbero causare un comportamento imprevisto dell'applicazione.
+// Se il codice viene rigenerato, le modifiche manuali al file verranno sovrascritte.
//
//------------------------------------------------------------------------------
diff --git a/MP/Models/MPModel.edmx b/MP/Models/MPModel.edmx
index cf23428a..da2c3725 100644
--- a/MP/Models/MPModel.edmx
+++ b/MP/Models/MPModel.edmx
@@ -15,11 +15,22 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -38,8 +49,9 @@
-
+
+
@@ -48,6 +60,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -67,6 +89,17 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MP/Models/MPModel.edmx.diagram b/MP/Models/MPModel.edmx.diagram
index b89a18fc..8c2b1239 100644
--- a/MP/Models/MPModel.edmx.diagram
+++ b/MP/Models/MPModel.edmx.diagram
@@ -6,6 +6,7 @@
+
diff --git a/MP/Models/stp_AKV_getByKey_Result.cs b/MP/Models/stp_AKV_getByKey_Result.cs
index 6d412933..48d57d4d 100644
--- a/MP/Models/stp_AKV_getByKey_Result.cs
+++ b/MP/Models/stp_AKV_getByKey_Result.cs
@@ -1,15 +1,16 @@
//------------------------------------------------------------------------------
//
-// This code was generated from a template.
+// Codice generato da un modello.
//
-// 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.
+// Le modifiche manuali a questo file potrebbero causare un comportamento imprevisto dell'applicazione.
+// Se il codice viene rigenerato, le modifiche manuali al file verranno sovrascritte.
//
//------------------------------------------------------------------------------
namespace MP.Models
{
-
+ using System;
+
public partial class stp_AKV_getByKey_Result
{
public string nomeVar { get; set; }
diff --git a/MP/Views/Home/UserListQR.cshtml b/MP/Views/Home/UserListQR.cshtml
new file mode 100644
index 00000000..b9438a39
--- /dev/null
+++ b/MP/Views/Home/UserListQR.cshtml
@@ -0,0 +1,21 @@
+@model IEnumerable
+
+@{
+ ViewBag.Title = "QR Codes";
+}
+@ViewBag.Title.
+@ViewBag.Message
+
+Elenco utenti e codici accesso barcode per TAB
+
+ @foreach (var item in Model)
+ {
+
+ @item.MatrOpr
+
+
+
+ @item.authKey
+
+ }
+
\ No newline at end of file
diff --git a/MP/packages.config b/MP/packages.config
index d2e42502..ec3de280 100644
--- a/MP/packages.config
+++ b/MP/packages.config
@@ -16,4 +16,5 @@
+
\ No newline at end of file