Aggiunta data osolescenza in articoli

This commit is contained in:
michele 2025-02-14 11:11:39 +01:00
parent b99fbbd77f
commit f06dfba2cc
3 changed files with 6 additions and 4 deletions

View File

@ -59,7 +59,7 @@ namespace VirtualTask.Controllers
{ {
string data = response.Content.ReadAsStringAsync().Result; string data = response.Content.ReadAsStringAsync().Result;
modelList = JsonConvert.DeserializeObject<List<Articoli>>(data); modelList = JsonConvert.DeserializeObject<List<Articoli>>(data);
//modelList = modelList.Where(x => x.tcdatobs == null).ToList(); modelList = modelList.Where(x => x.DataObso == null).ToList();
if (!string.IsNullOrEmpty(searchString)) if (!string.IsNullOrEmpty(searchString))
{ {
@ -218,7 +218,7 @@ namespace VirtualTask.Controllers
else else
{ {
errMes = response.Content.ReadAsStringAsync().Result; errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes); helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error"); return RedirectToAction("Error");
} }
@ -301,10 +301,11 @@ namespace VirtualTask.Controllers
[HttpPost, ActionName("DeleteConfirmed")] [HttpPost, ActionName("DeleteConfirmed")]
public IActionResult DeleteConfirmed(string id) public IActionResult DeleteConfirmed(string id)
{ {
SessionHelper helper = new SessionHelper(this); SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok"); token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl"); apiUrl = helper.GetStringValue("apiUrl");
admin = helper.GetStringValue("admin"); admin = helper.GetStringValue("admin");
ViewBag.Admin = admin; ViewBag.Admin = admin;

View File

@ -63,5 +63,7 @@ namespace VirtualTask.Models
[Display(Name = "Descrizione suppl.")] [Display(Name = "Descrizione suppl.")]
public string? Desc_sup { get; set; } public string? Desc_sup { get; set; }
public DateTime? DataObso { get; set; }
} }
} }

View File

@ -46,7 +46,6 @@
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th hidden>Azienda</th>
<th>Cod. Articolo</th> <th>Cod. Articolo</th>
<th>Descrizione</th> <th>Descrizione</th>
<th>Quantità</th> <th>Quantità</th>