Files
mapo-core/MP.SPEC/Pages/Index.razor.cs
T
2022-08-01 09:44:14 +02:00

52 lines
1.5 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using System.Net.Http;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Components.Forms;
using Microsoft.AspNetCore.Components.Routing;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.Web.Virtualization;
using Microsoft.JSInterop;
using MP.SPEC;
using MP.SPEC.Shared;
using MP.SPEC.Components;
using MP.SPEC.Data;
using MP.Data.DatabaseModels;
namespace MP.SPEC.Pages
{
public partial class Index
{
public List<LinkMenu>? ElencoLink { get; set; }
[Inject]
protected MpDataService MDService { get; set; } = null!;
private List<ConfigModel>? configData { get; set; } = null;
private string currAzienda = "";
//[Inject]
//protected MessageService MessageService { get; set; }
protected override async Task OnInitializedAsync()
{
// recupero elenco JQM
ElencoLink = await MDService.ElencoLink();
configData = await MDService.ConfigGetAll();
if (configData != null)
{
var currRec = configData.FirstOrDefault(x => x.Chiave == "AZIENDA");
if (currRec != null)
{
currAzienda = currRec.Valore;
}
}
await Task.Delay(1);
}
}
}