Inizio fix gestione reparti
This commit is contained in:
@@ -95,7 +95,7 @@
|
||||
{
|
||||
<tr class="@CheckSelect(record)">
|
||||
<td class="text-nowrap">
|
||||
@if(EditRec==null)
|
||||
@if (EditRec == null)
|
||||
{
|
||||
<button @onclick="() => DoSelect(record)" class="btn btn-primary btn-sm" title="Seleziona Record"><i class="bi bi-search"></i></button>
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.JSInterop;
|
||||
using MP.AppAuth.Services;
|
||||
using MP.Core.DTO;
|
||||
using MP.Data.DbModels;
|
||||
using MP.SPEC.Data;
|
||||
using MP.AppAuth.Services;
|
||||
|
||||
namespace MP.SPEC.Components.Reparti
|
||||
{
|
||||
@@ -157,7 +156,7 @@ namespace MP.SPEC.Components.Reparti
|
||||
SelEnabled = selRec.SelEnabled,
|
||||
TipoGruppo = selRec.TipoGruppo
|
||||
};
|
||||
MDService.AnagGruppiDelete(rec2Del);
|
||||
await MDService.AnagGruppiDeleteAsync(rec2Del);
|
||||
EditRec = null;
|
||||
await EC_RecordUpdated.InvokeAsync(true);
|
||||
}
|
||||
@@ -176,6 +175,7 @@ namespace MP.SPEC.Components.Reparti
|
||||
private async Task DoSelect(RepartiDTO currRec)
|
||||
{
|
||||
// seleziona
|
||||
EditRec = null;
|
||||
SelRecord = currRec;
|
||||
await EC_RecordSel.InvokeAsync(currRec.CodGruppo);
|
||||
}
|
||||
@@ -183,7 +183,7 @@ namespace MP.SPEC.Components.Reparti
|
||||
private async Task DoUpdate(AnagGruppiModel UpdRec)
|
||||
{
|
||||
// salvo...
|
||||
MDService.AnagGruppiUpsert(UpdRec);
|
||||
await MDService.AnagGruppiUpsertAsync(UpdRec);
|
||||
EditRec = null;
|
||||
await EC_RecordUpdated.InvokeAsync(true);
|
||||
}
|
||||
@@ -192,6 +192,7 @@ namespace MP.SPEC.Components.Reparti
|
||||
{
|
||||
SelRecord = null;
|
||||
EditRec = null;
|
||||
UpdateTable();
|
||||
await EC_RecordSel.InvokeAsync("");
|
||||
}
|
||||
|
||||
|
||||
@@ -186,17 +186,16 @@ namespace MP.SPEC.Data
|
||||
/// Delete record AnagraficaGruppi
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool AnagGruppiDelete(AnagGruppiModel updRec)
|
||||
public async Task<bool> AnagGruppiDeleteAsync(AnagGruppiModel updRec)
|
||||
{
|
||||
using var activity = ActivitySource.StartActivity("AnagGruppiDelete");
|
||||
using var activity = ActivitySource.StartActivity("AnagGruppiDeleteAsync");
|
||||
bool result = false;
|
||||
result = dbController.AnagGruppiDelete(updRec);
|
||||
// elimino cache redis...
|
||||
string pattern = $"{Utils.redisAnagGruppi}:*";
|
||||
bool answ = ExecFlushRedisPattern(pattern);
|
||||
activity?.SetTag("data.source", "DB+REDIS");
|
||||
await FlushCacheByTagAsync(Utils.redisAnagGruppi);
|
||||
activity?.SetTag("data.source", "DB");
|
||||
activity?.Stop();
|
||||
LogTrace($"AnagGruppiDelete | CodGruppo {updRec.CodGruppo} | {activity?.Duration.TotalMilliseconds}ms");
|
||||
LogTrace($"AnagGruppiDeleteAsync | CodGruppo {updRec.CodGruppo} | {activity?.Duration.TotalMilliseconds}ms");
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -205,17 +204,16 @@ namespace MP.SPEC.Data
|
||||
/// </summary>
|
||||
/// <param name="UpdRec"></param>
|
||||
/// <returns></returns>
|
||||
public bool AnagGruppiUpsert(AnagGruppiModel UpdRec)
|
||||
public async Task<bool> AnagGruppiUpsertAsync(AnagGruppiModel UpdRec)
|
||||
{
|
||||
using var activity = ActivitySource.StartActivity("AnagGruppiUpsert");
|
||||
using var activity = ActivitySource.StartActivity("AnagGruppiUpsertAsync");
|
||||
bool result = false;
|
||||
result = dbController.AnagGruppiUpsert(UpdRec);
|
||||
// elimino cache redis...
|
||||
string pattern = $"{Utils.redisAnagGruppi}:*";
|
||||
bool answ = ExecFlushRedisPattern(pattern);
|
||||
activity?.SetTag("data.source", "DB+REDIS");
|
||||
await FlushCacheByTagAsync(Utils.redisAnagGruppi);
|
||||
activity?.SetTag("data.source", "DB");
|
||||
activity?.Stop();
|
||||
LogTrace($"AnagGruppiUpsert | CodGruppo {UpdRec.CodGruppo} | {activity?.Duration.TotalMilliseconds}ms");
|
||||
LogTrace($"AnagGruppiUpsertAsync | CodGruppo {UpdRec.CodGruppo} | {activity?.Duration.TotalMilliseconds}ms");
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.SPEC</RootNamespace>
|
||||
<Version>8.16.2605.2912</Version>
|
||||
<Version>8.16.2605.3007</Version>
|
||||
<UserSecretsId>1800a78a-6ff1-40f9-b490-87fb8bfc1394</UserSecretsId>
|
||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -62,15 +62,9 @@ namespace MP.SPEC.Pages
|
||||
get => string.IsNullOrWhiteSpace(SearchVal) ? "btn-secondary" : "btn-primary";
|
||||
}
|
||||
|
||||
private string CssMain
|
||||
{
|
||||
get => ShowDetail ? "col-4" : "col-12";
|
||||
}
|
||||
private string CssMain => ShowDetail ? "col-4" : "col-12";
|
||||
|
||||
private bool ShowDetail
|
||||
{
|
||||
get => !string.IsNullOrEmpty(CodGruppo);
|
||||
}
|
||||
private bool ShowDetail => !string.IsNullOrEmpty(CodGruppo);
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
@@ -134,10 +128,10 @@ namespace MP.SPEC.Pages
|
||||
|
||||
private async Task SetCodGruppo(string CodGruppoSel)
|
||||
{
|
||||
isLoading = true;
|
||||
//isLoading = true;
|
||||
CodGruppo = CodGruppoSel;
|
||||
await ReloadDetailAsync();
|
||||
isLoading = false;
|
||||
//isLoading = false;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 8.16.2605.2912</h4>
|
||||
<h4>Versione: 8.16.2605.3007</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
8.16.2605.2912
|
||||
8.16.2605.3007
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>8.16.2605.2912</version>
|
||||
<version>8.16.2605.3007</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>
|
||||
|
||||
Reference in New Issue
Block a user