- Aggiunta bozza print MAG
- Inizio review servizi sahred (es config da DB)
This commit is contained in:
Samuele Locatelli
2023-10-03 19:30:26 +02:00
parent fa843c5d86
commit 34b6a4d371
7 changed files with 140 additions and 10 deletions
+14 -4
View File
@@ -9,9 +9,9 @@ using System.Text;
namespace MP.Data.Services
{
public class SharedMemService
public class SharedMemService
{
#region Public Properties
/// <summary>
@@ -24,6 +24,11 @@ namespace MP.Data.Services
/// </summary>
public Dictionary<string, List<LinkMenu>> DictMenu { get; set; } = new Dictionary<string, List<LinkMenu>>();
/// <summary>
/// List configurazione attiva da tab DB
/// </summary>
public List<ConfigModel> DbConfig { get; set; } = new List<ConfigModel>();
#endregion Public Properties
public bool MenuOk
@@ -55,13 +60,18 @@ namespace MP.Data.Services
var currMenu = AllMenuData
.Where(x => x.TipoLink == item)
.ToList();
if(!DictMenu.ContainsKey(item))
if (!DictMenu.ContainsKey(item))
{
DictMenu.Add(item, currMenu);
}
}
}
public void SetConfig(List<ConfigModel>? newConfList)
{
DbConfig = newConfList ?? new List<ConfigModel>();
}
/// <summary>
/// Restituisce il livello pagina dato URL
/// - se contiene ?IdxMacc --&gt; T2D (detail)
@@ -73,7 +83,7 @@ namespace MP.Data.Services
{
string answ = "T2H";
var urlPart = fullUrl.Split("/");
string pageUrl=urlPart.Last().ToLower();
string pageUrl = urlPart.Last().ToLower();
// cerco nell'elenco...
if (AllMenuData.Count > 0)
{