54 lines
1.2 KiB
C#
54 lines
1.2 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using MP.AppAuth.Models;
|
|
using MP.Data.DbModels;
|
|
using MP.SPEC.Data;
|
|
|
|
namespace MP.SPEC.Pages
|
|
{
|
|
public partial class Index
|
|
{
|
|
#region Public Properties
|
|
|
|
public List<LinkMenuModel>? ElencoLink { get; set; }
|
|
|
|
#endregion Public Properties
|
|
|
|
#region Protected Properties
|
|
|
|
[Inject]
|
|
protected MpDataService MDService { get; set; } = null!;
|
|
|
|
[Inject]
|
|
protected MsgServiceSpec MsgService { get; set; } = null!;
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
/// <summary>
|
|
/// Verifica ruolo utente
|
|
/// </summary>
|
|
/// <param name="Ruolo"></param>
|
|
/// <returns></returns>
|
|
protected bool HasRole(string Ruolo)
|
|
{
|
|
return MsgService.HasRole(Ruolo);
|
|
}
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
// recupero elenco link
|
|
ElencoLink = MDService.ElencoLink();
|
|
currAzienda = await MDService.ConfigTryGetAsync("AZIENDA");
|
|
await Task.Delay(1);
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
|
|
#region Private Fields
|
|
|
|
private string currAzienda = "";
|
|
|
|
#endregion Private Fields
|
|
}
|
|
} |