elimina destinazione
This commit is contained in:
parent
e513bf5f6b
commit
873a3c2530
@ -96,5 +96,37 @@ namespace SoftwayWeb.Controllers
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public IActionResult EliminaDestinazione(string seriale)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
|
||||
apiUrl = helper.GetStringValue("apiUrl");
|
||||
urlBase = apiUrl + "Giri/listaDestinazioniBySerial";
|
||||
urlBase = urlBase + "?seriale=" + seriale;
|
||||
|
||||
Uri baseAddress = new Uri(urlBase);
|
||||
client = new HttpClient();
|
||||
client.BaseAddress = baseAddress;
|
||||
|
||||
Destinazioni_Out model = new Destinazioni_Out();
|
||||
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
string dato = response.Content.ReadAsStringAsync().Result;
|
||||
model = JsonConvert.DeserializeObject<Destinazioni_Out>(dato);
|
||||
|
||||
//qui metodo post per scrivere su pimodgir
|
||||
}
|
||||
else
|
||||
{
|
||||
errMes = response.Content.ReadAsStringAsync().Result;
|
||||
helper.SetStringValue("errMsg", errMes);
|
||||
return RedirectToAction("Error");
|
||||
}
|
||||
|
||||
return RedirectToAction("Index", "Giri");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
<table class="table" style="width:100%">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>Seq</th>
|
||||
<th>Committente</th>
|
||||
<th>Sede</th>
|
||||
@ -31,12 +32,34 @@
|
||||
<th>Uova</th>
|
||||
<th>Cist</th>
|
||||
<th>Note</th>
|
||||
<th> </th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
@if (item.ConsFatta != null)
|
||||
{
|
||||
<td>
|
||||
@Html.HiddenFor(modelItem => item.ConsFatta.consFattaFlagCons)
|
||||
|
||||
@if (item.ConsFatta.consFattaFlagCons.Contains("S"))
|
||||
{
|
||||
<img alt="cons" src="@Url.Content("~/images/Green.png")" style="width:24px;height:24px">
|
||||
}
|
||||
else
|
||||
{
|
||||
<img alt="nocons" src="@Url.Content("~/images/Red.png")" style="width:24px;height:24px;">
|
||||
}
|
||||
</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td>
|
||||
<img alt="notyet" src="@Url.Content("~/images/Yellow.png")" style="width:24px;height:24px;">
|
||||
</td>
|
||||
}
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Seq)
|
||||
</td>
|
||||
@ -113,29 +136,11 @@
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Note)
|
||||
</td>
|
||||
|
||||
|
||||
@if (item.ConsFatta != null)
|
||||
{
|
||||
<td>
|
||||
@Html.HiddenFor(modelItem => item.ConsFatta.consFattaFlagCons)
|
||||
|
||||
@if (item.ConsFatta.consFattaFlagCons.Contains("S"))
|
||||
{
|
||||
<img alt="cons" src="@Url.Content("~/images/Green.png")" style="width:35px;height:35px">
|
||||
}
|
||||
else
|
||||
{
|
||||
<img alt="nocons" src="@Url.Content("~/images/Red.png")" style="width:35px;height:35px;">
|
||||
}
|
||||
<a href="@Url.ActionLink("EliminaDestinazione", "Destinazioni", new { id=item.Brserial })" title="Bancali" class="links"><img alt="nocons" src="@Url.Content("~/images/icons8-rimuovere-24.png")" style="width:24px;height:24px;"></a>
|
||||
</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td>
|
||||
<img alt="notyet" src="@Url.Content("~/images/Yellow.png")" style="width:35px;height:35px;">
|
||||
</td>
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user