Michele: modifiche template dei layout
This commit is contained in:
parent
0984904f69
commit
baebbfb634
@ -36,7 +36,7 @@ namespace VirtualTask.Controllers
|
||||
|
||||
#region INDEX
|
||||
|
||||
public IActionResult Index(string Impianto, int? page = 1)
|
||||
public IActionResult Index(string impianto, int? page = 1)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
token = helper.GetStringValue("tok");
|
||||
@ -64,13 +64,13 @@ namespace VirtualTask.Controllers
|
||||
|
||||
ViewBag.Rapportini = getImpianti();
|
||||
|
||||
if (!string.IsNullOrEmpty(Impianto))
|
||||
if (!string.IsNullOrEmpty(impianto))
|
||||
{
|
||||
modelList = modelList.Where(s => s.codice_impianto.Contains(Impianto)).ToList();
|
||||
modelList = modelList.Where(s => s.codice_impianto.Contains(impianto)).ToList();
|
||||
|
||||
ViewData["CurrentFilter"] = Impianto;
|
||||
ViewData["CurrentFilter"] = impianto;
|
||||
|
||||
ViewBag.Impianto = Impianto;
|
||||
ViewBag.Impianto = impianto;
|
||||
}
|
||||
else
|
||||
ViewData["CurrentFilter"] = null;
|
||||
@ -100,8 +100,7 @@ namespace VirtualTask.Controllers
|
||||
|
||||
#region metodi interni
|
||||
|
||||
[HttpPost]
|
||||
public IActionResult ExportDataToExcel(DateTime dataIni, DateTime dataFin, string Impianto)
|
||||
public IActionResult ExportDataToExcel(DateTime dataIni, DateTime dataFin, string? impianto)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
token = helper.GetStringValue("tok");
|
||||
@ -121,8 +120,6 @@ namespace VirtualTask.Controllers
|
||||
|
||||
List<Rapportini> modelList = new List<Rapportini>();
|
||||
|
||||
//modelList = lista;
|
||||
|
||||
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
@ -131,10 +128,12 @@ namespace VirtualTask.Controllers
|
||||
|
||||
modelList = JsonConvert.DeserializeObject<List<Rapportini>>(data);
|
||||
|
||||
//ViewData["CurrentFilter"] = Impianto;
|
||||
ViewData["CurrentFilter"] = impianto;
|
||||
|
||||
modelList = modelList.Where(x => x.codice_impianto.Equals(Impianto)).ToList();
|
||||
//ViewBag.Impianto = Impianto;
|
||||
if (!impianto.Equals("System.Collections.Generic.List`1[Microsoft.AspNetCore.Mvc.Rendering.SelectListItem]")/* || impianto != null*/)
|
||||
{
|
||||
modelList = modelList.Where(x => x.codice_impianto.Equals(impianto)).ToList();
|
||||
}
|
||||
|
||||
if (!dataFin.ToString().Substring(0, 10).Equals("01/01/0001"))
|
||||
{
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
<div>
|
||||
<div style="float:left;width:40%;padding:0 20px;">
|
||||
<th><b>Impianto:</b></th>
|
||||
@Html.DropDownList("Impianto", ViewBag.Rapportini, null, new { @class = "agy-form-field require" })
|
||||
@Html.DropDownList("impianto", ViewBag.Rapportini, null, new { @class = "agy-form-field require" })
|
||||
<div style="float:left;width:57%;"><input type="submit" value="Cerca" class="agy-btn submitForm" /></div>
|
||||
</div>
|
||||
<div style="float:left;width:2%;"> </div>
|
||||
@ -31,6 +31,7 @@
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
@using (Html.BeginForm("ExportDataToExcel", "Rapportini"))
|
||||
{
|
||||
<div style="float:left;width:40%;padding:0 20px;">
|
||||
@ -42,8 +43,10 @@
|
||||
<th><b>Data a:</b></th>
|
||||
@Html.TextBox("dataFin", null, new { type = "date", @class = "agy-form-field require" })
|
||||
</div>
|
||||
|
||||
@Html.Hidden("impianto", ViewBag.Rapportini, null)
|
||||
|
||||
@Html.Hidden("Impianto", ViewBag.Rapportini, null)
|
||||
@* @Html.Hiddenfor(x => x.codice) *@
|
||||
|
||||
<div style="float:left;width:40%;padding:0 20px;">
|
||||
<input type="submit" value="Esporta excel" name="Esporta excel" class="agy-btn submitForm" />
|
||||
|
||||
@ -253,10 +253,8 @@ Purchase:
|
||||
<ul>
|
||||
<li>Lunedì - Venerdì : 09:00 - 13:00 e 14:30 - 18:00</li>
|
||||
<li>Sabato/Domenica: Chiuso</li>
|
||||
@* <li>Sunday : Day Off (Holiday)</li> *@
|
||||
</ul>
|
||||
@* <h6>Call Now -</h6>
|
||||
<h5>+(61) 1800-125-124</h5> *@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -267,6 +267,7 @@ Purchase:
|
||||
</ul>
|
||||
@* <h6>Call Now -</h6>
|
||||
<h5>+(61) 1800-125-124</h5> *@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user