SoftwayWeb/Views/Destinazioni/ModificaDestinazione.cshtml

193 lines
9.0 KiB
Plaintext

@model SoftwayWeb.Models.Destinazioni_Out
@{
ViewData["Title"] = "ModificaDestinazione";
Layout = "~/Views/Shared/_LayoutAreaRis.cshtml";
}
<!-- Basic Layout -->
<div class="row">
<div class="col-xl">
<div class="card mb-4">
<div class="card-header d-flex justify-content-between align-items-center">
<h5 class="mb-0">Modifica destinazione</h5> <small class="text-muted float-end"></small>
</div>
<div class="card-body">
<form asp-action="ModificaDestinazioneStep1">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="mb-3">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.DataCarico)</b> </label>
<div class="form-text">@Html.DisplayFor(model => model.DataCarico)</div>
</div>
<div class="mb-3">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.Committente)</b> </label>
<div class="form-text">@Html.DisplayFor(model => model.CodCommittente) - @Html.DisplayFor(model => model.Committente)</div>
</div>
<div class="mb-3">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.Sede)</b> </label>
<div class="form-text">@Html.DisplayFor(model => model.CodSede) - @Html.DisplayFor(model => model.Sede)</div>
</div>
<div class="mb-3">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.IndirizzoSede)</b> </label>
<div class="form-text">@Html.DisplayFor(model => model.IndirizzoSede)</div>
</div>
<div class="mb-3">
<label class="form-label" for="basic-default-phone"><b>@Html.DisplayNameFor(model => model.DescAutomezzo)</b></label>
@Html.DropDownList("CodAutomezzo", ViewBag.CodMezzo, null, new { @class = "agy-form-field require" })
</div>
<div class="mb-3">
<label class="form-label" for="basic-default-phone"><b>@Html.DisplayNameFor(model => model.Autista)</b></label>
@Html.DropDownList("codAutista", ViewBag.Autisti, null, new { @class = "agy-form-field require" })
</div>
@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.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)
@Html.HiddenFor(model => model.CodAutistaOld)
@Html.HiddenFor(model => model.CodAutomezzoOld)
@Html.HiddenFor(model => model.AutistaOld)
@Html.HiddenFor(model => model.DescAutomezzoOld)
@*
<button type="submit" class="btn btn-primary" onclick="javascript: return checkValidId();">Salva</button>*@
<button type="submit" class="btn btn-primary" >Avanti</button>
</form>
</div>
</div>
</div>
<div class="col-xl">
<div class="card mb-4">
<div class="card-header d-flex justify-content-between align-items-center">
<h5 class="mb-0">Dettaglio trasporto</h5> <small class="text-muted float-end"></small>
</div>
<div class="card-body">
<div class="mb-3">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.Casse)</b> </label>
<div class="form-text">@Html.DisplayFor(model => model.Casse)</div>
</div>
<div class="mb-3">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.Trasf)</b> </label>
<div class="form-text">@Html.DisplayFor(model => model.Trasf)</div>
</div>
<div class="mb-3">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.Colli)</b> </label>
<div class="form-text">@Html.DisplayFor(model => model.Colli)</div>
</div>
<div class="mb-3">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.num_cons)</b> </label>
<div class="form-text">@Html.DisplayFor(model => model.num_cons)</div>
</div>
<div class="mb-3">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.Uova)</b> </label>
<div class="form-text">@Html.DisplayFor(model => model.Uova)</div>
</div>
<div class="mb-3">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.Cist)</b> </label>
<div class="form-text">@Html.DisplayFor(model => model.Cist)</div>
</div>
<div class="mb-3">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.Seq)</b> </label>
<div class="form-text">@Html.DisplayFor(model => model.Seq)</div>
</div>
<div class="mb-3">
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.Prog)</b> </label>
<div class="form-text">@Html.DisplayFor(model => model.Prog)</div>
</div>
</div>
</div>
</div>
</div>
<script src="~/js/jquery.min.js"></script>
<script type="text/javascript">
function checkValidId() {
var codmezzo = $('#CodAutomezzo').val();
//alert(codmezzo)
var codaut = $('#codAutista').val();
//alert(codaut)
var uscita= $.ajax({
url: '/Destinazioni/Test?codmezzo=' + codmezzo + '&codaut=' + codaut,
type: 'POST',
contentType: 'application/json;',
data: JSON.stringify({ cod: $('#CodAutomezzo').val() }),
success: function (valid) {
var r = confirm("Are you sure you want to submit the record?");
if (r == true) {
alert('T');
return true;
}
else {
alert('F');
return false;
}
},
error: function () {
alert('errore');
return false;
}
});
//alert(uscita);
return uscita;
}
function Show() {
if (true) {
var r = confirm("Are you sure you want to submit the record?");
if (r==true)
{
return true;
}
else
{
return false;
}
}
else {
var t = confirm("Please insert the record");
if (t == true) {
return false;
}
}
}
</script>
<div>
<a asp-action="IndexValidate" asp-controller="Destinazioni" asp-route-id="@Model.serialeGiro" class="btn btn-primary">Torna alla Lista</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}