Files
mapo-core/MP.INVE/Pages/DeleteScan.razor.cs
Samuele E. Locatelli 50d65eebaa MP.DATA, riorganizzazioni varie:
- renaming classi gestione DbModels in
- spostamento anagrafica flussi da auth a generale
2025-03-08 10:40:09 +01:00

56 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.Data.DbModels;
using MP.INVE.Data;
using Microsoft.AspNetCore.WebUtilities;
namespace MP.INVE.Pages
{
public partial class DeleteScan
{
[Inject]
MiDataService MIService { get; set; } = null!;
[Inject]
NavigationManager NavManager { get; set; } = null!;
protected void saveScan(string newScan)
{
if (!string.IsNullOrEmpty(newScan))
{
rawScan = newScan;
}
}
protected async Task deleteScan(ScanDataModel scan)
{
await MIService.deleteScansione(scan);
}
protected string rawScan { get; set; } = null!;
protected string idOpr { get; set; } = null!;
protected int sessionId { get; set; } = 0;
protected string magazzinoId { get; set; } = "";
protected override async Task OnInitializedAsync()
{
await Task.Delay(1);
var uri = NavManager.ToAbsoluteUri(NavManager.Uri);
if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("idOpr", out var _matrOpr) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("idSess", out var _inveSessionId) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("codMag", out var _idMag))
{
idOpr = _matrOpr;
sessionId = int.Parse(_inveSessionId);
magazzinoId = _idMag;
}
}
}
}