From acc31a24926e10fecfa73c17db13d5045729de8f Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Tue, 29 Nov 2022 13:12:20 +0100 Subject: [PATCH] display --- MP.SPEC/Pages/Giacenze.razor.cs | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 MP.SPEC/Pages/Giacenze.razor.cs diff --git a/MP.SPEC/Pages/Giacenze.razor.cs b/MP.SPEC/Pages/Giacenze.razor.cs new file mode 100644 index 00000000..4d799bc1 --- /dev/null +++ b/MP.SPEC/Pages/Giacenze.razor.cs @@ -0,0 +1,47 @@ +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.SPEC; +using MP.SPEC.Shared; +using MP.SPEC.Components; +using MP.Data.DatabaseModels; +using MP.SPEC.Data; +using Microsoft.AspNetCore.WebUtilities; + +namespace MP.SPEC.Pages +{ + public partial class Giacenze + { + [Inject] + MpDataService MDService { get; set; } = null!; + + [Inject] + NavigationManager NavManager { get; set; } = null!; + + protected List? elencoGiacenze; + + protected int IdxOdl = 0; + + protected override async Task OnInitializedAsync() + { + var uri = NavManager.ToAbsoluteUri(NavManager.Uri); + if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("IdxOdl", out var _idxOdl)) + { + IdxOdl = int.Parse(_idxOdl); + } + + elencoGiacenze = await MDService.ListGiacenze(IdxOdl); + } + + } +} \ No newline at end of file