Files
mapo-core/MP.INVE/Components/ProcSuggestion.razor.cs
T
2022-11-23 17:32:52 +01:00

56 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.INVE;
using MP.INVE.Shared;
using MP.INVE.Components;
using MP.INVE.Data;
using MP.Data.DatabaseModels;
namespace MP.INVE.Components
{
public partial class ProcSuggestion
{
[Inject]
private MiDataService MIService { get; set; } = null!;
[Parameter]
public SelectScanParams currParams { get; set; } = null!;
protected string rawScan
{
get => currParams.UDC;
set => currParams.UDC = value;
}
private string tipo { get; set; } = "";
public List<AnagUdcModel>? searchrecords;
public AnagUdcModel? udc;
protected override async Task OnParametersSetAsync()
{
//await FilterChanged.InvokeAsync(actFilter);
await Task.Delay(1);
searchrecords = MIService.ElencoUDC();
udc = searchrecords.Where(x => x.UDC == rawScan).FirstOrDefault();
if (udc != null)
{
if (udc.UDC.Contains("MFI"))
{
tipo = "FINITO";
}
}
}
}
}