gestione commessa riparazione
This commit is contained in:
parent
6b33342fbe
commit
9ee33975b1
@ -163,7 +163,7 @@ namespace VirtualTask.Controllers
|
||||
|
||||
#region DETAILS
|
||||
|
||||
public IActionResult Details(string id)
|
||||
public IActionResult Details(string id, string azienda)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
|
||||
@ -185,7 +185,7 @@ namespace VirtualTask.Controllers
|
||||
{
|
||||
string data = response.Content.ReadAsStringAsync().Result;
|
||||
modelList = JsonConvert.DeserializeObject<List<CommesseVT_Table>>(data);
|
||||
commessa = modelList.Where(x => x.laserial.Equals(id)).First();
|
||||
commessa = modelList.Where(x => x.laserial.Equals(id) && x.lacodazi.Equals(azienda)).First();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -202,7 +202,7 @@ namespace VirtualTask.Controllers
|
||||
|
||||
#region EDIT
|
||||
|
||||
public IActionResult Edit(string id)
|
||||
public IActionResult Edit(string id, string azienda)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
token = helper.GetStringValue("tok");
|
||||
@ -224,7 +224,7 @@ namespace VirtualTask.Controllers
|
||||
{
|
||||
string data = response.Content.ReadAsStringAsync().Result;
|
||||
modelList = JsonConvert.DeserializeObject<List<CommesseVT_Table>>(data);
|
||||
commessa = modelList.Where(x => x.laserial.Equals(id)).First();
|
||||
commessa = modelList.Where(x => x.laserial.Equals(id) && x.lacodazi.Equals(azienda)).First();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -253,7 +253,7 @@ namespace VirtualTask.Controllers
|
||||
return RedirectToAction("Index", "Login");
|
||||
}
|
||||
|
||||
model.lacodazi = tenant;
|
||||
//model.lacodazi = tenant;
|
||||
|
||||
apiUrl = helper.GetStringValue("apiUrl");
|
||||
urlBase = apiUrl + "commesseVT/mod";
|
||||
@ -283,7 +283,7 @@ namespace VirtualTask.Controllers
|
||||
#region DELETE
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult Delete(string id)
|
||||
public IActionResult Delete(string id, string azienda)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
|
||||
@ -305,7 +305,7 @@ namespace VirtualTask.Controllers
|
||||
{
|
||||
string data = response.Content.ReadAsStringAsync().Result;
|
||||
modelList = JsonConvert.DeserializeObject<List<CommesseVT_Table>>(data);
|
||||
commesse = modelList.Where(x => x.laserial.Equals(id)).First();
|
||||
commesse = modelList.Where(x => x.laserial.Equals(id)&& x.lacodazi.Equals(azienda)).First();
|
||||
|
||||
return View(commesse);
|
||||
}
|
||||
@ -324,7 +324,7 @@ namespace VirtualTask.Controllers
|
||||
|
||||
token = helper.GetStringValue("tok");
|
||||
tenant = helper.GetStringValue("tenant");
|
||||
model.lacodazi = tenant;
|
||||
//model.lacodazi = tenant;
|
||||
model.ladatchi = DateTime.Now;
|
||||
apiUrl = helper.GetStringValue("apiUrl");
|
||||
urlBase = apiUrl + "commesseVT/del";
|
||||
|
||||
@ -9,7 +9,16 @@
|
||||
<div class="agy-project-wrapper agy-project-page-wrapper">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<form asp-action="DeleteConfirmed">
|
||||
<div class="row">
|
||||
@Html.HiddenFor(model => model.ladatchi)
|
||||
@Html.HiddenFor(model => model.lacodazi)
|
||||
@Html.HiddenFor(model => model.laserial)
|
||||
@Html.HiddenFor(model => model.lacodcom)
|
||||
@Html.HiddenFor(model => model.lacodimp)
|
||||
@Html.HiddenFor(model => model.ladeslav)
|
||||
@Html.HiddenFor(model => model.latipcli)
|
||||
@Html.HiddenFor(model => model.lacodcli)
|
||||
<div class="col-md-10">
|
||||
<b>@Html.DisplayNameFor(model => model.laserial)</b> @Html.DisplayFor(model => model.laserial)
|
||||
</div>
|
||||
@ -22,10 +31,9 @@
|
||||
<div class="col-md-10">
|
||||
<b>@Html.DisplayNameFor(model => model.ladeslav)</b> @Html.DisplayFor(model => model.ladeslav)
|
||||
</div>
|
||||
@* <div class="col-md-10"> *@
|
||||
@* @Html.DisplayNameFor(model => model.ladatchi) *@
|
||||
<b>@Html.HiddenFor(model => model.ladatchi)</b> @Html.HiddenFor(model => model.ladatchi)
|
||||
@* </div> *@
|
||||
|
||||
|
||||
|
||||
<div class="col-md-10">
|
||||
<b>@Html.DisplayNameFor(model => model.latipcli)</b> @Html.DisplayFor(model => model.latipcli)
|
||||
</div>
|
||||
@ -37,9 +45,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-12"> </div>
|
||||
<form asp-action="DeleteConfirmed">
|
||||
|
||||
<input type="submit" value="Elimina" class="agy-btn submitForm" />
|
||||
<input type="hidden" id="id" value=@Html.DisplayFor(model => model.laserial) name="id" />
|
||||
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Torna alla lista</a>
|
||||
</div>
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-12"> </div>
|
||||
@Html.HiddenFor(x => x.lacodazi)
|
||||
@Html.DisplayFor(x => x.lacodazi)
|
||||
@* <div class="form-group">
|
||||
<label asp-for="lacodazi" class="control-label"></label>
|
||||
<input asp-for="lacodazi" class="agy-form-field" class="form-control" placeholder="Codice azienda"/>
|
||||
|
||||
@ -106,15 +106,15 @@
|
||||
@Html.DisplayFor(modelItem => item.improvin)
|
||||
</td>
|
||||
<td>
|
||||
<a href="@Url.Action("Edit", "CommesseVT", new { id=item.laserial })" title="Modifica" class="links">
|
||||
<a href="@Url.Action("Edit", "CommesseVT", new { id=item.laserial, azienda = item.lacodazi })" title="Modifica" class="links">
|
||||
<img alt="Modifica" src="@Url.Content("~/assets/images/icons8-modificare-64.png")" style="width:30px;height:30px;">
|
||||
</a>
|
||||
|
||||
<a href="@Url.Action("Details", "CommesseVT", new { id=item.laserial })" title="Dettaglio" class="links">
|
||||
|
||||
<a href="@Url.Action("Details", "CommesseVT", new { id=item.laserial, azienda = item.lacodazi })" title="Dettaglio" class="links">
|
||||
<img alt="Dettaglio" src="@Url.Content("~/assets/images/icons8-visualizza-file-64.png")" style="width:30px;height:30px;">
|
||||
</a>
|
||||
@{
|
||||
string _url_del = @Url.Action("Delete", "CommesseVT", new { id = item.laserial });
|
||||
string _url_del = @Url.Action("Delete", "CommesseVT", new { id = item.laserial, azienda = item.lacodazi });
|
||||
string flagComGen = string.Empty;
|
||||
flagComGen = string.IsNullOrEmpty(item.lacomgen) ? "N" : item.lacomgen;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user