diff --git a/MP-PROG.sln b/MP-PROG.sln
index 461319fe..fa58adaf 100644
--- a/MP-PROG.sln
+++ b/MP-PROG.sln
@@ -7,6 +7,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.Prog", "MP.Prog\MP.Prog.
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.FileData", "MP.FileData\MP.FileData.csproj", "{48693321-1FA6-4DBB-A730-B8EF3E0B68D2}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.TaskMan", "MP.TaskMan\MP.TaskMan.csproj", "{EF0CF5FC-2451-4184-AAA4-B17236DEE41B}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Egw.Core", "Egw.Core\Egw.Core.csproj", "{3EE72B27-C44F-40F5-B4E8-E43ECA6F39B1}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -21,6 +25,14 @@ Global
{48693321-1FA6-4DBB-A730-B8EF3E0B68D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48693321-1FA6-4DBB-A730-B8EF3E0B68D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{48693321-1FA6-4DBB-A730-B8EF3E0B68D2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EF0CF5FC-2451-4184-AAA4-B17236DEE41B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EF0CF5FC-2451-4184-AAA4-B17236DEE41B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EF0CF5FC-2451-4184-AAA4-B17236DEE41B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EF0CF5FC-2451-4184-AAA4-B17236DEE41B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3EE72B27-C44F-40F5-B4E8-E43ECA6F39B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3EE72B27-C44F-40F5-B4E8-E43ECA6F39B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3EE72B27-C44F-40F5-B4E8-E43ECA6F39B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3EE72B27-C44F-40F5-B4E8-E43ECA6F39B1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/MP-TAB3/MP-TAB3.csproj b/MP-TAB3/MP-TAB3.csproj
index 412e59da..5884f0b9 100644
--- a/MP-TAB3/MP-TAB3.csproj
+++ b/MP-TAB3/MP-TAB3.csproj
@@ -3,7 +3,7 @@
net6.0
enable
- 6.16.2410.2809
+ 6.16.2410.2810
enable
MP_TAB3
diff --git a/MP-TAB3/Resources/ChangeLog.html b/MP-TAB3/Resources/ChangeLog.html
index acde8931..d16345a8 100644
--- a/MP-TAB3/Resources/ChangeLog.html
+++ b/MP-TAB3/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOSPEC
- Versione: 6.16.2410.2809
+ Versione: 6.16.2410.2810
Note di rilascio:
-
diff --git a/MP-TAB3/Resources/VersNum.txt b/MP-TAB3/Resources/VersNum.txt
index c71112a4..20d6919c 100644
--- a/MP-TAB3/Resources/VersNum.txt
+++ b/MP-TAB3/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2410.2809
+6.16.2410.2810
diff --git a/MP-TAB3/Resources/manifest.xml b/MP-TAB3/Resources/manifest.xml
index afcf3514..10ea38d1 100644
--- a/MP-TAB3/Resources/manifest.xml
+++ b/MP-TAB3/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2410.2809
+ 6.16.2410.2810
https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip
https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html
false
diff --git a/MP.FileData/MP.FileData.csproj b/MP.FileData/MP.FileData.csproj
index 2b9b560a..b52cf743 100644
--- a/MP.FileData/MP.FileData.csproj
+++ b/MP.FileData/MP.FileData.csproj
@@ -18,7 +18,7 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
diff --git a/MP.Land/MP.Land.csproj b/MP.Land/MP.Land.csproj
index ebfd1507..544dbe59 100644
--- a/MP.Land/MP.Land.csproj
+++ b/MP.Land/MP.Land.csproj
@@ -3,7 +3,7 @@
net6.0
MP.Land
- 6.16.2410.2809
+ 6.16.2410.2810
Debug;Release;Debug_LiManDebug
diff --git a/MP.Land/Pages/TaskScheduler.razor.cs b/MP.Land/Pages/TaskScheduler.razor.cs
index dff3c10a..67403068 100644
--- a/MP.Land/Pages/TaskScheduler.razor.cs
+++ b/MP.Land/Pages/TaskScheduler.razor.cs
@@ -1,16 +1,4 @@
using Microsoft.AspNetCore.Components;
-using Microsoft.JSInterop;
-using MP.TaskMan.Models;
-using MP.Land.Data;
-using static MP.TaskMan.Objects.Enums;
-using System.Collections.Generic;
-using System.IO;
-using System.Threading.Tasks;
-using System;
-using System.Linq;
-using MP.Data.Services;
-using DnsClient.Protocol;
-using MP.TaskMan.Services;
namespace MP.Land.Pages
{
diff --git a/MP.Land/Resources/ChangeLog.html b/MP.Land/Resources/ChangeLog.html
index d0a1bee4..7c8405fa 100644
--- a/MP.Land/Resources/ChangeLog.html
+++ b/MP.Land/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo Tablet MAPO - DotNet6
-
Versione: 6.16.2410.2809
+ Versione: 6.16.2410.2810
Note di rilascio:
diff --git a/MP.Land/Resources/VersNum.txt b/MP.Land/Resources/VersNum.txt
index c71112a4..20d6919c 100644
--- a/MP.Land/Resources/VersNum.txt
+++ b/MP.Land/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2410.2809
+6.16.2410.2810
diff --git a/MP.Land/Resources/manifest.xml b/MP.Land/Resources/manifest.xml
index 05b025ad..47303698 100644
--- a/MP.Land/Resources/manifest.xml
+++ b/MP.Land/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2410.2809
+ 6.16.2410.2810
https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/MP.Land.zip
https://nexus.steamware.net/repository/SWS/MP-LAND/stable/LAST/ChangeLog.html
false
diff --git a/MP.Prog/MP.Prog.csproj b/MP.Prog/MP.Prog.csproj
index 5bf46fe1..7fc9b19b 100644
--- a/MP.Prog/MP.Prog.csproj
+++ b/MP.Prog/MP.Prog.csproj
@@ -3,7 +3,7 @@
net6.0
MP.Prog
- 6.16.2410.2318
+ 6.16.2410.2811
True
@@ -19,15 +19,15 @@
-
+
-
+
-
+
@@ -35,6 +35,7 @@
+
diff --git a/MP.Prog/Pages/TaskScheduler.razor b/MP.Prog/Pages/TaskScheduler.razor
new file mode 100644
index 00000000..26339b36
--- /dev/null
+++ b/MP.Prog/Pages/TaskScheduler.razor
@@ -0,0 +1,3 @@
+@page "/TaskScheduler"
+
+
\ No newline at end of file
diff --git a/MP.Prog/Pages/TaskScheduler.razor.cs b/MP.Prog/Pages/TaskScheduler.razor.cs
new file mode 100644
index 00000000..6cb49a51
--- /dev/null
+++ b/MP.Prog/Pages/TaskScheduler.razor.cs
@@ -0,0 +1,25 @@
+using Microsoft.AspNetCore.Components;
+
+namespace MP.Prog.Pages
+{
+ public partial class TaskScheduler : ComponentBase
+ {
+ #region Protected Properties
+
+ [Inject]
+ protected Data.MessageService MServ { get; set; } = null!;
+
+ #endregion Protected Properties
+
+ #region Protected Methods
+
+ protected override void OnInitialized()
+ {
+ MServ.ShowSearch = true;
+ MServ.PageName = "Task Scheduler";
+ MServ.PageIcon = "oi oi-clock";
+ }
+
+ #endregion Protected Methods
+ }
+}
\ No newline at end of file
diff --git a/MP.Prog/Program.cs b/MP.Prog/Program.cs
index 592ac919..a81ebcb9 100644
--- a/MP.Prog/Program.cs
+++ b/MP.Prog/Program.cs
@@ -27,7 +27,7 @@ namespace MP.Prog
logging.ClearProviders();
logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Error);
})
- // importante per eseguire la conf regike logging
+ // importante per eseguire la conf logging
.UseNLog(new NLogAspNetCoreOptions() { RemoveLoggerFactoryFilter = false });
//.UseNLog();
@@ -49,7 +49,7 @@ namespace MP.Prog
}
finally
{
- NLog.LogManager.Shutdown();
+ LogManager.Shutdown();
}
}
diff --git a/MP.Prog/Resources/ChangeLog.html b/MP.Prog/Resources/ChangeLog.html
index 16ff1099..48532fa6 100644
--- a/MP.Prog/Resources/ChangeLog.html
+++ b/MP.Prog/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo gestione Programmi MAPO
-
Versione: 6.16.2410.2318
+ Versione: 6.16.2410.2811
Note di rilascio:
diff --git a/MP.Prog/Resources/VersNum.txt b/MP.Prog/Resources/VersNum.txt
index 608cd781..02a9b1b9 100644
--- a/MP.Prog/Resources/VersNum.txt
+++ b/MP.Prog/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2410.2318
+6.16.2410.2811
diff --git a/MP.Prog/Resources/manifest.xml b/MP.Prog/Resources/manifest.xml
index d54cba42..d6489eed 100644
--- a/MP.Prog/Resources/manifest.xml
+++ b/MP.Prog/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2410.2318
+ 6.16.2410.2811
https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/MP.Prog.zip
https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/ChangeLog.html
false
diff --git a/MP.Prog/Shared/NavMenu.razor b/MP.Prog/Shared/NavMenu.razor
index 99e8e3d9..8b1df867 100644
--- a/MP.Prog/Shared/NavMenu.razor
+++ b/MP.Prog/Shared/NavMenu.razor
@@ -22,6 +22,12 @@
Setup
+
+ -
+
+ Task Scheduler
+
+
-
ForceReload
diff --git a/MP.Prog/Startup.cs b/MP.Prog/Startup.cs
index 3f68ea0d..cceb2675 100644
--- a/MP.Prog/Startup.cs
+++ b/MP.Prog/Startup.cs
@@ -10,6 +10,7 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.OpenApi.Models;
using MP.Prog.Data;
+using MP.TaskMan.Services;
using NLog;
using StackExchange.Redis;
using System;
@@ -182,9 +183,10 @@ namespace MP.Prog
services.AddServerSideBlazor();
services.AddSingleton(Configuration);
- //services.AddTransient();
-
+ services.AddSingleton();
+ services.AddSingleton();
//services.AddSingleton();
+
services.AddScoped();
services.AddScoped();
services.AddSingleton(redisMultiplexer);
diff --git a/MP.Prog/_Imports.razor b/MP.Prog/_Imports.razor
index 28755e63..80a941ef 100644
--- a/MP.Prog/_Imports.razor
+++ b/MP.Prog/_Imports.razor
@@ -9,3 +9,4 @@
@using MP.Prog
@using MP.Prog.Shared
@using MP.Prog.Components
+@using MP.TaskMan
diff --git a/MP.Prog/appsettings.Development.json b/MP.Prog/appsettings.Development.json
index fb218b9a..da254e73 100644
--- a/MP.Prog/appsettings.Development.json
+++ b/MP.Prog/appsettings.Development.json
@@ -1,10 +1,13 @@
{
- "DetailedErrors": true,
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft": "Warning",
- "Microsoft.Hosting.Lifetime": "Information"
- }
+ "DetailedErrors": true,
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
}
+ },
+ "ServerConf": {
+ "Prog.ApiUrl": "https://iis01.egalware.com/MP/PROG"
+ }
}
\ No newline at end of file
diff --git a/MP.Prog/appsettings.Production-install.json b/MP.Prog/appsettings.Production-install.json
index 46d50e83..bda74775 100644
--- a/MP.Prog/appsettings.Production-install.json
+++ b/MP.Prog/appsettings.Production-install.json
@@ -1,15 +1,20 @@
{
- "DetailedErrors": true,
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft": "Warning",
- "Microsoft.Hosting.Lifetime": "Information"
- }
- },
- "AllowedHosts": "*",
- "ConnectionStrings": {
- "DefaultConnection": "Server=localhost\\SQLEXPRESS;Database=MoonPro_PROG;Trusted_Connection=True;MultipleActiveResultSets=true",
- "MP.Prog": "Server=localhost\\SQLEXPRESS;Database=MoonPro_PROG;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.PROG;"
+ "DetailedErrors": true,
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
}
+ },
+ "AllowedHosts": "*",
+ "ConnectionStrings": {
+ "DefaultConnection": "Server=localhost\\SQLEXPRESS;Database=MoonPro_PROG;Trusted_Connection=True;MultipleActiveResultSets=true",
+ "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"
+ }
}
\ No newline at end of file
diff --git a/MP.Prog/appsettings.Production-office.json b/MP.Prog/appsettings.Production-office.json
index 3dc010de..baa2796e 100644
--- a/MP.Prog/appsettings.Production-office.json
+++ b/MP.Prog/appsettings.Production-office.json
@@ -1,15 +1,20 @@
{
- "DetailedErrors": true,
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft": "Warning",
- "Microsoft.Hosting.Lifetime": "Information"
- }
- },
- "AllowedHosts": "*",
+ "DetailedErrors": true,
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
+ }
+ },
+ "AllowedHosts": "*",
"ConnectionStrings": {
"DefaultConnection": "Server=W2019-SQL-STEAM;Database=MoonPro_PROG;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.Prog;",
"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"
}
}
\ No newline at end of file
diff --git a/MP.Prog/appsettings.Production.json b/MP.Prog/appsettings.Production.json
index 46d50e83..bda74775 100644
--- a/MP.Prog/appsettings.Production.json
+++ b/MP.Prog/appsettings.Production.json
@@ -1,15 +1,20 @@
{
- "DetailedErrors": true,
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft": "Warning",
- "Microsoft.Hosting.Lifetime": "Information"
- }
- },
- "AllowedHosts": "*",
- "ConnectionStrings": {
- "DefaultConnection": "Server=localhost\\SQLEXPRESS;Database=MoonPro_PROG;Trusted_Connection=True;MultipleActiveResultSets=true",
- "MP.Prog": "Server=localhost\\SQLEXPRESS;Database=MoonPro_PROG;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.PROG;"
+ "DetailedErrors": true,
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
}
+ },
+ "AllowedHosts": "*",
+ "ConnectionStrings": {
+ "DefaultConnection": "Server=localhost\\SQLEXPRESS;Database=MoonPro_PROG;Trusted_Connection=True;MultipleActiveResultSets=true",
+ "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"
+ }
}
\ No newline at end of file
diff --git a/MP.Prog/appsettings.json b/MP.Prog/appsettings.json
index 397f561f..9a999d35 100644
--- a/MP.Prog/appsettings.json
+++ b/MP.Prog/appsettings.json
@@ -60,6 +60,12 @@
},
"ServerConf": {
"BaseUrl": "/MP/PROG",
- "FolderBasePath": "\\\\stor01"
+ "FolderBasePath": "\\\\stor01",
+ "Prog.ApiUrl": "https://iis01.egalware.com/MP/PROG"
+ },
+ "SpecialConf": {
+ "TaskManConn": "MP.Prog",
+ "CodApp": "MP-PROG",
+ "CodModulo": "MP-PROG"
}
}
\ No newline at end of file
diff --git a/MP.Stats/MP.Stats.csproj b/MP.Stats/MP.Stats.csproj
index c4724fd6..5da2b4d3 100644
--- a/MP.Stats/MP.Stats.csproj
+++ b/MP.Stats/MP.Stats.csproj
@@ -4,8 +4,8 @@
net6.0
MP.Stats
826e877c-ba70-4253-84cb-d0b1cafd4440
- 6.16.2410.2809
- 6.16.2410.2809
+ 6.16.2410.2810
+ 6.16.2410.2810
true
$(NoWarn);1591
diff --git a/MP.Stats/Program.cs b/MP.Stats/Program.cs
index 5d5f9eab..1197542d 100644
--- a/MP.Stats/Program.cs
+++ b/MP.Stats/Program.cs
@@ -25,9 +25,9 @@ namespace MP.Stats
{
logging.ClearProviders();
logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Information);
- //logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace);
})
- .UseNLog();
+ // importante per eseguire la conf logging
+ .UseNLog(new NLogAspNetCoreOptions() { RemoveLoggerFactoryFilter = false });
public static void Main(string[] args)
{
@@ -47,7 +47,7 @@ namespace MP.Stats
}
finally
{
- NLog.LogManager.Shutdown();
+ LogManager.Shutdown();
}
}
diff --git a/MP.Stats/Resources/ChangeLog.html b/MP.Stats/Resources/ChangeLog.html
index 241b3faa..724026a2 100644
--- a/MP.Stats/Resources/ChangeLog.html
+++ b/MP.Stats/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo statistiche MAPO
-
Versione: 6.16.2410.2809
+ Versione: 6.16.2410.2810
Note di rilascio:
diff --git a/MP.Stats/Resources/VersNum.txt b/MP.Stats/Resources/VersNum.txt
index c71112a4..20d6919c 100644
--- a/MP.Stats/Resources/VersNum.txt
+++ b/MP.Stats/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2410.2809
+6.16.2410.2810
diff --git a/MP.Stats/Resources/manifest.xml b/MP.Stats/Resources/manifest.xml
index ffc5d1d8..60567bd2 100644
--- a/MP.Stats/Resources/manifest.xml
+++ b/MP.Stats/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2410.2809
+ 6.16.2410.2810
https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/MP.Stats.zip
https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/ChangeLog.html
false
diff --git a/MP.TaskMan/Controllers/MpTaskController.cs b/MP.TaskMan/Controllers/MpTaskController.cs
index df89074f..f29ce8bc 100644
--- a/MP.TaskMan/Controllers/MpTaskController.cs
+++ b/MP.TaskMan/Controllers/MpTaskController.cs
@@ -73,24 +73,6 @@ namespace MP.TaskMan.Controllers
return dtNext;
}
- ///
- /// Elenco da tabella Config
- ///
- ///
- public List ConfigGetAll()
- {
- List dbResult = new List();
- using (var dbCtx = new TaskContext(_configuration))
- {
- dbResult = dbCtx
- .DbSetConfig
- .AsNoTracking()
- .OrderBy(x => x.Chiave)
- .ToList();
- }
- return dbResult;
- }
-
public void Dispose()
{
_configuration = null;
diff --git a/MP.TaskMan/MP.TaskMan.csproj b/MP.TaskMan/MP.TaskMan.csproj
index a778c4ab..927dbdfd 100644
--- a/MP.TaskMan/MP.TaskMan.csproj
+++ b/MP.TaskMan/MP.TaskMan.csproj
@@ -16,7 +16,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/MP.TaskMan/Migrations/20241028095512_InitTaskMan.Designer.cs b/MP.TaskMan/Migrations/20241028095512_InitTaskMan.Designer.cs
new file mode 100644
index 00000000..16a20a42
--- /dev/null
+++ b/MP.TaskMan/Migrations/20241028095512_InitTaskMan.Designer.cs
@@ -0,0 +1,123 @@
+//
+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("20241028095512_InitTaskMan")]
+ partial class InitTaskMan
+ {
+ 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("TaskExecId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("TaskExecId"), 1L, 1);
+
+ b.Property("DtEnd")
+ .HasColumnType("datetime2");
+
+ b.Property("DtStart")
+ .HasColumnType("datetime2");
+
+ b.Property("IsError")
+ .HasColumnType("bit");
+
+ b.Property("Result")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TaskId")
+ .HasColumnType("int");
+
+ b.HasKey("TaskExecId");
+
+ b.HasIndex("TaskId");
+
+ b.ToTable("TaskExec");
+ });
+
+ modelBuilder.Entity("MP.TaskMan.Models.TaskListModel", b =>
+ {
+ b.Property("TaskId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("TaskId"), 1L, 1);
+
+ b.Property("Args")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Cad")
+ .HasColumnType("int");
+
+ b.Property("Command")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Descript")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DtLastExec")
+ .HasColumnType("datetime2");
+
+ b.Property("DtNextExec")
+ .HasColumnType("datetime2");
+
+ b.Property("Freq")
+ .HasColumnType("int");
+
+ b.Property("LastDuration")
+ .HasColumnType("float");
+
+ b.Property("LastIsError")
+ .HasColumnType("bit");
+
+ b.Property("LastResult")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Name")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Ordinal")
+ .HasColumnType("int");
+
+ b.Property("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
+ }
+ }
+}
diff --git a/MP.TaskMan/Migrations/20241028095512_InitTaskMan.cs b/MP.TaskMan/Migrations/20241028095512_InitTaskMan.cs
new file mode 100644
index 00000000..209adc79
--- /dev/null
+++ b/MP.TaskMan/Migrations/20241028095512_InitTaskMan.cs
@@ -0,0 +1,75 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace MP.TaskMan.Migrations
+{
+ public partial class InitTaskMan : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "TaskList",
+ columns: table => new
+ {
+ TaskId = table.Column(type: "int", nullable: false)
+ .Annotation("SqlServer:Identity", "1, 1"),
+ Ordinal = table.Column(type: "int", nullable: false),
+ Name = table.Column(type: "nvarchar(max)", nullable: true),
+ Descript = table.Column(type: "nvarchar(max)", nullable: true),
+ TType = table.Column(type: "int", nullable: false),
+ Command = table.Column(type: "nvarchar(max)", nullable: true),
+ Args = table.Column(type: "nvarchar(max)", nullable: true),
+ Freq = table.Column(type: "int", nullable: false),
+ Cad = table.Column(type: "int", nullable: false),
+ DtLastExec = table.Column(type: "datetime2", nullable: false),
+ DtNextExec = table.Column(type: "datetime2", nullable: false),
+ LastDuration = table.Column(type: "float", nullable: false),
+ LastIsError = table.Column(type: "bit", nullable: false),
+ LastResult = table.Column(type: "nvarchar(max)", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_TaskList", x => x.TaskId);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "TaskExec",
+ columns: table => new
+ {
+ TaskExecId = table.Column(type: "int", nullable: false)
+ .Annotation("SqlServer:Identity", "1, 1"),
+ TaskId = table.Column(type: "int", nullable: false),
+ DtStart = table.Column(type: "datetime2", nullable: false),
+ DtEnd = table.Column(type: "datetime2", nullable: false),
+ IsError = table.Column(type: "bit", nullable: false),
+ Result = table.Column(type: "nvarchar(max)", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_TaskExec", x => x.TaskExecId);
+ table.ForeignKey(
+ name: "FK_TaskExec_TaskList_TaskId",
+ column: x => x.TaskId,
+ principalTable: "TaskList",
+ principalColumn: "TaskId",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_TaskExec_TaskId",
+ table: "TaskExec",
+ column: "TaskId");
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "TaskExec");
+
+ migrationBuilder.DropTable(
+ name: "TaskList");
+ }
+ }
+}
diff --git a/MP.TaskMan/Migrations/TaskContextModelSnapshot.cs b/MP.TaskMan/Migrations/TaskContextModelSnapshot.cs
new file mode 100644
index 00000000..400856cb
--- /dev/null
+++ b/MP.TaskMan/Migrations/TaskContextModelSnapshot.cs
@@ -0,0 +1,121 @@
+//
+using System;
+using MP.TaskMan;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace MP.TaskMan.Migrations
+{
+ [DbContext(typeof(TaskContext))]
+ partial class TaskContextModelSnapshot : ModelSnapshot
+ {
+ protected override void BuildModel(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("TaskExecId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("TaskExecId"), 1L, 1);
+
+ b.Property("DtEnd")
+ .HasColumnType("datetime2");
+
+ b.Property("DtStart")
+ .HasColumnType("datetime2");
+
+ b.Property("IsError")
+ .HasColumnType("bit");
+
+ b.Property("Result")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TaskId")
+ .HasColumnType("int");
+
+ b.HasKey("TaskExecId");
+
+ b.HasIndex("TaskId");
+
+ b.ToTable("TaskExec");
+ });
+
+ modelBuilder.Entity("MP.TaskMan.Models.TaskListModel", b =>
+ {
+ b.Property("TaskId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("TaskId"), 1L, 1);
+
+ b.Property("Args")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Cad")
+ .HasColumnType("int");
+
+ b.Property("Command")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Descript")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DtLastExec")
+ .HasColumnType("datetime2");
+
+ b.Property("DtNextExec")
+ .HasColumnType("datetime2");
+
+ b.Property("Freq")
+ .HasColumnType("int");
+
+ b.Property("LastDuration")
+ .HasColumnType("float");
+
+ b.Property("LastIsError")
+ .HasColumnType("bit");
+
+ b.Property("LastResult")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Name")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Ordinal")
+ .HasColumnType("int");
+
+ b.Property("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
+ }
+ }
+}
diff --git a/MP.TaskMan/Models/ConfigModel.cs b/MP.TaskMan/Models/ConfigModel.cs
deleted file mode 100644
index 837c2c8d..00000000
--- a/MP.TaskMan/Models/ConfigModel.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations.Schema;
-
-#nullable disable
-//
-// This is here so CodeMaid doesn't reorganize this document
-//
-namespace MP.TaskMan.Models
-{
- [Table("Config")]
- public partial class ConfigModel
- {
- public string Chiave { get; set; }
- public string Valore { get; set; }
- ///
- /// Valore di default/riferimento per la variabile
- ///
- public string ValoreStd { get; set; }
- public string Note { get; set; }
- }
-}
diff --git a/MP.TaskMan/TaskContext.cs b/MP.TaskMan/TaskContext.cs
index 23222716..06720d9a 100644
--- a/MP.TaskMan/TaskContext.cs
+++ b/MP.TaskMan/TaskContext.cs
@@ -23,6 +23,16 @@ namespace MP.TaskMan
#region Public Constructors
+ private bool DesignTime = false;
+
+ [Obsolete("Impiegato solo x DB migrations", false)]
+ public TaskContext()
+ {
+#if DEBUG
+ DesignTime = true;
+#endif
+ }
+
public TaskContext(IConfiguration configuration)
{
_configuration = configuration;
@@ -37,8 +47,6 @@ namespace MP.TaskMan
#region Public Properties
- public virtual DbSet DbSetConfig { get; set; }
-
public virtual DbSet DbSetTaskList { get; set; }
public virtual DbSet DbSetTaskExe { get; set; }
public virtual DbSet DbSetTaskResult { get; set; }
@@ -58,11 +66,19 @@ namespace MP.TaskMan
{
if (!optionsBuilder.IsConfigured)
{
- // recupero la connString tra i candidati...
- string connString = ConnStringGetFirst();
+ string connString = "";
+ if (DesignTime)
+ {
+ connString = "Server=SQL2016DEV; Database=MoonPro_PROG; Trusted_Connection=True;";
+ }
+ else
+ {
+ // recupero la connString tra i candidati...
+ connString = ConnStringGetFirst();
+ }
// avvio con stringa connessione trovata
optionsBuilder.UseSqlServer(connString);
- //optionsBuilder.UseSqlServer("Server=SQL2016DEV; Database=MoonPro; Trusted_Connection=True;");
+ //optionsBuilder.UseSqlServer("Server=SQL2016DEV; Database=MoonPro_PROG; Trusted_Connection=True;");
}
}
@@ -75,7 +91,7 @@ namespace MP.TaskMan
// in primis cerco se c'è la conf di quale connString usare per il programma specifico
string scTaskConn = _configuration.GetValue("SpecialConf:TaskManConn");
string connString = _configuration.GetConnectionString(scTaskConn);
-
+
// altrimenti ciclo tra le conf alternative standard la + specifica
if (string.IsNullOrEmpty(connString))
{
@@ -109,25 +125,6 @@ namespace MP.TaskMan
{
modelBuilder.HasAnnotation("Relational:Collation", "SQL_Latin1_General_CP1_CI_AS");
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => e.Chiave);
-
- entity.ToTable("Config");
-
- entity.Property(e => e.Chiave)
- .HasMaxLength(50)
- .HasColumnName("chiave");
-
- entity.Property(e => e.Note).HasColumnName("note");
-
- entity.Property(e => e.Valore).HasColumnName("valore");
-
- entity.Property(e => e.ValoreStd)
- .HasColumnName("valoreStd")
- .HasComment("Valore di default/riferimento per la variabile");
- });
-
OnModelCreatingPartial(modelBuilder);
}
diff --git a/MP.TaskMan/TaskList.razor.cs b/MP.TaskMan/TaskList.razor.cs
index 44cfa91e..5dda83fa 100644
--- a/MP.TaskMan/TaskList.razor.cs
+++ b/MP.TaskMan/TaskList.razor.cs
@@ -246,7 +246,7 @@ namespace MP.TaskMan
{
isLoading = true;
MaxVal = 2;
- clearFile();
+ CleanupDir();
await advStep(1);
numRecord = 10;
await ReloadData();
@@ -256,7 +256,7 @@ namespace MP.TaskMan
protected void ResetData()
{
- clearFile();
+ CleanupDir();
TService.rollBackEdit(currRecord);
currRecord = null;
}
@@ -334,8 +334,13 @@ namespace MP.TaskMan
return answ;
}
- private async void clearFile()
+ private async void CleanupDir()
{
+ var parentDir = Directory.GetParent(fullPath).FullName;
+ if (!Directory.Exists(parentDir))
+ {
+ Directory.CreateDirectory(parentDir);
+ }
await Task.Run(() => File.Delete(fullPath));
}