Review LAND x preparare nuovi installers
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Options;
|
||||
using MP.AppAuth.Models;
|
||||
using NLog;
|
||||
using System;
|
||||
@@ -23,9 +24,23 @@ namespace MP.AppAuth
|
||||
{
|
||||
}
|
||||
|
||||
private DbContextOptions<AppAuthContext> _options;
|
||||
public AppAuthContext(IConfiguration configuration)
|
||||
{
|
||||
_configuration = configuration;
|
||||
string connStr = _configuration.GetConnectionString("MP.Land.Auth");
|
||||
if (string.IsNullOrEmpty(connStr))
|
||||
{
|
||||
connStr = _configuration.GetConnectionString("MP.Land");
|
||||
}
|
||||
if (string.IsNullOrEmpty(connStr))
|
||||
{
|
||||
connStr = _configuration.GetConnectionString("MP.Data");
|
||||
}
|
||||
_options = new DbContextOptionsBuilder<AppAuthContext>()
|
||||
.UseSqlServer(connStr)
|
||||
.Options;
|
||||
|
||||
try
|
||||
{
|
||||
// se non ci fosse... crea o migra!
|
||||
@@ -39,6 +54,7 @@ namespace MP.AppAuth
|
||||
|
||||
public AppAuthContext(DbContextOptions<AppAuthContext> options) : base(options)
|
||||
{
|
||||
_options = options;
|
||||
try
|
||||
{
|
||||
// se non ci fosse... crea o migra!
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using MP.AppAuth.Models;
|
||||
using NLog;
|
||||
using System;
|
||||
@@ -9,14 +10,14 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace MP.AppAuth.Controllers
|
||||
{
|
||||
public class AppAuthController : IDisposable
|
||||
public class AppAuthController
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public AppAuthController(IConfiguration configuration)
|
||||
{
|
||||
_configuration = configuration;
|
||||
dbCtx = new AppAuthContext(configuration);
|
||||
|
||||
Log.Info("Avviata classe AppAuthController");
|
||||
}
|
||||
|
||||
@@ -116,11 +117,6 @@ namespace MP.AppAuth.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Clear database context
|
||||
dbCtx.Dispose();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco completo permessi2funzione
|
||||
@@ -193,33 +189,7 @@ namespace MP.AppAuth.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public void ResetController()
|
||||
{
|
||||
dbCtx = new AppAuthContext(_configuration);
|
||||
Log.Info("Effettuato reset AppAuthController");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Annulla modifiche su una specifica entity (cancel update)
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
/// <returns></returns>
|
||||
public bool RollBackEntity(object item)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
if (dbCtx.Entry(item).State == Microsoft.EntityFrameworkCore.EntityState.Deleted || dbCtx.Entry(item).State == Microsoft.EntityFrameworkCore.EntityState.Modified)
|
||||
{
|
||||
dbCtx.Entry(item).Reload();
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione in rollBackEntity{Environment.NewLine}{exc}");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Elenco Record x gestione Update
|
||||
@@ -259,7 +229,6 @@ namespace MP.AppAuth.Controllers
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration _configuration;
|
||||
private static AppAuthContext dbCtx;
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace MP.AppAuth.Services
|
||||
};
|
||||
|
||||
// conf DB
|
||||
string connStr = _configuration.GetConnectionString("MP.Land");
|
||||
string connStr = _configuration.GetConnectionString("MP.Land.Auth");
|
||||
if (string.IsNullOrEmpty(connStr))
|
||||
{
|
||||
_logger.LogError("ConnString empty!");
|
||||
@@ -431,10 +431,6 @@ namespace MP.AppAuth.Services
|
||||
public void Dispose()
|
||||
{
|
||||
// Clear database controller
|
||||
if (dbController != null)
|
||||
{
|
||||
dbController.Dispose();
|
||||
}
|
||||
if (MpDbController != null)
|
||||
{
|
||||
MpDbController.Dispose();
|
||||
|
||||
@@ -19,7 +19,11 @@ namespace MP.Data.Controllers
|
||||
public MpLandController(IConfiguration configuration)
|
||||
{
|
||||
_configuration = configuration;
|
||||
string connStr = _configuration.GetConnectionString("MP.Data");
|
||||
string connStr = _configuration.GetConnectionString("MP.Land");
|
||||
if(string.IsNullOrEmpty(connStr))
|
||||
{
|
||||
connStr = _configuration.GetConnectionString("MP.Data");
|
||||
}
|
||||
options = new DbContextOptionsBuilder<MoonProContext>()
|
||||
.UseSqlServer(connStr)
|
||||
.Options;
|
||||
|
||||
@@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PropertyGroup>
|
||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAdCoESbxryUqXde3FfEOCTwAAAAACAAAAAAADZgAAwAAAABAAAAAFrH1vByj45Qn06hO/OH6tAAAAAASAAACgAAAAEAAAAIUK5NiEpc4lc11Op6/CLx8YAAAAMecN12fzIN9e3E8R/nu0ATe2PAsMy7M8FAAAAKbUyki2vkSFehjbpB8wCVVVa055</EncryptedPassword>
|
||||
<History>False|2026-05-08T09:06:51.2202890Z||;True|2026-05-08T10:37:55.0049896+02:00||;False|2026-05-08T10:37:05.1546068+02:00||;False|2026-05-08T10:36:33.0311629+02:00||;False|2026-05-08T10:35:55.7742437+02:00||;True|2026-04-17T19:09:49.4900600+02:00||;True|2026-04-03T12:55:15.0251473+02:00||;True|2026-04-03T10:03:02.5833820+02:00||;True|2026-04-03T09:55:55.5274684+02:00||;True|2026-04-03T09:52:44.9063312+02:00||;False|2026-04-03T09:45:49.5943015+02:00||;True|2024-11-04T08:56:17.3071781+01:00||;True|2023-02-14T17:41:26.3850692+01:00||;True|2023-02-14T17:31:39.4933399+01:00||;</History>
|
||||
<History>True|2026-05-08T09:26:08.1731328Z||;False|2026-05-08T11:06:51.2202890+02:00||;True|2026-05-08T10:37:55.0049896+02:00||;False|2026-05-08T10:37:05.1546068+02:00||;False|2026-05-08T10:36:33.0311629+02:00||;False|2026-05-08T10:35:55.7742437+02:00||;True|2026-04-17T19:09:49.4900600+02:00||;True|2026-04-03T12:55:15.0251473+02:00||;True|2026-04-03T10:03:02.5833820+02:00||;True|2026-04-03T09:55:55.5274684+02:00||;True|2026-04-03T09:52:44.9063312+02:00||;False|2026-04-03T09:45:49.5943015+02:00||;True|2024-11-04T08:56:17.3071781+01:00||;True|2023-02-14T17:41:26.3850692+01:00||;True|2023-02-14T17:31:39.4933399+01:00||;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<RootNamespace>MP.Land</RootNamespace>
|
||||
<Version>8.16.2605.0411</Version>
|
||||
<Version>8.16.2605.0811</Version>
|
||||
<Configurations>Debug;Release;Debug_LiManDebug</Configurations>
|
||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||
<RunAnalyzersDuringBuild>True</RunAnalyzersDuringBuild>
|
||||
|
||||
@@ -173,18 +173,6 @@ namespace MP.Land.Pages
|
||||
return answ;
|
||||
}
|
||||
|
||||
#if false
|
||||
protected Core.Objects.IOB_data CurrIobInfo(string idxMacc)
|
||||
{
|
||||
Core.Objects.IOB_data answ = new Core.Objects.IOB_data();
|
||||
if (DictIobInfo.ContainsKey(idxMacc))
|
||||
{
|
||||
answ = DictIobInfo[idxMacc];
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
#endif
|
||||
|
||||
protected void DataInit()
|
||||
{
|
||||
isLoading = true;
|
||||
@@ -219,17 +207,6 @@ namespace MP.Land.Pages
|
||||
return answ;
|
||||
}
|
||||
|
||||
#if false
|
||||
protected string IobExeTrim(string IdxMacchina)
|
||||
{
|
||||
string answ = MacIobConf(IdxMacchina, "IobExe");
|
||||
if (!string.IsNullOrEmpty(answ) && answ.Contains(","))
|
||||
{
|
||||
answ = answ.Substring(0, answ.IndexOf(','));
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
#endif
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
|
||||
@@ -143,11 +143,9 @@ namespace MP.Land.Pages
|
||||
private async void OnFilterUpdated()
|
||||
{
|
||||
isLoading = true;
|
||||
await Task.Delay(1);
|
||||
await InvokeAsync(StateHasChanged);
|
||||
ListRecords = null;
|
||||
currPage = 1;
|
||||
await Task.Delay(1);
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
@@ -158,7 +156,6 @@ namespace MP.Land.Pages
|
||||
await InvokeAsync(StateHasChanged);
|
||||
ListRecords = null;
|
||||
currPage = 1;
|
||||
await Task.Delay(1);
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
@@ -166,11 +163,9 @@ namespace MP.Land.Pages
|
||||
{
|
||||
isLoading = true;
|
||||
// importante altrimenti NON mostra update UI
|
||||
await Task.Delay(1);
|
||||
SearchRecords = await DataService.AnagOperByGroupList(groupName, AppMService.SearchVal);
|
||||
ListRecords = SearchRecords.Skip((currPage - 1) * numRecord).Take(numRecord).ToList();
|
||||
totalCount = SearchRecords.Count();
|
||||
await Task.Delay(1);
|
||||
isLoading = false;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo Tablet MAPO - DotNet6</i>
|
||||
<h4>Versione: 8.16.2605.0411</h4>
|
||||
<h4>Versione: 8.16.2605.0811</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2605.0411
|
||||
8.16.2605.0811
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2605.0411</version>
|
||||
<version>8.16.2605.0811</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>
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
"ConnectionStrings": {
|
||||
"DefaultConnection": "Server=SQL2016DEV;Database=MoonPro;Trusted_Connection=True;MultipleActiveResultSets=true",
|
||||
"MP.All": "Server=SQL2016DEV;Database=MoonPro;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.Land;",
|
||||
"MP.Data": "Server=SQL2016DEV;Database=MoonPro;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.Land;",
|
||||
"MP.Flux": "Server=SQL2016DEV;Database=MoonPro_FluxData;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.Land;",
|
||||
"MP.Land": "Server=SQL2016DEV;Database=MoonPro;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.Land;",
|
||||
"MP.Land.Auth": "Server=SQL2016DEV;Database=MoonPro_Anagrafica;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=MP.Land;",
|
||||
|
||||
Reference in New Issue
Block a user