Files
mapo-core/MP.INVE/Components/ProcSuggestion.razor.cs
T
2022-12-01 18:09:17 +01:00

72 lines
1.9 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!;
#if false
[Parameter]
public SelectScanParams currParams { get; set; } = null!;
#endif
[Parameter]
public string lastScan { get; set; } = null!;
#if false
protected string rawScan
{
get => currParams.UDC;
set => currParams.UDC = value;
}
#endif
private string tipo { get; set; } = "";
public List<AnagUdcModel>? searchrecords;
public AnagUdcModel? udc;
protected override async Task OnParametersSetAsync()
{
await Task.Delay(1);
searchrecords = MIService.ElencoUDC();
udc = searchrecords.Where(x => x.UDC == lastScan).FirstOrDefault();
if (udc != null)
{
if (udc.UDC.Contains("MFI"))
{
tipo = "FINITO";
}
}
}
protected string reqArtMod = "disabilita";
protected string reqQtaMod = "disabilita";
protected void cssDisableArt()
{
reqArtMod = "";
}
protected void cssDisableQta()
{
reqQtaMod = "";
}
}
}