modifica destinazione
This commit is contained in:
parent
1e82d821b0
commit
c7ee9fbc91
@ -164,7 +164,42 @@ namespace SoftwayWeb.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public IActionResult ModificaDestinazione(string serial)
|
||||||
|
{
|
||||||
|
SessionHelper helper = new SessionHelper(this);
|
||||||
|
|
||||||
|
apiUrl = helper.GetStringValue("apiUrl");
|
||||||
|
urlBase = apiUrl + "Giri/listaDestinazioneBySerial";
|
||||||
|
urlBase = urlBase + "?seriale=" + serial;
|
||||||
|
|
||||||
|
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);
|
||||||
|
return View(model);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
errMes = response.Content.ReadAsStringAsync().Result;
|
||||||
|
helper.SetStringValue("errMsg", errMes);
|
||||||
|
return RedirectToAction("Error");
|
||||||
|
}
|
||||||
|
|
||||||
|
//return RedirectToAction("Index", "Destinazioni", new
|
||||||
|
//{
|
||||||
|
// id = model.serialeGiro,
|
||||||
|
// codAutista = model.CodAutista,
|
||||||
|
// dataGiro = model.DataCarico,
|
||||||
|
// codMezzo = model.CodAutomezzo
|
||||||
|
//});
|
||||||
|
}
|
||||||
|
|
||||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||||
public IActionResult Error()
|
public IActionResult Error()
|
||||||
|
|||||||
102
Views/Destinazioni/ModificaDestinazione.cshtml
Normal file
102
Views/Destinazioni/ModificaDestinazione.cshtml
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
@model SoftwayWeb.Models.Destinazioni_Out
|
||||||
|
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "ModificaDestinazione";
|
||||||
|
}
|
||||||
|
|
||||||
|
<h1>ModificaDestinazione</h1>
|
||||||
|
|
||||||
|
<h4>Destinazioni_Out</h4>
|
||||||
|
<hr />
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<form asp-action="ModificaDestinazione">
|
||||||
|
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||||
|
@Html.HiddenFor(model => model.CodAutomezzo)
|
||||||
|
@Html.HiddenFor(model => model.DescAutomezzo)
|
||||||
|
@Html.HiddenFor(model => model.Brserial)
|
||||||
|
@Html.HiddenFor(model => model.DataCarico)
|
||||||
|
@Html.HiddenFor(model => model.CodCommittente)
|
||||||
|
@Html.HiddenFor(model => model.Committente)
|
||||||
|
@Html.HiddenFor(model => model.Autista)
|
||||||
|
@Html.HiddenFor(model => model.CodAutista)
|
||||||
|
@Html.HiddenFor(model => model.CodSede)
|
||||||
|
@Html.HiddenFor(model => model.Sede)
|
||||||
|
@Html.HiddenFor(model => model.IndirizzoSede)
|
||||||
|
@Html.HiddenFor(model => model.Cproword)
|
||||||
|
@Html.HiddenFor(model => model.Cprownum)
|
||||||
|
@Html.HiddenFor(model => model.Brmerce)
|
||||||
|
@Html.HiddenFor(model => model.Brnote)
|
||||||
|
@Html.HiddenFor(model => model.ImportoDaRitirare)
|
||||||
|
@Html.HiddenFor(model => model.ItemList)
|
||||||
|
@Html.HiddenFor(model => model.serialeGiro)
|
||||||
|
@Html.HiddenFor(model => model.Casse)
|
||||||
|
@Html.HiddenFor(model => model.Trasf)
|
||||||
|
@Html.HiddenFor(model => model.Colli)
|
||||||
|
@Html.HiddenFor(model => model.num_cons)
|
||||||
|
@Html.HiddenFor(model => model.Uova)
|
||||||
|
@Html.HiddenFor(model => model.Cist)
|
||||||
|
@Html.HiddenFor(model => model.Note)
|
||||||
|
@Html.HiddenFor(model => model.Seq)
|
||||||
|
@Html.HiddenFor(model => model.Prog)
|
||||||
|
<div class="form-group">
|
||||||
|
<b>@Html.DisplayNameFor(model => model.DescAutomezzo)</b> @Html.DisplayFor(model => model.CodAutomezzo)-@Html.DisplayFor(model => model.DescAutomezzo)
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<b>@Html.DisplayNameFor(model => model.DataCarico)</b> @Html.DisplayFor(model => model.DataCarico)
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<b>@Html.DisplayNameFor(model => model.Committente)</b> @Html.DisplayFor(model => model.CodCommittente)-@Html.DisplayFor(model => model.Committente)
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<b>@Html.DisplayNameFor(model => model.Autista)</b> @Html.DisplayFor(model => model.CodAutista)-@Html.DisplayFor(model => model.Autista)
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<b>@Html.DisplayNameFor(model => model.Sede)</b> @Html.DisplayFor(model => model.CodSede)-@Html.DisplayFor(model => model.Sede)
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<b>@Html.DisplayNameFor(model => model.IndirizzoSede)</b> @Html.DisplayFor(model => model.IndirizzoSede)
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<b>@Html.DisplayNameFor(model => model.Casse)</b> @Html.DisplayFor(model => model.Casse)
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<b>@Html.DisplayNameFor(model => model.Trasf)</b> @Html.DisplayFor(model => model.Trasf)
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<b>@Html.DisplayNameFor(model => model.Colli)</b> @Html.DisplayFor(model => model.Colli)
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<b>@Html.DisplayNameFor(model => model.num_cons)</b> @Html.DisplayFor(model => model.num_cons)
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<b>@Html.DisplayNameFor(model => model.Uova)</b> @Html.DisplayFor(model => model.Uova)
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<b>@Html.DisplayNameFor(model => model.Cist)</b> @Html.DisplayFor(model => model.Cist)
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<b>@Html.DisplayNameFor(model => model.Note)</b> @Html.DisplayFor(model => model.Note)
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<b>@Html.DisplayNameFor(model => model.Seq)</b> @Html.DisplayFor(model => model.Seq)
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<b>@Html.DisplayNameFor(model => model.Prog)</b> @Html.DisplayFor(model => model.Prog)
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<input type="submit" value="Save" class="btn btn-primary" />
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<a asp-action="Index">Back to List</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@section Scripts {
|
||||||
|
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user