Review AppUrl base x siti CORE

Divisione aree Redis tra app (x TaskMan in particolare)
 Test apertura app
This commit is contained in:
Samuele Locatelli
2024-10-28 16:57:52 +01:00
parent d48ba9deb0
commit 2346c67f3a
47 changed files with 462 additions and 217 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ namespace MP_TAB3.Components
{
await FixQtyUdc();
var currUrl = NavMan.Uri;
string baseUrl = config.GetValue<string>("ServerConf:BaseUrlTab") ?? (config.GetValue<string>("OptConf:BaseUrlTab") ?? "");
string baseUrl = config.GetValue<string>("SpecialConf:AppUrl") ?? (config.GetValue<string>("OptConf:AppUrl") ?? "");
string UrlTabJumpMag = SMServ.GetConf("UrlTabJumpMag");
if (string.IsNullOrEmpty(UrlTabJumpMag))
{
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<Version>6.16.2410.2810</Version>
<Version>6.16.2410.2816</Version>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP_TAB3</RootNamespace>
</PropertyGroup>
+1 -1
View File
@@ -56,7 +56,7 @@ logger.Info("Aggiunti services");
var app = builder.Build();
// aggiunt base URL x routing corretto
var pathBase= configuration.GetValue<string>("ServerConf:BaseUrlTab") ?? (configuration.GetValue<string>("OptConf:BaseUrlTab") ?? "");
var pathBase= configuration.GetValue<string>("SpecialConf:AppUrl") ?? (configuration.GetValue<string>("OptConf:AppUrl") ?? "");
app.UsePathBase(pathBase);
// Configure the HTTP request pipeline.
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 6.16.2410.2810</h4>
<h4>Versione: 6.16.2410.2816</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2410.2810
6.16.2410.2816
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2410.2810</version>
<version>6.16.2410.2816</version>
<url>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+2 -1
View File
@@ -61,6 +61,7 @@
await MsgServ.IdxMaccSet("");
}
await MsgServ.LastOpenedPageSet(tgtUrl);
navManager.NavigateTo(tgtUrl, true);
// navManager.NavigateTo(tgtUrl, true);
navManager.NavigateTo(tgtUrl, false);
}
}
-1
View File
@@ -22,7 +22,6 @@
"ServerConf": {
"BaseAddr": "https://iis04.egalware.com/MP/TAB3/",
"BasePathDisegni": "C:\\Steamware\\disegni",
"BaseUrlTab": "/MP/TAB3",
"ImgBasePath": "https://iis04.egalware.com/MP/macchine/small/",
"MpIoNS": "MoonPro:SQL2016DEV:MoonPro"
},
+1 -1
View File
@@ -75,12 +75,12 @@
"ServerConf": {
"BaseAddr": "https://localhost:7295/MP/TAB3/",
"BasePathDisegni": "\\\\iis01\\W$\\Files\\Disegni",
"BaseUrlTab": "/MP/TAB3",
"ImgBasePath": "https://iis01.egalware.com/MP/macchine/small/",
"MpIoNS": "MoonPro:SQL2016DEV:MoonPro",
"maxChar4Scroll": 21
},
"SpecialConf": {
"AppUrl": "/MP/TAB3",
"CodApp": "MP-LAND",
"CodModulo": "MP-TAB3",
"CodModuloParam": "MoonPro"
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>MP.Land</RootNamespace>
<Version>6.16.2410.2810</Version>
<Version>6.16.2410.2816</Version>
<Configurations>Debug;Release;Debug_LiManDebug</Configurations>
</PropertyGroup>
+4 -1
View File
@@ -2,9 +2,11 @@
@using MP.Land.Components
@using MP.Land.Data
@using MP.TaskMan.Services
@inject AppAuthService DataService
@inject LicenseService LicServ
@inject TaskService TServ
@inject NavigationManager NavManager
<div class="card">
@@ -21,9 +23,10 @@
LicServ.AKVList = new List<AppAuth.Models.AnagKeyValueModel>();
await Task.Delay(100);
await DataService.FlushRedisCache();
await TServ.FlushCache();
await Task.Delay(200);
// redireziono
NavManager.NavigateTo("");
NavManager.NavigateTo("", true);
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo Tablet MAPO - DotNet6</i>
<h4>Versione: 6.16.2410.2810</h4>
<h4>Versione: 6.16.2410.2816</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
6.16.2410.2810
6.16.2410.2816
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2410.2810</version>
<version>6.16.2410.2816</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>
+4
View File
@@ -46,6 +46,10 @@ namespace MP.Land
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
// aggiunt base URL x routing corretto
app.UsePathBase(Configuration.GetValue<string>("SpecialConf:AppUrl"));
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
+1
View File
@@ -73,6 +73,7 @@
"Prog.ApiUrl": "https://office.egalware.com/MP/PROG"
},
"SpecialConf": {
"AppUrl": "/MP/LAND",
"TaskManConn": "MP.Land",
"CodApp": "MP-LAND",
"CodModulo": "MP-LAND"
+1 -1
View File
@@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>MP.Prog</RootNamespace>
<Version>6.16.2410.2812</Version>
<Version>6.16.2410.2816</Version>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
+8 -3
View File
@@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Components;
using MP.Prog.Data;
using MP.TaskMan.Services;
using System.Threading.Tasks;
namespace MP.Prog.Pages
@@ -9,10 +10,13 @@ namespace MP.Prog.Pages
#region Protected Properties
[Inject]
protected FileArchDataService FDService { get; set; }
protected FileArchDataService FDService { get; set; } = null!;
[Inject]
protected NavigationManager NavManager { get; set; }
protected NavigationManager NavManager { get; set; } = null!;
[Inject]
protected TaskService TServ { get; set; } = null!;
#endregion Protected Properties
@@ -22,12 +26,13 @@ namespace MP.Prog.Pages
{
await Task.Delay(10);
await FDService.FlushRedisCache();
await TServ.FlushCache();
message = "Reset done, now redirect!";
await Task.Delay(100);
// passo a pagina home
NavManager.NavigateTo("Home", true);
NavManager.NavigateTo("", true);
}
#endregion Protected Methods
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo gestione Programmi MAPO</i>
<h4>Versione: 6.16.2410.2812</h4>
<h4>Versione: 6.16.2410.2816</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
6.16.2410.2812
6.16.2410.2816
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2410.2812</version>
<version>6.16.2410.2816</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
@@ -47,7 +47,7 @@ namespace MP.Prog
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
// aggiunt base URL x routing corretto
app.UsePathBase(Configuration.GetValue<string>("ServerConf:BaseUrl"));
app.UsePathBase(Configuration.GetValue<string>("SpecialConf:AppUrl"));
if (env.IsDevelopment() || env.IsStaging())
{
@@ -13,7 +13,6 @@
"MP.Prog": "Server=localhost\\SQLEXPRESS;Database=MoonPro_PROG;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.PROG;"
},
"ServerConf": {
"BaseUrl": "/MP/PROG",
"FolderBasePath": "\\\\stor01",
"Prog.ApiUrl": "https://localhost/MP/PROG"
}
@@ -13,7 +13,6 @@
"MP.Prog": "Server=W2019-SQL-STEAM;Database=MoonPro_PROG;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.Prog;"
},
"ServerConf": {
"BaseUrl": "/MP/PROG",
"FolderBasePath": "\\\\stor01",
"Prog.ApiUrl": "https://office.egalware.com/MP/PROG"
}
-1
View File
@@ -13,7 +13,6 @@
"MP.Prog": "Server=localhost\\SQLEXPRESS;Database=MoonPro_PROG;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.PROG;"
},
"ServerConf": {
"BaseUrl": "/MP/PROG",
"FolderBasePath": "\\\\stor01",
"Prog.ApiUrl": "https://localhost/MP/PROG"
}
+1 -1
View File
@@ -59,11 +59,11 @@
"Redis": "localhost:26379,serviceName=devel,DefaultDatabase=5,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false"
},
"ServerConf": {
"BaseUrl": "/MP/PROG",
"FolderBasePath": "\\\\stor01",
"Prog.ApiUrl": "https://iis01.egalware.com/MP/PROG"
},
"SpecialConf": {
"AppUrl": "/MP/PROG",
"TaskManConn": "MP.Prog",
"CodApp": "MP-PROG",
"CodModulo": "MP-PROG"
+2 -2
View File
@@ -4,8 +4,8 @@
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>MP.Stats</RootNamespace>
<UserSecretsId>826e877c-ba70-4253-84cb-d0b1cafd4440</UserSecretsId>
<Version>6.16.2410.2810</Version>
<Version>6.16.2410.2810</Version>
<Version>6.16.2410.2816</Version>
<Version>6.16.2410.2816</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>
+17 -2
View File
@@ -1,21 +1,36 @@
using Microsoft.AspNetCore.Components;
using MP.Data.Services;
using MP.Stats.Data;
using MP.TaskMan.Services;
using System.Threading.Tasks;
namespace MP.Stats.Pages
{
public partial class ForceReset
{
#region Protected Properties
[Inject]
protected NavigationManager NavManager { get; set; }
[Inject]
protected MpStatsService StatService { get; set; }
[Inject]
protected TaskService TServ { get; set; } = null!;
#endregion Protected Properties
#region Protected Methods
protected override async Task OnInitializedAsync()
{
await StatService.FlushCache();
await TServ.FlushCache();
await Task.Delay(500);
NavManager.NavigateTo("/", true);
}
[Inject]
protected NavigationManager NavManager { get; set; }
#endregion Protected Methods
}
}
+3 -3
View File
@@ -22,14 +22,14 @@
"ASPNETCORE_ENVIRONMENT": "Development"
},
"dotnetRunMessages": "true",
"applicationUrl": "https://localhost:5001;http://localhost:5000"
"applicationUrl": "https://localhost:5031;http://localhost:5030"
},
"WSL 2": {
"commandName": "WSL2",
"launchBrowser": true,
"launchUrl": "https://localhost:5001",
"launchUrl": "https://localhost:5031",
"environmentVariables": {
"ASPNETCORE_URLS": "https://localhost:5001;http://localhost:5000",
"ASPNETCORE_URLS": "https://localhost:5031;http://localhost:5030",
"ASPNETCORE_ENVIRONMENT": "Development"
},
"distributionName": ""
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo statistiche MAPO</i>
<h4>Versione: 6.16.2410.2810</h4>
<h4>Versione: 6.16.2410.2816</h4>
<br />
Note di rilascio:
<ul>
+1 -1
View File
@@ -1 +1 @@
6.16.2410.2810
6.16.2410.2816
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2410.2810</version>
<version>6.16.2410.2816</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>
+3
View File
@@ -38,6 +38,9 @@ namespace MP.Stats
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
// aggiunt base URL x routing corretto
app.UsePathBase(Configuration.GetValue<string>("SpecialConf:AppUrl"));
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
+1
View File
@@ -57,6 +57,7 @@
},
"FormatDur": "HH:mm.ss.ff",
"SpecialConf": {
"AppUrl": "/MP/STATS",
"TaskManConn": "MP.Stats"
},
"ServerConf": {
+1
View File
@@ -38,6 +38,7 @@ a,
.validation-message {
color: red;
}
.textStriked,
.text-strike {
text-decoration: line-through;
}
+1
View File
@@ -35,6 +35,7 @@ a, .btn-link {
color: red;
}
.textStriked,
.text-strike {
text-decoration: line-through;
}
+1 -1
View File
@@ -1 +1 @@
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');@import url('fonts.min.css');h1,h2,h3,h4,h5,h6,b,display-1,display-2,display-3,display-4{font-family:'Lato',sans-serif;}html,body{font-family:'Roboto Condensed',sans-serif;}a,.btn-link{color:#0366d6;}.btn-primary{color:#fff;background-color:#1b6ec2;border-color:#1861ac;}.content{padding-top:1.1rem;}.valid.modified:not([type=checkbox]){outline:1px solid #26b050;}.invalid{outline:1px solid #f00;}.validation-message{color:#f00;}.text-strike{text-decoration:line-through;}#blazor-error-ui{background:#ffffe0;bottom:0;box-shadow:0 -1px 2px rgba(0,0,0,.2);display:none;left:0;padding:.6rem 1.25rem .7rem 1.25rem;position:fixed;width:100%;z-index:1000;}#blazor-error-ui .dismiss{cursor:pointer;position:absolute;right:.75rem;top:.5rem;}.shortcuts{text-align:center;}.shortcuts .shortcut-icon{font-size:2rem;}.shortcuts .shortcut{min-width:9rem;min-height:5rem;display:inline-block;padding:2rem/3 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1rem/2;}.shortcuts .shortcut-sm{min-width:4.5rem;min-height:3rem;display:inline-block;padding:1rem/4 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1rem/2;}.shortcuts .shortcut .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut-sm .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut-sm:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut-sm:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut:hover .shortcut-icon{color:#c93;}.shortcuts .shortcut-sm:hover .shortcut-icon{color:#666;}.shortcuts .shortcut-label{display:block;margin-top:.75em;font-weight:400;color:#666;}@media(max-width:992px){.shortcuts .shortcut{min-width:8rem;min-height:4rem;}}
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');@import url('fonts.min.css');h1,h2,h3,h4,h5,h6,b,display-1,display-2,display-3,display-4{font-family:'Lato',sans-serif;}html,body{font-family:'Roboto Condensed',sans-serif;}a,.btn-link{color:#0366d6;}.btn-primary{color:#fff;background-color:#1b6ec2;border-color:#1861ac;}.content{padding-top:1.1rem;}.valid.modified:not([type=checkbox]){outline:1px solid #26b050;}.invalid{outline:1px solid #f00;}.validation-message{color:#f00;}.textStriked,.text-strike{text-decoration:line-through;}#blazor-error-ui{background:#ffffe0;bottom:0;box-shadow:0 -1px 2px rgba(0,0,0,.2);display:none;left:0;padding:.6rem 1.25rem .7rem 1.25rem;position:fixed;width:100%;z-index:1000;}#blazor-error-ui .dismiss{cursor:pointer;position:absolute;right:.75rem;top:.5rem;}.shortcuts{text-align:center;}.shortcuts .shortcut-icon{font-size:2rem;}.shortcuts .shortcut{min-width:9rem;min-height:5rem;display:inline-block;padding:2rem/3 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1rem/2;}.shortcuts .shortcut-sm{min-width:4.5rem;min-height:3rem;display:inline-block;padding:1rem/4 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:1rem/2;}.shortcuts .shortcut .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut-sm .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:2rem;color:#333;}.shortcuts .shortcut:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut-sm:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut-sm:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut:hover .shortcut-icon{color:#c93;}.shortcuts .shortcut-sm:hover .shortcut-icon{color:#666;}.shortcuts .shortcut-label{display:block;margin-top:.75em;font-weight:400;color:#666;}@media(max-width:992px){.shortcuts .shortcut{min-width:8rem;min-height:4rem;}}
+79 -60
View File
@@ -11,16 +11,20 @@ using static MP.TaskMan.Objects.Enums;
namespace MP.TaskMan.Controllers
{
public class MpTaskController: IDisposable
public class MpTaskController : IDisposable
{
#region Public Constructors
public MpTaskController(IConfiguration configuration)
{
_configuration = configuration;
Log.Info("Avviato MpTaskController");
}
private static IConfiguration _configuration;
private static Logger Log = LogManager.GetCurrentClassLogger();
#endregion Public Constructors
#region Public Methods
public DateTime CalcNextExe(TaskListModel taskRec)
{
DateTime dtNext = DateTime.Today;
@@ -77,8 +81,9 @@ namespace MP.TaskMan.Controllers
{
_configuration = null;
}
/// <summary>
/// Chiamata esecuzione di un singolo task programmato
/// Chiamata esecuzione di un singolo task programmato, SE in stato abilitato
/// </summary>
/// <param name="TaskId"></param>
/// <param name="SchedNext">Se true rischedula successiva chiamata</param>
@@ -97,7 +102,7 @@ namespace MP.TaskMan.Controllers
// recupero i dati da richiamare...
var currRec = dbCtx
.DbSetTaskList
.Where(x => x.TaskId == TaskId)
.Where(x => x.TaskId == TaskId && x.Enabled)
.FirstOrDefault();
if (currRec != null)
{
@@ -151,7 +156,6 @@ namespace MP.TaskMan.Controllers
return callRes;
}
/// <summary>
/// Annulla modifiche su una specifica entity (cancel update)
/// </summary>
@@ -164,7 +168,7 @@ namespace MP.TaskMan.Controllers
{
try
{
if (dbCtx.Entry(item).State == Microsoft.EntityFrameworkCore.EntityState.Deleted || dbCtx.Entry(item).State == Microsoft.EntityFrameworkCore.EntityState.Modified)
if (dbCtx.Entry(item).State == EntityState.Deleted || dbCtx.Entry(item).State == EntityState.Modified)
{
dbCtx.Entry(item).Reload();
}
@@ -198,6 +202,58 @@ namespace MP.TaskMan.Controllers
return dbResult;
}
/// <summary>
/// Esegue registrazione di un Task generico (NON SQL)
/// </summary>
/// <param name="TaskId"></param>
/// <param name="SchedNext">Se true rischedula successiva chiamata</param>
/// <param name="ResRec">Record esecuzione task esterno</param>
/// <returns></returns>
public TaskResultModel TaskExecSaveExecuted(int TaskId, bool SchedNext, TaskExecModel ResRec)
{
TaskResultModel callRes = new TaskResultModel();
using (var dbCtx = new TaskContext(_configuration))
{
try
{
// recupero i dati da richiamare...
var currRec = dbCtx
.DbSetTaskList
.Where(x => x.TaskId == TaskId)
.FirstOrDefault();
if (currRec != null)
{
// registro task ricevuto
dbCtx
.DbSetTaskExe
.Add(ResRec);
// aggiorno record chiamata...
currRec.DtLastExec = ResRec.DtStart;
currRec.LastResult = ResRec.Result;
currRec.LastIsError = ResRec.IsError;
currRec.LastDuration = ResRec.DtEnd.Subtract(ResRec.DtStart).TotalSeconds;
// solo se richiesto rischedulazione ricalcola chiamata
if (SchedNext)
{
// calcolo prossima esecuzione...
currRec.DtNextExec = CalcNextExe(currRec);
}
// segno modificato
dbCtx.Entry(currRec).State = EntityState.Modified;
// salvo modifiche!
dbCtx.SaveChanges();
}
}
catch (Exception exc)
{
Log.Error($"Eccezione in TaskExecSaveExecuted{Environment.NewLine}{exc}");
}
}
return callRes;
}
/// <summary>
/// Upsert record TaskExec
/// </summary>
@@ -259,58 +315,6 @@ namespace MP.TaskMan.Controllers
return dbResult;
}
/// <summary>
/// Esegue registrazione di un Task generico (NON SQL)
/// </summary>
/// <param name="TaskId"></param>
/// <param name="SchedNext">Se true rischedula successiva chiamata</param>
/// <param name="ResRec">Record esecuzione task esterno</param>
/// <returns></returns>
public TaskResultModel TaskExecSaveExecuted(int TaskId, bool SchedNext, TaskExecModel ResRec)
{
TaskResultModel callRes = new TaskResultModel();
using (var dbCtx = new TaskContext(_configuration))
{
try
{
// recupero i dati da richiamare...
var currRec = dbCtx
.DbSetTaskList
.Where(x => x.TaskId == TaskId)
.FirstOrDefault();
if (currRec != null)
{
// registro task ricevuto
dbCtx
.DbSetTaskExe
.Add(ResRec);
// aggiorno record chiamata...
currRec.DtLastExec = ResRec.DtStart;
currRec.LastResult = ResRec.Result;
currRec.LastIsError = ResRec.IsError;
currRec.LastDuration = ResRec.DtEnd.Subtract(ResRec.DtStart).TotalSeconds;
// solo se richiesto rischedulazione ricalcola chiamata
if (SchedNext)
{
// calcolo prossima esecuzione...
currRec.DtNextExec = CalcNextExe(currRec);
}
// segno modificato
dbCtx.Entry(currRec).State = EntityState.Modified;
// salvo modifiche!
dbCtx.SaveChanges();
}
}
catch (Exception exc)
{
Log.Error($"Eccezione in TaskExecSaveExecuted{Environment.NewLine}{exc}");
}
}
return callRes;
}
/// <summary>
/// Update ordinamento task
/// </summary>
@@ -388,6 +392,7 @@ namespace MP.TaskMan.Controllers
if (currData != null)
{
currData.Ordinal = rec2upd.Ordinal;
currData.Enabled = rec2upd.Enabled;
currData.Name = rec2upd.Name;
currData.Descript = rec2upd.Descript;
currData.Command = rec2upd.Command;
@@ -416,5 +421,19 @@ namespace MP.TaskMan.Controllers
}
return done;
}
#endregion Public Methods
#region Private Fields
private static Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
#region Private Properties
private static IConfiguration _configuration { get; set; } = null!;
#endregion Private Properties
}
}
}
@@ -0,0 +1,126 @@
// <auto-generated />
using System;
using MP.TaskMan;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace MP.TaskMan.Migrations
{
[DbContext(typeof(TaskContext))]
[Migration("20241028131648_AddTaskStatus")]
partial class AddTaskStatus
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
.HasAnnotation("ProductVersion", "6.0.33")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("MP.TaskMan.Models.TaskExecModel", b =>
{
b.Property<int>("TaskExecId")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("TaskExecId"), 1L, 1);
b.Property<DateTime>("DtEnd")
.HasColumnType("datetime2");
b.Property<DateTime>("DtStart")
.HasColumnType("datetime2");
b.Property<bool>("IsError")
.HasColumnType("bit");
b.Property<string>("Result")
.HasColumnType("nvarchar(max)");
b.Property<int>("TaskId")
.HasColumnType("int");
b.HasKey("TaskExecId");
b.HasIndex("TaskId");
b.ToTable("TaskExec");
});
modelBuilder.Entity("MP.TaskMan.Models.TaskListModel", b =>
{
b.Property<int>("TaskId")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("TaskId"), 1L, 1);
b.Property<string>("Args")
.HasColumnType("nvarchar(max)");
b.Property<int>("Cad")
.HasColumnType("int");
b.Property<string>("Command")
.HasColumnType("nvarchar(max)");
b.Property<string>("Descript")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("DtLastExec")
.HasColumnType("datetime2");
b.Property<DateTime>("DtNextExec")
.HasColumnType("datetime2");
b.Property<bool>("Enabled")
.HasColumnType("bit");
b.Property<int>("Freq")
.HasColumnType("int");
b.Property<double>("LastDuration")
.HasColumnType("float");
b.Property<bool>("LastIsError")
.HasColumnType("bit");
b.Property<string>("LastResult")
.HasColumnType("nvarchar(max)");
b.Property<string>("Name")
.HasColumnType("nvarchar(max)");
b.Property<int>("Ordinal")
.HasColumnType("int");
b.Property<int>("TType")
.HasColumnType("int");
b.HasKey("TaskId");
b.ToTable("TaskList");
});
modelBuilder.Entity("MP.TaskMan.Models.TaskExecModel", b =>
{
b.HasOne("MP.TaskMan.Models.TaskListModel", "TaskListNav")
.WithMany()
.HasForeignKey("TaskId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("TaskListNav");
});
#pragma warning restore 612, 618
}
}
}
@@ -0,0 +1,26 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace MP.TaskMan.Migrations
{
public partial class AddTaskStatus : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "Enabled",
table: "TaskList",
type: "bit",
nullable: false,
defaultValue: false);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Enabled",
table: "TaskList");
}
}
}
@@ -79,6 +79,9 @@ namespace MP.TaskMan.Migrations
b.Property<DateTime>("DtNextExec")
.HasColumnType("datetime2");
b.Property<bool>("Enabled")
.HasColumnType("bit");
b.Property<int>("Freq")
.HasColumnType("int");
+27
View File
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Drawing.Printing;
using static MP.TaskMan.Objects.Enums;
#nullable disable
@@ -23,6 +24,11 @@ namespace MP.TaskMan.Models
/// </summary>
public int Ordinal { get; set; } = 0;
/// <summary>
/// Stato Task abilitato / disabilitato
/// </summary>
public bool Enabled { get; set; } = false;
/// <summary>
/// Nome Task
/// </summary>
@@ -83,5 +89,26 @@ namespace MP.TaskMan.Models
public string LastResult { get; set; } = "";
#endregion Public Properties
/// <summary>
/// Equals solo su chiave!
/// </summary>
/// <param name="obj"></param>
/// <returns></returns>
public override bool Equals(object obj)
{
if (!(obj is TaskListModel item))
return false;
if (TaskId != item.TaskId)
return false;
return true;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
}
}
+51 -46
View File
@@ -61,6 +61,7 @@ namespace MP.TaskMan.Services
// sistemo
DataSource = connStrParams["Server"];
DataBase = connStrParams["Database"];
RedisBaseKey= $"MP:TaskMan:{DataSource}:{DataBase}";
}
// conf rest call service
@@ -101,46 +102,50 @@ namespace MP.TaskMan.Services
{
Task = $"TaskId: {TaskRec.TaskId} | {TaskRec.TType}",
ExecResult = -1,
TextResult = "Task Not recognized"
TextResult = TaskRec.Enabled ? "Task Not Recognized" : "Task Not Enabled for Execution"
};
// verifico tipo di task ed eseguo di conseguenza...
switch (TaskRec.TType)
// in primis verifica che SIA abilitato...
if (TaskRec.Enabled)
{
//case Task2ExeType.ND:
// break;
//case Task2ExeType.Exe:
// break;
//case Task2ExeType.SqlCommand:
// break;
case Task2ExeType.SqlStored:
answ = MLController.ExecuteSqlTask(TaskRec.TaskId, SchedNext);
break;
case Task2ExeType.RestCallGet:
DateTime dtStart = DateTime.Now;
// in primis testo la chiamata al servizio Health
string rAnsw = await RCallService.CheckServer();
// se ok effettuo vera chiamata...
if (rAnsw.ToUpper() == "OK")
{
var callResp = await RCallService.CallRestGet(TaskRec.Command, TaskRec.Args);
DateTime dtEnd = DateTime.Now;
TaskExecModel tExeMod = new TaskExecModel()
// verifico tipo di task ed eseguo di conseguenza...
switch (TaskRec.TType)
{
//case Task2ExeType.ND:
// break;
//case Task2ExeType.Exe:
// break;
//case Task2ExeType.SqlCommand:
// break;
case Task2ExeType.SqlStored:
answ = MLController.ExecuteSqlTask(TaskRec.TaskId, SchedNext);
break;
case Task2ExeType.RestCallGet:
DateTime dtStart = DateTime.Now;
// in primis testo la chiamata al servizio Health
string rAnsw = await RCallService.CheckServer();
// se ok effettuo vera chiamata...
if (rAnsw.ToUpper() == "OK")
{
DtEnd = dtEnd,
DtStart = dtStart,
IsError = callResp.StatusCode != System.Net.HttpStatusCode.OK,
TaskId = TaskRec.TaskId,
Result = $"{callResp.Content}".Replace("\"", ""),
};
// salvo su DB
answ = MLController.TaskExecSaveExecuted(TaskRec.TaskId, SchedNext, tExeMod);
}
break;
default:
break;
var callResp = await RCallService.CallRestGet(TaskRec.Command, TaskRec.Args);
DateTime dtEnd = DateTime.Now;
TaskExecModel tExeMod = new TaskExecModel()
{
DtEnd = dtEnd,
DtStart = dtStart,
IsError = callResp.StatusCode != System.Net.HttpStatusCode.OK,
TaskId = TaskRec.TaskId,
Result = $"{callResp.Content}".Replace("\"", ""),
};
// salvo su DB
answ = MLController.TaskExecSaveExecuted(TaskRec.TaskId, SchedNext, tExeMod);
}
break;
default:
break;
}
// svuoto cache!
await FlushCache();
}
// svuoto cache!
await FlushCache("Task");
return answ;
}
@@ -150,18 +155,18 @@ namespace MP.TaskMan.Services
/// <returns></returns>
public async Task<bool> FlushCache()
{
RedisValue pattern = new RedisValue($"{redisBaseKey}:*");
RedisValue pattern = new RedisValue($"{RedisBaseKey}:*");
bool answ = await ExecFlushRedisPattern(pattern);
return answ;
}
/// <summary>
/// Pulizia cache Redis per chiave specifica (da redisBaseKey...)
/// Pulizia cache Redis per chiave specifica (da RedisBaseKey...)
/// </summary>
/// <returns></returns>
public async Task<bool> FlushCache(string KeyReq)
{
RedisValue pattern = new RedisValue($"{redisBaseKey}:{KeyReq}:*");
RedisValue pattern = new RedisValue($"{RedisBaseKey}:{KeyReq}:*");
bool answ = await ExecFlushRedisPattern(pattern);
return answ;
}
@@ -199,7 +204,7 @@ namespace MP.TaskMan.Services
List<TaskExecModel> result = new List<TaskExecModel>();
// cerco in redis...
DateTime adesso = DateTime.Now;
string currKey = $"{redisBaseKey}:Task:ExecList:{TaskId}:{adesso:yyMMdd}:{adesso:HHmm}:{maxRec}";
string currKey = $"{RedisBaseKey}:Task:ExecList:{TaskId}:{adesso:yyMMdd}:{adesso:HHmm}:{maxRec}";
RedisValue rawData = await redisDb.StringGetAsync(currKey);
if (rawData.HasValue)
{
@@ -237,7 +242,7 @@ namespace MP.TaskMan.Services
List<TaskListModel> result = new List<TaskListModel>();
// cerco in redis...
DateTime adesso = DateTime.Now;
string currKey = $"{redisBaseKey}:Task:List:{TType}";
string currKey = $"{RedisBaseKey}:Task:List:{TType}";
RedisValue rawData = await redisDb.StringGetAsync(currKey);
if (rawData.HasValue)
{
@@ -277,7 +282,7 @@ namespace MP.TaskMan.Services
{
bool dbResult = MLController.TaskListMove(rec2upd, moveUp);
// svuoto cache!
await FlushCache("Task");
await FlushCache();
return await Task.FromResult(dbResult);
}
@@ -290,7 +295,7 @@ namespace MP.TaskMan.Services
{
bool dbResult = MLController.TaskListUpsert(rec2upd);
// svuoto cache!
await FlushCache("Task");
await FlushCache();
return dbResult;
}
@@ -320,11 +325,11 @@ namespace MP.TaskMan.Services
private Dictionary<string, string> connStrParams = new Dictionary<string, string>();
private string DataBase = "";
private string DataBase { get; set; } = "";
private string DataSource = "";
private string DataSource { get; set; } = "";
private string redisBaseKey = "MP:TASK";
private string RedisBaseKey { get; set; } = "MP:TASK";
#endregion Private Fields
+9 -1
View File
@@ -95,11 +95,19 @@ namespace MP.TaskMan
#region Protected Methods
/// <summary>
/// Stringa di connessione impiegata
/// </summary>
private string connString { get; set; } = "";
/// <summary>
/// Ovewrride setup gestione stringa di connessione
/// </summary>
/// <param name="optionsBuilder"></param>
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
if (!optionsBuilder.IsConfigured)
{
string connString = "";
if (DesignTime)
{
connString = "Server=SQL2016DEV; Database=MoonPro_PROG; Trusted_Connection=True;";
+55 -62
View File
@@ -2,12 +2,61 @@
{
<hr />
<div class="row g-1">
<div class="col-md-1">
<div class="form-floating">
<input type="number" class="form-control" @bind="@CurrRecord.Ordinal">
<label class="small">Ordine Esec.</label>
</div>
</div>
<div class="col-md-1">
<div class="form-floating">
<div class="form-control">
<div class="form-check form-switch small">
<input class="form-check-input" type="checkbox" role="switch" title="Abilitato / Disabilitato" @bind-value="@CurrRecord.Enabled" checked="@CurrRecord.Enabled">
</div>
</div>
<label class="small">Enabled</label>
</div>
</div>
<div class="col-md-2">
<div class="form-floating">
<input type="text" class="form-control" @bind="@CurrRecord.Name">
<label class="small">Nome Task</label>
</div>
</div>
<div class="col-md-4">
<div class="form-floating">
<input type="text" class="form-control" @bind="@CurrRecord.Descript">
<label class="small">Descrizione Task</label>
</div>
</div>
<div class="col-md-2">
<div class="form-floating">
<input type="datetime-local" class="form-control" @bind="@CurrRecord.DtNextExec">
<label class="small">Prossima Esecuzione</label>
</div>
</div>
<div class="col-md-1">
<div class="form-floating">
<select class="form-select" @bind="@CurrRecord.Freq">
@foreach (var option in Enum.GetValues(typeof(MP.TaskMan.Objects.Enums.TaskFreqType)))
{
<option value="@option">
@option
</option>
}
</select>
<label class="small">Frequenza</label>
</div>
</div>
<div class="col-md-1">
<div class="form-floating">
<input type="number" class="form-control" @bind="@CurrRecord.Cad">
<label class="small">Cadenza</label>
</div>
</div>
</div>
<div class="row g-1">
<div class="col-md-2">
<div class="form-floating">
<select class="form-select" @bind="@CurrRecord.TType">
@@ -21,81 +70,25 @@
<label class="small">Tipo Task</label>
</div>
</div>
<div class="col-md-8">
<div class="form-floating">
<input type="text" class="form-control" @bind="@CurrRecord.Descript">
<label class="small">Descrizione Task</label>
</div>
</div>
@* <div class="col-md-2">
<div class="form-floating">
<select class="form-select" @bind="@CurrRecord.Freq">
@foreach (var option in Enum.GetValues(typeof(MP.TaskMan.Objects.Enums.TaskFreqType)))
{
<option value="@option">
@option
</option>
}
</select>
<label class="small">Frequenza</label>
</div>
</div>
<div class="col-md-1">
<div class="form-floating">
<input type="number" class="form-control" @bind="@CurrRecord.Cad">
<label class="small">Cadenza</label>
</div>
</div> *@
</div>
<div class="row g-1">
<div class="col-md-4">
<div class="form-floating">
<input type="text" class="form-control" @bind="@CurrRecord.Command">
<label class="small">Comando</label>
</div>
</div>
<div class="col-md-8">
<div class="col-md-4">
<div class="form-floating">
<input type="text" class="form-control" @bind="@CurrRecord.Args">
<label class="small">Parametri</label>
</div>
</div>
</div>
<div class="row g-1">
<div class="col-md-3">
<div class="form-floating">
<input type="number" class="form-control" @bind="@CurrRecord.Ordinal">
<label class="small">Ordine Esecuzione</label>
</div>
</div>
<div class="col-md-3">
<div class="form-floating">
<input type="datetime-local" class="form-control" @bind="@CurrRecord.DtNextExec">
<label class="small">Prossima Esecuzione</label>
</div>
</div>
<div class="col-md-2">
<div class="form-floating">
<select class="form-select" @bind="@CurrRecord.Freq">
@foreach (var option in Enum.GetValues(typeof(MP.TaskMan.Objects.Enums.TaskFreqType)))
{
<option value="@option">
@option
</option>
}
</select>
<label class="small">Frequenza</label>
</div>
</div>
<div class="col-md-2">
<div class="form-floating">
<input type="number" class="form-control" @bind="@CurrRecord.Cad">
<label class="small">Cadenza</label>
</div>
</div>
<div class="col-md-2 pt-2">
<div class="col-md-1 pt-2">
<button class="btn btn-lg w-100 btn-success" @onclick="()=>doSave()" title="Save"><i class="far fa-save"></i> Save</button>
</div>
<div class="col-md-1 pt-2">
<button class="btn btn-lg w-100 btn-warning" @onclick="()=>doCancel()" title="Cancel"><i class="fas fa-ban"></i> Cancel</button>
</div>
</div>
}
+10 -3
View File
@@ -82,7 +82,7 @@
<tbody>
@foreach (var record in ListRecords)
{
<tr class="@checkSelect(@record.TaskId)">
<tr class="@checkSelect(@record)">
<td class="text-nowrap">
<button class="btn btn-sm btn-info" @onclick="()=>doSelect(record)" title="Select"><i class="fas fa-search"></i></button>
@if (detRecord == null)
@@ -110,7 +110,7 @@
<button class="btn btn-sm btn-outline-primary mx-1" @onclick="()=>doMove(record, true)" title="Move Up"><i class="fas fa-caret-up"></i></button>
}
}
@record.Ordinal
<b>@record.Ordinal</b>
@if (detRecord == null)
{
@if (record.Ordinal == maxOrdinal)
@@ -148,11 +148,18 @@
<div>@($"{record.DtNextExec:yyyy-MM-dd}")</div>
<div class="small">@($"{record.DtNextExec:ddd HH:mm:ss}")</div>
</td>
<td class="text-end">
<td class="text-end">
<b>@($"{record.LastDuration:N3}")</b> <sub>sec</sub> <button class="btn btn-sm @btnCss(record)" @onclick="() => ToggleDetail(record)" title="Ultima esecuzione"><i class="far @iconCss(record)"></i></button>
</td>
<td>
@if(record.Enabled)
{
<button class="btn btn-sm @btnRunCss(record.DtNextExec) me-1" @onclick="()=>doRun(record)" title="Run Now"><i class="fas fa-play"></i></button>
}
else
{
<button class="btn btn-sm btn-secondary me-1" title="Disabled / Cannot run!" disabled><i class="fas fa-play"></i></button>
}
</td>
}
</tr>
+8 -8
View File
@@ -10,21 +10,21 @@ namespace MP.TaskMan
{
#region Public Methods
public string checkSelect(int TaskId)
public string checkSelect(TaskListModel selRec)
{
string answ = "";
if (currRecord != null)
{
try
{
answ = (currRecord.TaskId == TaskId) ? "table-info" : "";
}
catch
{ }
answ = (currRecord.Equals(selRec)) ? "table-info" : "";
}
else if (detRecord != null)
{
answ = (detRecord.TaskId == TaskId) ? "table-info" : "";
answ = detRecord.Equals(selRec) ? "table-info" : "";
}
// verifico se sia disabilitato...
if(!selRec.Enabled)
{
answ += " text-secondary textStriked";
}
return answ;
}