Inizio setup repository

This commit is contained in:
Samuele Locatelli
2026-06-01 16:43:40 +02:00
parent 3ea4b77827
commit 5c20387e1d
21 changed files with 738 additions and 96 deletions
+1 -2
View File
@@ -103,8 +103,7 @@ namespace MP.SPEC.Components
}
}
MDService.ActionSetReqAsync(CurrAction);
await Task.Delay(1);
await MDService.ActionSetReqAsync(CurrAction);
// se fatto --> ricarico!
if (fatto)
{
+5 -1
View File
@@ -6,6 +6,7 @@ using MP.Data;
using MP.Data.Controllers;
using MP.Data.DbModels;
using MP.Data.MgModels;
using MP.Data.Repository.Anag;
using MP.Data.Services;
using Newtonsoft.Json;
using NLog;
@@ -20,11 +21,14 @@ namespace MP.SPEC.Data
{
#region Public Constructors
public MpDataService(IConfiguration configuration, IFusionCache cache)
private readonly IAnagRepository _anagRepository;
public MpDataService(IConfiguration configuration, IFusionCache cache, IAnagRepository anagRepository)
{
// salvataggio oggetti
_configuration = configuration;
_cache = cache;
_anagRepository = anagRepository;
// Verifica conf trace...
traceEnabled = _configuration.GetValue<bool>("Otel:EnableTracing", false);
slowLogThresh = _configuration.GetValue<double>("ServerConf:slowLogThresh", 1);
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.SPEC</RootNamespace>
<Version>8.16.2606.113</Version>
<Version>8.16.2606.116</Version>
<UserSecretsId>1800a78a-6ff1-40f9-b490-87fb8bfc1394</UserSecretsId>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
</PropertyGroup>
+1 -1
View File
@@ -29,7 +29,7 @@
<div class="col-4">
</div>
<div class="col-4">
<button class="btn btn-success" @onclick="() => sendMessage()">SEND MESSAGE</button>
<button class="btn btn-success" @onclick="() => SendMessageAsync()">SEND MESSAGE</button>
</div>
<div class="col-4">
<button class="btn btn-warning" @onclick="() => clearMessage()">CLEAR</button>
+4 -4
View File
@@ -38,8 +38,8 @@ namespace MP.SPEC.Pages
CurrAction.IsActive = false;
CurrAction.Topic = "Chiusura ODL";
CurrAction.Message = "Rilevato possibile fine operazioni, Vuoi chiudere la commessa?";
MMDataService.ActionSetReqAsync(CurrAction);
await Task.Delay(1);
await MMDataService.ActionSetReqAsync(CurrAction);
}
protected override async Task OnInitializedAsync()
@@ -68,11 +68,11 @@ namespace MP.SPEC.Pages
}
}
protected void sendMessage()
protected async Task SendMessageAsync()
{
CurrAction.DtReq = DateTime.Now;
CurrAction.IsActive = true;
MMDataService.ActionSetReqAsync(CurrAction);
await MMDataService.ActionSetReqAsync(CurrAction);
}
#endregion Protected Methods
+23 -6
View File
@@ -1,9 +1,10 @@
using Microsoft.AspNetCore.Authentication.Negotiate;
using Microsoft.AspNetCore.StaticFiles;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Diagnostics;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.FileProviders;
using MP.AppAuth.Services;
using MP.Data.Services;
using MP.Data;
using MP.SPEC.Components;
using MP.SPEC.Data;
using MP.SPEC.Services;
@@ -155,20 +156,36 @@ builder.Services.AddFusionCache()
ConnectionMultiplexerFactory = () => Task.FromResult(redisMultiplexer)
}));
// Metodi principali x accesso dati
var connStr = builder.Configuration.GetConnectionString("MP.Data")
?? throw new InvalidOperationException("ConnString 'MP.Data' mancante.");
// aggiungo il costruttore x i DbContextFactory
builder.Services.AddDbContextFactory<MoonProContext>(options =>
options.UseSqlServer(connStr)
.EnableSensitiveDataLogging(false) // true solo in Sviluppo
.ConfigureWarnings(w => w.Ignore(CoreEventId.ManyServiceProvidersCreatedWarning)));
// MP.Data Services Utils - Statistiche DB
builder.Services.AddSpecDataLayer();
// altri servizi
builder.Services.AddSingleton<MpDataService>();
builder.Services.AddSingleton<ListSelectDataSrv>();
builder.Services.AddSingleton<IOApiService>();
builder.Services.AddSingleton<AppAuthService>();
builder.Services.AddScoped<MsgServiceSpec>();
#if false
builder.Services.AddSingleton<AppAuthService>();
builder.Services.AddSingleton<ListSelectDataSrv>();
builder.Services.AddSingleton<SharedMemService>();
builder.Services.AddSingleton<TabDataService>();
builder.Services.AddSingleton<TabDataFeeder>();
builder.Services.AddSingleton<TabDataFeeder>();
#endif
#if false
// aggiunta helper local/session storage service
builder.Services.AddScoped<ISessionStorageService, SessionStorageService>();
builder.Services.AddScoped<ILocalStorageService, LocalStorageService>();
builder.Services.AddScoped<ILocalStorageService, LocalStorageService>();
#endif
builder.Services.AddHttpClient();
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 8.16.2606.113</h4>
<h4>Versione: 8.16.2606.116</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
8.16.2606.113
8.16.2606.116
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>8.16.2606.113</version>
<version>8.16.2606.116</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>