Merge branch 'develop'

This commit is contained in:
Samuele Locatelli
2022-09-27 12:01:32 +02:00
7 changed files with 30 additions and 18 deletions
+20 -9
View File
@@ -5,12 +5,14 @@ using MP.SPEC.Data;
namespace MP.SPEC.Components
{
public partial class ListODL
public partial class ListODL : IDisposable
{
#region Public Properties
[Parameter]
public EventCallback<bool> PagerResetReq { get; set; }
[Parameter]
public EventCallback<int> updateRecordCount { get; set; }
[Parameter]
public string StatoSel
@@ -21,8 +23,6 @@ namespace MP.SPEC.Components
if (_statoSel != value)
{
_statoSel = value;
var pUpd = Task.Run(async () => await reloadData());
pUpd.Wait();
}
}
}
@@ -46,6 +46,12 @@ namespace MP.SPEC.Components
return answ;
}
public void Dispose()
{
MessageService.EA_PageUpdated -= MessageService_EA_PageUpdated;
MessageService.EA_SearchUpdated -= OnSeachUpdated;
}
#endregion Public Methods
#region Protected Properties
@@ -63,10 +69,14 @@ namespace MP.SPEC.Components
#region Protected Methods
protected override async Task OnInitializedAsync()
protected override void OnInitialized()
{
MessageService.EA_PageUpdated += MessageService_EA_PageUpdated;
MessageService.EA_SearchUpdated += OnSeachUpdated;
}
protected override async Task OnParametersSetAsync()
{
await reloadData();
}
@@ -122,11 +132,11 @@ namespace MP.SPEC.Components
get => string.IsNullOrEmpty(MessageService.SearchVal) ? "*" : MessageService.SearchVal;
}
private int totalCount
{
get => MessageService.totalCount;
set => MessageService.totalCount = value;
}
private int totalCount { get; set; } = 0;
//{
// get => MessageService.totalCount;
// set => MessageService.totalCount = value;
//}
#endregion Private Properties
@@ -145,6 +155,7 @@ namespace MP.SPEC.Components
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
await Task.Delay(1);
await InvokeAsync(() => StateHasChanged());
await updateRecordCount.InvokeAsync(totalCount);
isLoading = false;
}
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.SPEC</RootNamespace>
<Version>6.16.2209.2711</Version>
<Version>6.16.2209.2712</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -24,7 +24,7 @@
</div>
</div>
<div class="card-body">
<ListODL StatoSel="@selStato" PagerResetReq="pgResetReq"></ListODL>
<ListODL StatoSel="@selStato" PagerResetReq="pgResetReq" updateRecordCount="UpdateTotCount"></ListODL>
</div>
<div class="card-footer py-1">
<DataPager @ref="pagerODL" PageSize="numRecord" currPage="currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="totalCount" showLoading="isLoading" />
+5 -4
View File
@@ -28,6 +28,11 @@ namespace MP.SPEC.Pages
#region Protected Methods
protected void UpdateTotCount(int newTotCount)
{
totalCount = newTotCount;
}
protected void ForceReload(int newNum)
{
numRecord = newNum;
@@ -44,7 +49,6 @@ namespace MP.SPEC.Pages
MsgService.ShowSearch = true;
// resetto search
MsgService.SearchVal = "";
ListAziende = await MDService.ElencoAziende();
ListStati = await MDService.AnagStatiComm();
// carico dati
await reloadData();
@@ -62,9 +66,6 @@ namespace MP.SPEC.Pages
#region Private Fields
private MP.Data.DatabaseModels.ODLModel? currRecordOdl = null;
private MP.Data.DatabaseModels.PODLModel? currRecordPOdl = null;
private List<MP.Data.DatabaseModels.AnagGruppi>? ListAziende;
private List<MP.Data.DatabaseModels.ListValues>? ListStati;
#endregion Private Fields
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 6.16.2209.2711</h4>
<h4>Versione: 6.16.2209.2712</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2209.2711
6.16.2209.2712
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2209.2711</version>
<version>6.16.2209.2712</version>
<url>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>