Michele: error method

This commit is contained in:
michele 2024-07-16 12:10:48 +02:00
parent c11b665501
commit d8d643349b
3 changed files with 16 additions and 2 deletions

View File

@ -291,7 +291,7 @@ namespace SoftwayWeb.Controllers
private List<SelectListItem> getAutisti() private List<SelectListItem> getAutisti()
{ {
SessionHelper helper = new SessionHelper(this); SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl"); apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "Giri/listaAutisti"; urlBase = apiUrl + "Giri/listaAutisti";
@ -329,6 +329,9 @@ namespace SoftwayWeb.Controllers
private List<SelectListItem> getMezzi() private List<SelectListItem> getMezzi()
{ {
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl"); apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "Giri/listaAutomezzi"; urlBase = apiUrl + "Giri/listaAutomezzi";

View File

@ -26,7 +26,16 @@ namespace SoftwayWeb.Controllers
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error() public IActionResult Error()
{ {
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); SessionHelper helper = new SessionHelper(this);
string e = helper.GetStringValue("errMsg");
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier, ErrMsg = e });
} }
//[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
//public IActionResult Error()
//{
// return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
//}
} }
} }

View File

@ -64,6 +64,8 @@
@Html.ActionLink("Seleziona tutti", "Create", "Giri",new { sel = true }, null) @Html.ActionLink("Seleziona tutti", "Create", "Giri",new { sel = true }, null)
&nbsp; &nbsp;
@Html.ActionLink("Deleziona tutti", "Create", "Giri",new { sel = false }, null) @Html.ActionLink("Deleziona tutti", "Create", "Giri",new { sel = false }, null)
&nbsp;
<a asp-action="Index" value="Torna alla lista" class="agy-btn submitForm">Torna alla lista</a>
</div> </div>