Merge branch 'master' of 10.0.0.83:/usr/local/git/SoftwayWeb
This commit is contained in:
commit
0334348e7c
@ -81,6 +81,7 @@ namespace SoftwayWeb.Controllers
|
|||||||
{
|
{
|
||||||
SessionHelper helper = new SessionHelper(this);
|
SessionHelper helper = new SessionHelper(this);
|
||||||
ViewBag.Autisti = getAutisti();
|
ViewBag.Autisti = getAutisti();
|
||||||
|
ViewBag.NuoviGiri = getNuoviGiri();
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,5 +154,25 @@ namespace SoftwayWeb.Controllers
|
|||||||
}
|
}
|
||||||
return selectItems;
|
return selectItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<GiriConsegnaDaCreare> getNuoviGiri()
|
||||||
|
{
|
||||||
|
SessionHelper helper = new SessionHelper(this);
|
||||||
|
List<GiriConsegnaDaCreare> modelList = new List<GiriConsegnaDaCreare> ();
|
||||||
|
apiUrl = helper.GetStringValue("apiUrl");
|
||||||
|
urlBase = apiUrl + "Giri/listaGiriDaCreare";
|
||||||
|
|
||||||
|
Uri baseAddress = new Uri(urlBase);
|
||||||
|
client = new HttpClient();
|
||||||
|
client.BaseAddress = baseAddress;
|
||||||
|
|
||||||
|
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
|
||||||
|
if (response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
string data = response.Content.ReadAsStringAsync().Result;
|
||||||
|
modelList = JsonConvert.DeserializeObject<List<GiriConsegnaDaCreare>>(data);
|
||||||
|
}
|
||||||
|
return modelList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
15
Models/GiriConsegnaDaCreare.cs
Normal file
15
Models/GiriConsegnaDaCreare.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace SoftwayWeb.Models
|
||||||
|
{
|
||||||
|
public class GiriConsegnaDaCreare
|
||||||
|
{
|
||||||
|
public string? CodAutomezzo { get; set; }
|
||||||
|
public string? CodAutista { get; set; }
|
||||||
|
public string? Autista { get; set; }
|
||||||
|
public string? Automezzo { get; set; }
|
||||||
|
|
||||||
|
[DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}")]
|
||||||
|
public DateTime? DataGiro { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -34,10 +34,7 @@ namespace SoftwayWeb.Models
|
|||||||
[Display(Name = "Data chiusura")]
|
[Display(Name = "Data chiusura")]
|
||||||
public DateTime? DataChiusura { get; set; }
|
public DateTime? DataChiusura { get; set; }
|
||||||
|
|
||||||
[Display(Name = "Cod. Mezzo")]
|
public string? CodMezzo { get; set; }
|
||||||
public string? CodMezzo { get; set; }
|
|
||||||
|
|
||||||
[Display(Name = "Automezzo")]
|
|
||||||
public string? Automezzo { get; set; }
|
public string? Automezzo { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
<div class="agy-project-wrapper agy-project-page-wrapper">
|
<div class="agy-project-wrapper agy-project-page-wrapper">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="row">
|
@* <div class="row">
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<form asp-action="Create">
|
<form asp-action="Create">
|
||||||
|
|
||||||
@ -46,9 +46,31 @@
|
|||||||
@Html.HiddenFor(x => x.DataChiusura)
|
@Html.HiddenFor(x => x.DataChiusura)
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</div>*@
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-8">
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Data</th>
|
||||||
|
<th>Autista</th>
|
||||||
|
<th>Automezzo</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach (var person in ViewBag.NuoviGiri)
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<td>@person.DataGiro.ToString("dd/MM/yyyy")</td>
|
||||||
|
<td>@person.CodAutista - @person.Autista</td>
|
||||||
|
<td>@person.CodAutomezzo - @person.Automezzo</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@section Scripts {
|
@section Scripts {
|
||||||
@{
|
@{
|
||||||
await Html.RenderPartialAsync("_ValidationScriptsPartial");
|
await Html.RenderPartialAsync("_ValidationScriptsPartial");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user