diff --git a/MP.AppAuth/Controllers/MPController .cs b/MP.AppAuth/Controllers/MPController .cs
index 6245b06a..ef49774c 100644
--- a/MP.AppAuth/Controllers/MPController .cs
+++ b/MP.AppAuth/Controllers/MPController .cs
@@ -1,4 +1,5 @@
-using Microsoft.Extensions.Configuration;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.Extensions.Configuration;
using MP.AppAuth.Models;
using NLog;
using System;
@@ -42,6 +43,58 @@ namespace MP.AppAuth.Controllers
}
return dbResult;
}
+ ///
+ /// Elenco Record x AnagKeyValue
+ ///
+ ///
+ public bool AnagKeyValuesDelete(string NomeVar)
+ {
+ bool fatto = false;
+ using (MoonProContext localDbCtx = new MoonProContext(_configuration))
+ {
+ var rec2del = localDbCtx
+ .DbSetAnagKeyValues
+ .Where(x => x.NomeVar == NomeVar)
+ .FirstOrDefault();
+ if (rec2del != null)
+ {
+ localDbCtx.Remove(rec2del);
+ var res = localDbCtx.SaveChanges();
+ fatto = res > 0;
+ }
+ }
+ return fatto;
+ }
+ ///
+ /// Upsert AnagKeyValue
+ ///
+ ///
+ public bool AnagKeyValuesUpsert(AnagKeyValueModel newRec)
+ {
+ bool fatto = false;
+ using (MoonProContext localDbCtx = new MoonProContext(_configuration))
+ {
+ var currRec = localDbCtx
+ .DbSetAnagKeyValues
+ .Where(x => x.NomeVar == newRec.NomeVar)
+ .FirstOrDefault();
+ if (currRec != null)
+ {
+ currRec.Descrizione = newRec.Descrizione;
+ currRec.ValInt = newRec.ValInt;
+ currRec.ValFloat = newRec.ValFloat;
+ currRec.ValString = newRec.ValString;
+ localDbCtx.Entry(currRec).State = EntityState.Modified;
+ }
+ else
+ {
+ localDbCtx.DbSetAnagKeyValues.Add(newRec);
+ }
+ var res = localDbCtx.SaveChanges();
+ fatto = res > 0;
+ }
+ return fatto;
+ }
///
/// Elenco Record x Config
diff --git a/MP.AppAuth/DTO/CompAnagKeyVal.cs b/MP.AppAuth/DTO/CompAnagKeyVal.cs
index 404f59d9..2cf38aa0 100644
--- a/MP.AppAuth/DTO/CompAnagKeyVal.cs
+++ b/MP.AppAuth/DTO/CompAnagKeyVal.cs
@@ -10,6 +10,7 @@ namespace MP.AppAuth.DTO
public class CompAnagKeyVal
{
public int Idx { get; set; } = 0;
+ public string NomeVar { get; set; } = "";
public AnagKeyValueModel? Source { get; set; } = null;
public AnagKeyValueModel? Dest { get; set; } = null;
diff --git a/MP.Land/Components/CmpCompType.razor b/MP.Land/Components/CmpCompType.razor
new file mode 100644
index 00000000..d659c619
--- /dev/null
+++ b/MP.Land/Components/CmpCompType.razor
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/MP.Land/Components/CmpCompType.razor.cs b/MP.Land/Components/CmpCompType.razor.cs
new file mode 100644
index 00000000..dd5e1124
--- /dev/null
+++ b/MP.Land/Components/CmpCompType.razor.cs
@@ -0,0 +1,90 @@
+using Microsoft.AspNetCore.Components;
+using System.Threading.Tasks;
+
+namespace MP.Land.Components
+{
+ public partial class CmpCompType
+ {
+ #region Public Properties
+
+ [Parameter]
+ public EventCallback EC_filtUpd { get; set; }
+
+ #endregion Public Properties
+
+ #region Public Classes
+
+ public class Display
+ {
+ #region Public Properties
+
+ public bool Dx { get; set; } = true;
+ public bool Equal { get; set; } = true;
+ public bool Diff { get; set; } = true;
+ public bool Sx { get; set; } = true;
+
+ #endregion Public Properties
+ }
+
+ #endregion Public Classes
+
+ #region Protected Properties
+
+ protected string cssDx
+ {
+ get => CurrDisp.Dx ? "btn-danger" : "btn-secondary";
+ }
+
+ protected string cssEq
+ {
+ get => CurrDisp.Equal ? "btn-info" : "btn-secondary";
+ }
+ protected string cssDiff
+ {
+ get => CurrDisp.Diff ? "btn-primary" : "btn-secondary";
+ }
+
+ protected string cssSx
+ {
+ get => CurrDisp.Sx ? "btn-success" : "btn-secondary";
+ }
+
+ protected Display CurrDisp { get; set; } = new Display();
+
+ #endregion Protected Properties
+
+ #region Protected Methods
+
+ protected override void OnInitialized()
+ {
+ CurrDisp = new Display();
+ }
+
+ protected async Task ToggleDx()
+ {
+ CurrDisp.Dx = !CurrDisp.Dx;
+ await EC_filtUpd.InvokeAsync(CurrDisp);
+ }
+
+ protected async Task ToggleEqual()
+ {
+ CurrDisp.Equal = !CurrDisp.Equal;
+ await EC_filtUpd.InvokeAsync(CurrDisp);
+ }
+
+ protected async Task ToggleDiff()
+ {
+ CurrDisp.Diff = !CurrDisp.Diff;
+ await EC_filtUpd.InvokeAsync(CurrDisp);
+ }
+
+
+ protected async Task ToggleSx()
+ {
+ CurrDisp.Sx = !CurrDisp.Sx;
+ await EC_filtUpd.InvokeAsync(CurrDisp);
+ }
+
+ #endregion Protected Methods
+ }
+}
\ No newline at end of file
diff --git a/MP.Land/Components/CompareAnagKeyVal.razor b/MP.Land/Components/CompareAnagKeyVal.razor
index 797b70e4..b75147ed 100644
--- a/MP.Land/Components/CompareAnagKeyVal.razor
+++ b/MP.Land/Components/CompareAnagKeyVal.razor
@@ -1,15 +1,17 @@
@if (ShowDetail)
{
-