Ricetta:
- aggiunta output XML - fix struttura dati
This commit is contained in:
@@ -13,7 +13,8 @@ else
|
||||
<h4>Testata Ricetta</h4>
|
||||
</div>
|
||||
<div>
|
||||
<a href="api/recipe/@IdxPODL" target="_blank">Display</a>
|
||||
<a href="api/Recipe/GetRecipeXML?idxPODL=@IdxPODL" target="_blank" class="btn btn-sm btn-success">XML <i class="fa-solid fa-file-export"></i></a>
|
||||
<a href="api/Recipe/GetRecipe?idxPODL=@IdxPODL" target="_blank" class="btn btn-sm btn-success">json <i class="fa-solid fa-file-export"></i></a>
|
||||
@if (!showHead)
|
||||
{
|
||||
<span class="px-2"><b>@CurrRecipe?.HeadVal.Count</b> par</span>
|
||||
|
||||
@@ -3,7 +3,9 @@ using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using MP.Data.MgModels;
|
||||
using MP.SPEC.Data;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
using System.Xml;
|
||||
|
||||
namespace MP.SPEC.Controllers
|
||||
{
|
||||
@@ -33,11 +35,26 @@ namespace MP.SPEC.Controllers
|
||||
{
|
||||
string answ = "";
|
||||
var reqRecipe = await DService.RecipeGetByPODL(idxPODL);
|
||||
if(reqRecipe!=null)
|
||||
if (reqRecipe != null)
|
||||
{
|
||||
answ = DService.CalcRecipe(reqRecipe);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
[HttpGet("GetRecipeXML")]
|
||||
public async Task<string> GetRecipeXML(int idxPODL)
|
||||
{
|
||||
string answ = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
|
||||
// recupero versione json
|
||||
string rawData = await GetRecipe(idxPODL);
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
// aggiungo root node?
|
||||
|
||||
XmlDocument doc = (XmlDocument)JsonConvert.DeserializeXmlNode(rawData);
|
||||
answ += doc.InnerXml;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.SPEC</RootNamespace>
|
||||
<Version>6.16.2302.1311</Version>
|
||||
<Version>6.16.2302.1313</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
@if (filtActive)
|
||||
{
|
||||
<div class=" rounded small d-flex justify-content-between" title="Filtri attivi">
|
||||
@*<i class="fas fa-exclamation text-warning"></i>*@
|
||||
@if (selReparto != "*")
|
||||
{
|
||||
<button class="btn btn-outline-primary btn-sm mx-2" @onclick="()=>resetReparto()" title="Rimuovi Filtro Reparto"><i class="fa-solid fa-building"></i>   <i class="fa-solid fa-xmark text-warning"></i></button>
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
"DesRecipe": {
|
||||
"DesData": {
|
||||
||PlaceholderHeader||
|
||||
}
|
||||
},
|
||||
"ColRecipe": [
|
||||
||SROW:{"ColData":{||
|
||||
||PlaceholderRows||
|
||||
||EROW:}}||
|
||||
]
|
||||
}
|
||||
"ColRecipe": [
|
||||
||SROW:{"ColData":{||
|
||||
||PlaceholderRows||
|
||||
||EROW:}}||
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.16.2302.1311</h4>
|
||||
<h4>Versione: 6.16.2302.1313</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2302.1311
|
||||
6.16.2302.1313
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2302.1311</version>
|
||||
<version>6.16.2302.1313</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