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.INVE; using MP.INVE.Shared; using MP.INVE.Components; using MP.INVE.Data; using MP.Data.DatabaseModels; namespace MP.INVE.Pages { public partial class Test { [Inject] MiDataService MIService { get; set; } = null!; [Inject] IJSRuntime JSRuntime { get; set; } = null!; List? elencoUDC; protected override async Task OnInitializedAsync() { await Task.Delay(1); //elencoUDC = MIService.ElencoUDC().Take(4).ToList(); //await getId(); } protected override async Task OnAfterRenderAsync(bool firstRender) { if (firstRender) { await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{101}"); await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{101}", "20MFI000000001"); await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{102}"); await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{102}", "20MSL000000002"); await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{103}"); await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{103}", "21MFI000000013"); } } private string CodUDC { get; set; } = null!; } }