diff --git a/Controllers/RapportiniController.cs b/Controllers/RapportiniController.cs index e189cda..e11c1b8 100644 --- a/Controllers/RapportiniController.cs +++ b/Controllers/RapportiniController.cs @@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.Office.Interop.Excel; using Newtonsoft.Json; using System.Diagnostics; - +using System.Text; using VirtualTask.Models; using X.PagedList; @@ -38,6 +38,14 @@ namespace VirtualTask.Controllers public IActionResult Index(string impianto, DateTime dataIni, DateTime dataFin, int? page = 1) { + string _log=string.Empty; + StringBuilder sb =new StringBuilder(); + sb.AppendLine("DATAIN: "+dataIni.ToString()); + sb.AppendLine(" DATAFIN: " + dataFin.ToString()); + sb.AppendLine(" IMP: " + impianto); + _log=sb.ToString(); + ViewBag.Log = _log; + SessionHelper helper = new SessionHelper(this); token = helper.GetStringValue("tok"); if (string.IsNullOrEmpty(token)) @@ -75,14 +83,29 @@ namespace VirtualTask.Controllers else ViewData["CurrentFilter"] = null; - if (!dataFin.ToString().Substring(0, 10).Equals("01/01/0001")) - { - modelList = modelList.Where(x => x.data_rapportino.GetValueOrDefault().Date >= dataIni.Date && x.data_rapportino.GetValueOrDefault().Date <= dataFin.Date).ToList(); - } - else + + + if (dataIni.Date != DateTime.MinValue) { modelList = modelList.Where(x => x.data_rapportino.GetValueOrDefault().Date >= dataIni.Date).ToList(); } + if (dataFin.Date != DateTime.MinValue) + { + modelList = modelList.Where(x => x.data_rapportino.GetValueOrDefault().Date <= dataFin.Date).ToList(); + } + + + //if (!dataFin.ToString().Substring(0, 10).Equals("01/01/0001")) + //{ + // modelList = modelList.Where(x => x.data_rapportino.GetValueOrDefault().Date >= dataIni.Date && x.data_rapportino.GetValueOrDefault().Date <= dataFin.Date).ToList(); + //} + //else + //{ + // modelList = modelList.Where(x => x.data_rapportino.GetValueOrDefault().Date >= dataIni.Date).ToList(); + //} + + + if (page != null && page < 1) { diff --git a/Views/Rapportini/Index.cshtml b/Views/Rapportini/Index.cshtml index 9f910d0..7b5a3c0 100644 --- a/Views/Rapportini/Index.cshtml +++ b/Views/Rapportini/Index.cshtml @@ -124,3 +124,9 @@ +
+ @{ + @ViewBag.Log + } + +
diff --git a/appsettings.json b/appsettings.json index 66dcbdd..c2363f9 100644 --- a/appsettings.json +++ b/appsettings.json @@ -6,15 +6,15 @@ } }, "ApplicationInsights": { - //PRODUZIONE "rootUrlApi": "https://api.poloinformatico.it:9000/api/Polo/", - "rootWebLoghi": "C:\\ZAPIPOLO\\api_polo\\wwwroot\\VIRTU\\", "rootUrlApi2": "https://api.poloinformatico.it:9000/VIRTU/", + //PRODUZIONE + "rootWebLoghi": "C:\\ZAPIPOLO\\api_polo\\wwwroot\\VIRTU\\", + //TEST - //"rootUrlApi": "http://testapi.poloinformatico.it:9001/api/Polo/", - //"rootWebLoghi": "C:\\SORGENTI\\ApiPolo\\ApiPolo\\wwwroot\\VIRTU\\", - //"rootUrlApi2": "http://testapi.poloinformatico.it:9001/VIRTU/", + //"rootWebLoghi": "C:\\Users\\audif\\source\\repos\\VirtualTask\\wwwroot\\VIRTU\\", + "mittenteMail": "info@virtualtask.it", "nomeMail": "Supporto Virtual Task", @@ -22,6 +22,10 @@ "subjectMail": "Richiesta App di test", "subjectMailRiepilogo": "Registrazione completata", "rootUrl": "https://virtualtask.it/" + + + //"rootUrlApi": "http://testapi.poloinformatico.it:9001/api/Polo/", + //"rootUrlApi2": "http://testapi.poloinformatico.it:9001/VIRTU/", //"rootUrl": "https://localhost:7140/" }, "AllowedHosts": "*" diff --git a/wwwroot/VIRTU/AZI02/export.png b/wwwroot/VIRTU/AZI02/export.png new file mode 100644 index 0000000..aa7e9f8 Binary files /dev/null and b/wwwroot/VIRTU/AZI02/export.png differ diff --git a/wwwroot/VIRTU/AZI02/favicon.png b/wwwroot/VIRTU/AZI02/favicon.png new file mode 100644 index 0000000..9774b89 Binary files /dev/null and b/wwwroot/VIRTU/AZI02/favicon.png differ diff --git a/wwwroot/VIRTU/AZI02/restyling_logo.jpg b/wwwroot/VIRTU/AZI02/restyling_logo.jpg new file mode 100644 index 0000000..0784856 Binary files /dev/null and b/wwwroot/VIRTU/AZI02/restyling_logo.jpg differ