using Microsoft.AspNetCore.Components; using Microsoft.Extensions.Configuration; using MP.AppAuth.Models; using MP.Land.Data; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace MP.Land.Pages { public partial class UserQr : IDisposable { #region Public Methods public void Dispose() { AppMService.EA_SearchUpdated -= OnSeachUpdated; AppMService.EA_FilterUpdated -= OnFilterUpdated; ListRecords = null; GC.Collect(); } #endregion Public Methods #region Protected Fields protected string CardMessage = "User Card"; protected int totalCount = 0; #endregion Protected Fields #region Protected Properties [Inject] protected MessageService AppMService { get; set; } protected string BaseUrlTab { get => $"{Configuration["ServerConf:BaseUrl"]}{Configuration["QrJumpPath"]}"; } [Inject] protected AppAuthService DataService { get; set; } protected string Environment { get => Configuration["Environment"]; } #endregion Protected Properties #region Protected Methods protected override async Task OnInitializedAsync() { AppMService.ShowSearch = true; AppMService.PageName = "User Card"; AppMService.PageIcon = "fas fa-qrcode pr-2"; await ReloadData(); AppMService.EA_SearchUpdated += OnSeachUpdated; AppMService.EA_FilterUpdated += OnFilterUpdated; } protected async Task PagerReloadNum(int newNum) { ListRecords = null; numRecord = newNum; await ReloadData(); isLoading = false; } protected async Task PagerReloadPage(int newNum) { ListRecords = null; currPage = newNum; await ReloadData(); isLoading = false; } protected MarkupString traduci(string lemma) { MarkupString answ; //string rawHtml = "