Correzioni warnings in TaskMan

This commit is contained in:
Samuele Locatelli
2026-05-28 09:41:22 +02:00
parent 31682e57da
commit ce59a00d02
29 changed files with 67 additions and 72 deletions
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.INVE</RootNamespace>
<Version>8.16.2605.2808</Version>
<Version>8.16.2605.2809</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOINVE </i>
<h4>Versione: 8.16.2605.2808</h4>
<h4>Versione: 8.16.2605.2809</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2808
8.16.2605.2809
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2808</version>
<version>8.16.2605.2809</version>
<url>https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>MP.Land</RootNamespace>
<Version>8.16.2605.2808</Version>
<Version>8.16.2605.2809</Version>
<Configurations>Debug;Release;Debug_LiManDebug</Configurations>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<RunAnalyzersDuringBuild>True</RunAnalyzersDuringBuild>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo Tablet MAPO - DotNet6</i>
<h4>Versione: 8.16.2605.2808</h4>
<h4>Versione: 8.16.2605.2809</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2808
8.16.2605.2809
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2808</version>
<version>8.16.2605.2809</version>
<url>https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/MP.Land.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -1
View File
@@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.MON</RootNamespace>
<AssemblyName>$(AssemblyName.Replace(' ', '_'))</AssemblyName>
<Version>8.16.2605.2808</Version>
<Version>8.16.2605.2809</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 8.16.2605.2808</h4>
<h4>Versione: 8.16.2605.2809</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2808
8.16.2605.2809
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2808</version>
<version>8.16.2605.2809</version>
<url>https://nexus.steamware.net/repository/SWS/MP-MON/stable/LAST/MP.MON.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-MON/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>MP.Prog</RootNamespace>
<Version>8.16.2605.2808</Version>
<Version>8.16.2605.2809</Version>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo gestione Programmi MAPO</i>
<h4>Versione: 8.16.2605.2808</h4>
<h4>Versione: 8.16.2605.2809</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2808
8.16.2605.2809
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2808</version>
<version>8.16.2605.2809</version>
<url>https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/MP.Prog.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.RIOC</RootNamespace>
<Version>8.16.2605.2808</Version>
<Version>8.16.2605.2809</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MP-RIOC </i>
<h4>Versione: 8.16.2605.2808</h4>
<h4>Versione: 8.16.2605.2809</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2808
8.16.2605.2809
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2808</version>
<version>8.16.2605.2809</version>
<url>https://nexus.steamware.net/repository/SWS/MP-RIOC/stable/LAST/MP.RIOC.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-RIOC/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>MP.Stats</RootNamespace>
<UserSecretsId>826e877c-ba70-4253-84cb-d0b1cafd4440</UserSecretsId>
<Version>8.16.2605.2808</Version>
<Version>8.16.2605.2809</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
</PropertyGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo statistiche MAPO</i>
<h4>Versione: 8.16.2605.2808</h4>
<h4>Versione: 8.16.2605.2809</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
8.16.2605.2808
8.16.2605.2809
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2605.2808</version>
<version>8.16.2605.2809</version>
<url>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/MP.Stats.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+2 -11
View File
@@ -2,16 +2,11 @@
using Microsoft.Extensions.Configuration;
using MP.TaskMan.Models;
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static MP.TaskMan.Objects.Enums;
namespace MP.TaskMan.Controllers
{
public class MpTaskController : IDisposable
public class MpTaskController
{
#region Public Constructors
@@ -87,11 +82,7 @@ namespace MP.TaskMan.Controllers
return dtNext;
}
public void Dispose()
{
_configuration = null;
}
/// <summary>
/// Chiamata esecuzione di un singolo task programmato, SE in stato abilitato
/// </summary>
+16 -21
View File
@@ -16,7 +16,7 @@ using static MP.TaskMan.Objects.Enums;
namespace MP.TaskMan.Services
{
public class TaskService : BaseServ, IDisposable
public class TaskService : BaseServ
{
#region Public Constructors
@@ -88,15 +88,6 @@ namespace MP.TaskMan.Services
#region Public Methods
public void Dispose()
{
// Clear database controller
MLController.Dispose();
// redis dispose
redisConn = null;
redisDb = null;
}
/// <summary>
/// Chiamata esecuzione di un singolo task programmato
/// </summary>
@@ -136,18 +127,22 @@ namespace MP.TaskMan.Services
{
var callResp = await RCallService.CallRestGet(TaskRec.Command, TaskRec.Args);
DateTime dtEnd = DateTime.Now;
string formattedJson = JValue.Parse(callResp.Content).ToString(Formatting.Indented);
TaskExecModel tExeMod = new TaskExecModel()
if (callResp != null && !string.IsNullOrEmpty(callResp.Content))
{
DtEnd = dtEnd,
DtStart = dtStart,
IsError = callResp.StatusCode != System.Net.HttpStatusCode.OK,
TaskId = TaskRec.TaskId,
// deserializzazione come json indentato?!?
Result = formattedJson// $"{callResp.Content}".Replace("\"", ""),
};
// salvo su DB
answ = MLController.TaskExecSaveExecuted(TaskRec.TaskId, SchedNext, tExeMod);
string formattedJson = JValue.Parse(callResp.Content).ToString(Formatting.Indented);
TaskExecModel tExeMod = new TaskExecModel()
{
DtEnd = dtEnd,
DtStart = dtStart,
IsError = callResp.StatusCode != System.Net.HttpStatusCode.OK,
TaskId = TaskRec.TaskId,
// deserializzazione come json indentato?!?
Result = formattedJson// $"{callResp.Content}".Replace("\"", ""),
};
// salvo su DB
answ = MLController.TaskExecSaveExecuted(TaskRec.TaskId, SchedNext, tExeMod);
}
}
break;
+18 -11
View File
@@ -95,8 +95,8 @@ namespace MP.TaskMan
private static Logger Log = LogManager.GetCurrentClassLogger();
private List<TaskExecModel> ListRecords;
private List<TaskExecModel> SearchRecords;
private List<TaskExecModel> ListRecords = new();
private List<TaskExecModel> SearchRecords = new();
#endregion Private Fields
@@ -112,19 +112,26 @@ namespace MP.TaskMan
private async Task ReloadData()
{
SearchRecords = await TService.TaskExecGetFilt(CurrRecord.TaskId, 1000, "");
// se non tutti filtro...
if (ShowErrorMode != 0)
if (CurrRecord != null)
{
if (ShowErrorMode == 1)
SearchRecords = await TService.TaskExecGetFilt(CurrRecord.TaskId, 1000, "");
// se non tutti filtro...
if (ShowErrorMode != 0)
{
SearchRecords = SearchRecords.FindAll(x => x.IsError);
}
else if (ShowErrorMode == 2)
{
SearchRecords = SearchRecords.FindAll(x => !x.IsError);
if (ShowErrorMode == 1)
{
SearchRecords = SearchRecords.FindAll(x => x.IsError);
}
else if (ShowErrorMode == 2)
{
SearchRecords = SearchRecords.FindAll(x => !x.IsError);
}
}
}
else
{
SearchRecords = new();
}
totalCount = SearchRecords.Count;
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
}
+5 -2
View File
@@ -205,8 +205,11 @@ namespace MP.TaskMan
protected void ResetData()
{
TService.rollBackEdit(currRecord);
currRecord = null;
if (currRecord != null)
{
TService.rollBackEdit(currRecord);
currRecord = null;
}
}
protected double righDiv(double num, double den)
+2 -3
View File
@@ -10,10 +10,10 @@ namespace MP.TaskMan
#region Public Properties
[Parameter]
public int CodGroup { get; set; } = 0;
public List<TaskListModel> AllRecords { get; set; } = new List<TaskListModel>();
[Parameter]
public List<TaskListModel> AllRecords { get; set; } = new List<TaskListModel>();
public int CodGroup { get; set; } = 0;
[Parameter]
public EventCallback<bool> EC_Cancel { get; set; }
@@ -207,7 +207,6 @@ namespace MP.TaskMan
private int currPage = 1;
private TaskListModel? DetailTaskId = null;
private bool isLoading = false;
private List<TaskListModel> ListRecords = new List<TaskListModel>();
private int maxOrdinal = 999;
private int minOrdinal = 0;