fix deserializzazione oggetto fluxlog
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
using MP.Data.DatabaseModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MP.Data.DTO
|
||||
{
|
||||
public class DossierFluxLogDTO
|
||||
{
|
||||
public List<FluxLog> ODL { get; set; } = new List<FluxLog>();
|
||||
}
|
||||
}
|
||||
@@ -52,40 +52,44 @@ else
|
||||
|
||||
@if (!visualizzaFlux)
|
||||
{
|
||||
<table class="table table-sm table-striped small">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><i class="fa-solid fa-hard-drive"></i> Macchina</th>
|
||||
<th><i class="fa-regular fa-calendar-days"></i> Data</th>
|
||||
<th><i class="fa-solid fa-sliders"></i> ODL</th>
|
||||
<th><i class="fa-solid fa-sliders"></i> DATA TYPE</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var record in ListRecords)
|
||||
{
|
||||
if(listaFlux == null)
|
||||
{
|
||||
<div class="alert alert-warning text-center display-4">Nessun record trovato</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="table table-sm table-striped small">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>
|
||||
@record.IdxMacchina
|
||||
</td>
|
||||
<td>
|
||||
@record.DtRif
|
||||
</td>
|
||||
<td>
|
||||
@record.IdxODL
|
||||
</td>
|
||||
<td>
|
||||
@record.DataType
|
||||
</td>
|
||||
<th><i class="fa-solid fa-hard-drive"></i> Macchina</th>
|
||||
<th><i class="fa-regular fa-calendar-days"></i> Data</th>
|
||||
<th><i class="fa-solid fa-sliders"></i> ODL</th>
|
||||
<th><i class="fa-solid fa-sliders"></i> DATA TYPE</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var record in listaFlux)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@record.IdxMacchina
|
||||
</td>
|
||||
<td>
|
||||
@record.dtEvento
|
||||
</td>
|
||||
<td>
|
||||
@record.CodFlux
|
||||
</td>
|
||||
<td>
|
||||
@record.Valore
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace MP.SPEC.Components
|
||||
{
|
||||
currRecord = selRec;
|
||||
await RecordSel.InvokeAsync(selRec);
|
||||
//listaFlux = MDService.convertToFluxLog(selRec.Valore);
|
||||
listaFlux = MDService.convertToFluxLog(selRec.Valore);
|
||||
toggleTableFlux();
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ namespace MP.SPEC.Components
|
||||
private Dossiers? currRecord = null;
|
||||
private List<Dossiers>? ListRecords;
|
||||
private List<Dossiers>? SearchRecords;
|
||||
private FluxLog? listaFlux;
|
||||
private List<FluxLog>? listaFlux { get; set; } = null;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using MP.Data;
|
||||
using MP.Data.Conf;
|
||||
using MP.Data.DatabaseModels;
|
||||
using MP.Data.DTO;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
using StackExchange.Redis;
|
||||
@@ -322,10 +323,12 @@ namespace MP.SPEC.Data
|
||||
|
||||
return await Task.FromResult(dbController.DossiersGetLastFilt(IdxMacchina, DtRef, MaxRec));
|
||||
}
|
||||
public FluxLog convertToFluxLog(string Valore)
|
||||
public List<FluxLog> convertToFluxLog(string Valore)
|
||||
{
|
||||
var result = JsonConvert.DeserializeObject<FluxLog>(Valore);
|
||||
return result;
|
||||
//string valStriped = Valore.Substring(7, Valore.Length - 8);
|
||||
//var result = JsonConvert.DeserializeObject<List<FluxLog>>(valStriped);
|
||||
var result = JsonConvert.DeserializeObject<DossierFluxLogDTO>(Valore);
|
||||
return result.ODL;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.SPEC</RootNamespace>
|
||||
<Version>6.15.2209.2016</Version>
|
||||
<Version>6.15.2209.2017</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.15.2209.2016</h4>
|
||||
<h4>Versione: 6.15.2209.2017</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.15.2209.2016
|
||||
6.15.2209.2017
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.15.2209.2016</version>
|
||||
<version>6.15.2209.2017</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user