-
-
+
+
+
+ | Lotto |
+ Cod.Art. |
+ Descrizione Articolo |
+ # Colli |
+ Qty Tot |
+
+
+
+ @if (elencoTotLotto != null)
+ {
+ @foreach (var item in elencoTotLotto)
+ {
- | Lotto |
- Cod.Art. |
- Descrizione Articolo |
- # Colli |
- Qty Tot |
+
+ @item.Lotto
+ |
+
+ @item.CodArticolo
+ |
+
+ @item.DescrArt
+ |
+
+ @item.NumColli
+ |
+
+ @($"{item.TotLotto:N2}")
+ |
-
-
- @if (elencoTotLotto != null)
- {
- @foreach (var item in elencoTotLotto)
- {
-
- |
- @item.Lotto
- |
-
- @item.CodArticolo
- |
-
- @item.DescrArt
- |
-
- @item.NumColli
- |
-
- @($"{item.TotLotto:N2}")
- |
-
- }
- }
-
-
-
-
-
\ No newline at end of file
+ }
+ }
+
+
diff --git a/MP.INVE/Components/ListTotLotto.razor.cs b/MP.INVE/Components/ListTotLotto.razor.cs
index b8bc91a2..7a3eb14b 100644
--- a/MP.INVE/Components/ListTotLotto.razor.cs
+++ b/MP.INVE/Components/ListTotLotto.razor.cs
@@ -1,19 +1,4 @@
-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.DatabaseModels;
using MP.INVE.Data;
@@ -21,35 +6,72 @@ namespace MP.INVE.Components
{
public partial class ListTotLotto
{
+ #region Public Properties
+
+ [Parameter]
+ public SelectInvioParams currParams { get; set; } = null!;
+
+ [Parameter]
+ public bool isLoading { get; set; }
+
+ [Parameter]
+ public string searchVal { get; set; } = "";
+
+ [Parameter]
+ public int SessionID { get; set; } = 0;
+
+ [Parameter]
+ public EventCallback
updateRecordCount { get; set; }
+
+ #endregion Public Properties
+
+ #region Public Methods
+
public void Dispose()
{
elencoTotLotto = null;
SearchRecords = null;
GC.Collect();
}
- [Parameter]
- public int SessionID { get; set; } = 0;
+
+ #endregion Public Methods
+
+ #region Protected Fields
+
+ protected List? elencoTotLotto;
+
+ #endregion Protected Fields
+
+ #region Protected Properties
[Inject]
protected MiDataService MIService { get; set; } = null!;
- private int totalCount
+
+ #endregion Protected Properties
+
+ #region Protected Methods
+
+ protected override async Task OnParametersSetAsync()
{
- get => currParams.TotCount;
- set
+ await Task.Delay(1);
+ if (SessionID != 0)
{
- currParams.TotCount = value;
- StateHasChanged();
- }
- }
- private int numRecord
- {
- get => currParams.NumRec;
- set
- {
- currParams.NumRec = value;
- StateHasChanged();
+ await reloadData();
}
}
+
+ #endregion Protected Methods
+
+ #region Private Fields
+
+ private List? SearchRecords;
+
+ #endregion Private Fields
+
+ #region Private Properties
+
+ private int _totalCount { get; set; } = 0;
+
private int currPage
{
get => currParams.CurrPage;
@@ -60,20 +82,45 @@ namespace MP.INVE.Components
}
}
- protected async override Task OnParametersSetAsync()
+ private int numRecord
{
- await Task.Delay(1);
- if (SessionID != 0)
+ get => currParams.NumRec;
+ set
{
- await reloadData();
+ currParams.NumRec = value;
+ StateHasChanged();
}
}
+
+ private int totalCount
+ {
+ get => _totalCount;
+ set
+ {
+ if (_totalCount != value)
+ {
+ _totalCount = value;
+ updateRecordCount.InvokeAsync(value);
+ }
+ }
+ }
+
+ #endregion Private Properties
+
+ #region Private Methods
+
private async Task reloadData()
{
elencoTotLotto = null;
- totalCount = 0;
+ //totalCount = 0;
isLoading = true;
SearchRecords = MIService.InveSessTotLotList(SessionID);
+ // se ho search --> filtro...
+ if (!string.IsNullOrEmpty(searchVal))
+ {
+ StringComparison strComp = StringComparison.CurrentCultureIgnoreCase;
+ SearchRecords = SearchRecords.Where(x => x.CodArticolo.Contains(searchVal, strComp) || x.DescrArt.Contains(searchVal, strComp) || x.Lotto.Contains(searchVal, strComp)).ToList();
+ }
totalCount = SearchRecords.Count;
elencoTotLotto = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
await Task.Delay(1);
@@ -81,12 +128,7 @@ namespace MP.INVE.Components
await Task.Delay(1);
isLoading = false;
}
- protected List? elencoTotLotto;
- private List? SearchRecords;
- [Parameter]
- public SelectInvioParams currParams { get; set; } = null!;
- [Parameter]
- public bool isLoading { get; set; }
+ #endregion Private Methods
}
}
\ No newline at end of file
diff --git a/MP.INVE/MP.INVE.csproj b/MP.INVE/MP.INVE.csproj
index 88fec51d..e78c35e8 100644
--- a/MP.INVE/MP.INVE.csproj
+++ b/MP.INVE/MP.INVE.csproj
@@ -5,7 +5,7 @@
enable
enable
MP.INVE
- 6.16.2212.1614
+ 6.16.2212.1709
diff --git a/MP.INVE/Pages/Invio.razor b/MP.INVE/Pages/Invio.razor
index b15d5685..c6893f43 100644
--- a/MP.INVE/Pages/Invio.razor
+++ b/MP.INVE/Pages/Invio.razor
@@ -12,9 +12,19 @@ else
@@ -106,7 +116,17 @@ else
{
@if (sessID != 0)
{
-
+
}
}
diff --git a/MP.INVE/Pages/Invio.razor.cs b/MP.INVE/Pages/Invio.razor.cs
index 3ae02aaa..eb5f7b54 100644
--- a/MP.INVE/Pages/Invio.razor.cs
+++ b/MP.INVE/Pages/Invio.razor.cs
@@ -1,79 +1,75 @@
-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 Blazored.LocalStorage;
-using MP.Data.DTO;
-using MP.Data;
-using MP.INVE.Data;
-using MP.Data.DatabaseModels;
+using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.WebUtilities;
+using Microsoft.JSInterop;
+using MP.Data.DatabaseModels;
+using MP.Data.DTO;
+using MP.INVE.Data;
namespace MP.INVE.Pages
{
public partial class Invio
{
+ #region Public Properties
+
[Inject]
public MiDataService MIService { get; set; } = null!;
+ #endregion Public Properties
+
+ #region Protected Fields
+
protected SelectInvioParams invioParams = new SelectInvioParams();
+ protected bool isLoading = false;
+ protected bool mostra = false;
protected SelectInveSessionParams sessParams = new SelectInveSessionParams();
- private int totalCount
+ #endregion Protected Fields
+
+ #region Protected Properties
+
+ protected string BaseUrlTab { get => $"{Configuration["ServerConf:BaseUrlJumper"]}"; }
+
+ protected string codMag { get; set; } = "";
+
+ [Inject]
+ protected MessageService MsgService { get; set; } = null!;
+
+ protected string rawCode
{
- get => invioParams.TotCount;
- set
+ get
{
- if (invioParams.TotCount != value)
- {
- invioParams.TotCount = value;
- }
+ string answ = "";
+ answ = $"{BaseUrlTab}IdSessione={sessID}&IdMag={codMag}&MatrOpr={idOperatore}&UserAuthKey={authKey}";
+ return answ;
}
}
- private int numRecord
+
+ protected string searchVal { get; set; } = "";
+
+ protected int sessID { get; set; } = 0;
+
+ #endregion Protected Properties
+
+ #region Protected Methods
+
+ protected async void apriSessione(int sessID)
{
- get => invioParams.NumRec;
- set
+ var open = await MIService.CloseOpenSessione(sessID, false);
+ if (open)
{
- if (invioParams.NumRec != value)
- {
- invioParams.NumRec = value;
- }
+ NavManager.NavigateTo(NavManager.Uri, true);
}
}
- private int currPage
+
+ protected async void chiudiSessione(int sessID)
{
- get => invioParams.CurrPage;
- set
+ var closed = await MIService.CloseOpenSessione(sessID, true);
+ if (closed)
{
- if (invioParams.CurrPage != value)
- {
- invioParams.CurrPage = value;
- }
+ NavManager.NavigateTo(NavManager.Uri, true);
}
}
- private string idOperatore
- {
- get => sessParams.idOperatore;
- set => sessParams.idOperatore = value;
- }
- private string authKey
- {
- get => sessParams.authKey;
- set => sessParams.authKey = value;
- }
protected void ForceReload(int newNum)
{
@@ -84,51 +80,24 @@ namespace MP.INVE.Pages
{
currPage = newNum;
}
- protected bool mostra = false;
+
+ protected async Task getId()
+ {
+ OperatoreDTO local = new OperatoreDTO();
+ local = await MsgService.getCurrOperDtoAsync();
+ if (local != null)
+ {
+ idOperatore = local.MatrOpr.ToString();
+ authKey = local.hashAuthKey;
+ }
+ }
protected void mostraDati()
{
mostra = true;
}
- protected async void chiudiSessione(int sessID)
- {
- var closed = await MIService.CloseOpenSessione(sessID, true);
- if (closed)
- {
- NavManager.NavigateTo(NavManager.Uri, true);
- }
- }
- protected async void apriSessione(int sessID)
- {
- var open = await MIService.CloseOpenSessione(sessID, false);
- if (open)
- {
- NavManager.NavigateTo(NavManager.Uri, true);
- }
- }
- protected async void trasfSessione(int sessID)
- {
- var trasf = await MIService.TransferSessione(sessID);
- if (trasf)
- {
- NavManager.NavigateTo(NavManager.Uri, true);
- }
- }
- protected override async Task OnInitializedAsync()
- {
-
- var uri = NavManager.ToAbsoluteUri(NavManager.Uri);
- if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("sessID", out var _inveSessionId) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("codMag", out var _idMag))
- {
- sessID = int.Parse(_inveSessionId);
- codMag = _idMag;
- }
-
- await reloadData();
-
- }
- protected async override Task OnAfterRenderAsync(bool firstRender)
+ protected override async Task OnAfterRenderAsync(bool firstRender)
{
await Task.Delay(50);
if (firstRender)
@@ -145,33 +114,110 @@ namespace MP.INVE.Pages
}
}
- [Inject]
- private IConfiguration Configuration { get; set; } = null!;
- [Inject]
- private IJSRuntime JSRuntime { get; set; } = null!;
- [Inject]
- private NavigationManager NavManager { get; set; } = null!;
- [Inject]
- private ILocalStorageService localStorage { get; set; } = null!;
- protected string BaseUrlTab { get => $"{Configuration["ServerConf:BaseUrlJumper"]}"; }
-
-
- protected string rawCode
+ protected override async Task OnInitializedAsync()
{
- get
+ var uri = NavManager.ToAbsoluteUri(NavManager.Uri);
+ if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("sessID", out var _inveSessionId) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("codMag", out var _idMag))
{
- string answ = "";
- answ = $"{BaseUrlTab}IdSessione={sessID}&IdMag={codMag}&MatrOpr={idOperatore}&UserAuthKey={authKey}";
- return answ;
+ sessID = int.Parse(_inveSessionId);
+ codMag = _idMag;
+ }
+
+ await reloadData();
+ }
+
+ protected async void trasfSessione(int sessID)
+ {
+ var trasf = await MIService.TransferSessione(sessID);
+ if (trasf)
+ {
+ NavManager.NavigateTo(NavManager.Uri, true);
}
}
+ protected void UpdateTotCount(int newTotCount)
+ {
+ totalCount = newTotCount;
+ }
+
+ #endregion Protected Methods
+
+ #region Private Fields
+
private InventorySessionModel? sessione;
- protected bool isLoading = false;
+
+ #endregion Private Fields
+
+ #region Private Properties
+
+ private int _totalCount { get; set; } = 0;
+
+ private string authKey
+ {
+ get => sessParams.authKey;
+ set => sessParams.authKey = value;
+ }
+
+ [Inject]
+ private IConfiguration Configuration { get; set; } = null!;
+
+ private int currPage
+ {
+ get => invioParams.CurrPage;
+ set
+ {
+ if (invioParams.CurrPage != value)
+ {
+ invioParams.CurrPage = value;
+ }
+ }
+ }
+
+ private string idOperatore
+ {
+ get => sessParams.idOperatore;
+ set => sessParams.idOperatore = value;
+ }
+
+ [Inject]
+ private IJSRuntime JSRuntime { get; set; } = null!;
+
+ [Inject]
+ private ILocalStorageService localStorage { get; set; } = null!;
+
+ [Inject]
+ private NavigationManager NavManager { get; set; } = null!;
+
+ private int numRecord
+ {
+ get => invioParams.NumRec;
+ set
+ {
+ if (invioParams.NumRec != value)
+ {
+ invioParams.NumRec = value;
+ }
+ }
+ }
+
+ private int totalCount
+ {
+ get => invioParams.TotCount;
+ set
+ {
+ if (invioParams.TotCount != value)
+ {
+ invioParams.TotCount = value;
+ }
+ }
+ }
+
+ #endregion Private Properties
+
+ #region Private Methods
private async Task reloadData()
{
-
sessione = null;
isLoading = true;
sessione = MIService.InventSessByID(sessID);
@@ -179,20 +225,11 @@ namespace MP.INVE.Pages
isLoading = false;
}
- protected int sessID { get; set; } = 0;
- protected string codMag { get; set; } = "";
-
- [Inject]
- protected MessageService MsgService { get; set; } = null!;
- protected async Task getId()
+ private void reset()
{
- OperatoreDTO local = new OperatoreDTO();
- local = await MsgService.getCurrOperDtoAsync();
- if (local != null)
- {
- idOperatore = local.MatrOpr.ToString();
- authKey = local.hashAuthKey;
- }
+ searchVal = "";
}
+
+ #endregion Private Methods
}
}
\ No newline at end of file
diff --git a/MP.INVE/Resources/ChangeLog.html b/MP.INVE/Resources/ChangeLog.html
index 5448e247..754fa71c 100644
--- a/MP.INVE/Resources/ChangeLog.html
+++ b/MP.INVE/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOINVE
-
Versione: 6.16.2212.1614
+
Versione: 6.16.2212.1709
Note di rilascio:
-
diff --git a/MP.INVE/Resources/VersNum.txt b/MP.INVE/Resources/VersNum.txt
index a8bbf661..db30bbbc 100644
--- a/MP.INVE/Resources/VersNum.txt
+++ b/MP.INVE/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2212.1614
+6.16.2212.1709
diff --git a/MP.INVE/Resources/manifest.xml b/MP.INVE/Resources/manifest.xml
index a11b211e..a53693b8 100644
--- a/MP.INVE/Resources/manifest.xml
+++ b/MP.INVE/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2212.1614
+ 6.16.2212.1709
https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip
https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html
false