Files
mapo-core/MP.INVE/Pages/Test.razor.cs
T
zaccaria.majid 0e9fff8cf2 test
2022-12-07 12:25:24 +01:00

66 lines
2.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.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<AnagUdcModel>? 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}", "21MFI000000017");
await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{104}");
await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{104}", "M200000019");
await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{105}");
await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{105}", "M210000055");
await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{106}");
await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{106}", "027407");
await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{107}");
await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{107}", "ABCDE");
}
}
private string CodUDC { get; set; } = null!;
}
}