diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..4ebde410 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,4 @@ +[*.cs] + +# CS8765: Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes). +dotnet_diagnostic.CS8765.severity = none diff --git a/MP-SPEC.sln b/MP-SPEC.sln index cf0cb950..6254dfdb 100644 --- a/MP-SPEC.sln +++ b/MP-SPEC.sln @@ -7,6 +7,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.Data", "MP.Data\MP.Data. EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MP.SPEC", "MP.SPEC\MP.SPEC.csproj", "{C777A098-6F91-45AF-A85E-0AD08CBCAC52}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1B6A7550-F6C9-468E-B3B4-C30FF6FE8933}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/MP.Data/MP.Data.csproj b/MP.Data/MP.Data.csproj index 587b0971..8f08d1cd 100644 --- a/MP.Data/MP.Data.csproj +++ b/MP.Data/MP.Data.csproj @@ -11,6 +11,10 @@ + + + + diff --git a/MP.Data/MessagePipe.cs b/MP.Data/MessagePipe.cs index a7503be2..dde3b73a 100644 --- a/MP.Data/MessagePipe.cs +++ b/MP.Data/MessagePipe.cs @@ -69,7 +69,7 @@ namespace MP.Data private bool enableLog = false; private IConnectionMultiplexer redis; - private IDatabase? redisDb; + private IDatabase redisDb; #endregion Private Fields diff --git a/MP.SPEC/Components/Chart/Doughnut.razor.cs b/MP.SPEC/Components/Chart/Doughnut.razor.cs index e8c77ffb..db7524d9 100644 --- a/MP.SPEC/Components/Chart/Doughnut.razor.cs +++ b/MP.SPEC/Components/Chart/Doughnut.razor.cs @@ -26,13 +26,12 @@ namespace MP.SPEC.Components.Chart public ChartType Type { get; set; } [Parameter] - public double[] Data { get; set; } + public double[] Data { get; set; } = null!; + [Parameter] + public List BackgroundColor { get; set; } = null!; [Parameter] - public List BackgroundColor { get; set; } - - [Parameter] - public string[] Labels { get; set; } + public string[] Labels { get; set; } = null!; protected override async Task OnAfterRenderAsync(bool firstRender) { diff --git a/MP.SPEC/Components/CmpFooter.razor.cs b/MP.SPEC/Components/CmpFooter.razor.cs index 9e72abd9..1633f803 100644 --- a/MP.SPEC/Components/CmpFooter.razor.cs +++ b/MP.SPEC/Components/CmpFooter.razor.cs @@ -39,7 +39,8 @@ namespace MP.SPEC.Components protected override void OnInitialized() { - version = typeof(Program).Assembly.GetName().Version; + var rawVers = typeof(Program).Assembly.GetName().Version; ; + version = rawVers != null ? rawVers : new Version("0.0.0.0"); } #endregion Protected Methods diff --git a/MP.SPEC/Components/CmpTop.razor b/MP.SPEC/Components/CmpTop.razor index 79c66797..4ac9d6d0 100644 --- a/MP.SPEC/Components/CmpTop.razor +++ b/MP.SPEC/Components/CmpTop.razor @@ -11,7 +11,7 @@ @userName
- +
@*
@TipoSearch diff --git a/MP.SPEC/Components/DataPager.razor.cs b/MP.SPEC/Components/DataPager.razor.cs index 5fdb615f..cf560eb5 100644 --- a/MP.SPEC/Components/DataPager.razor.cs +++ b/MP.SPEC/Components/DataPager.razor.cs @@ -78,9 +78,9 @@ namespace MP.SPEC.Components #region Public Methods - public async Task resetCurrPage() + public void resetCurrPage() { - await Task.Delay(1); + //await Task.Delay(1); currPage = 1; } diff --git a/MP.SPEC/Components/ListDossiers.razor.cs b/MP.SPEC/Components/ListDossiers.razor.cs index 64c3f06a..3a85cf90 100644 --- a/MP.SPEC/Components/ListDossiers.razor.cs +++ b/MP.SPEC/Components/ListDossiers.razor.cs @@ -127,7 +127,10 @@ namespace MP.SPEC.Components currFluxLogDto = null; isEditing = false; await Task.Delay(1); - listaFlux = MDService.getFluxLog(currRecord.Valore); + if (currRecord != null) + { + listaFlux = MDService.getFluxLog(currRecord.Valore); + } StateHasChanged(); } } @@ -215,7 +218,6 @@ namespace MP.SPEC.Components private Dossiers? currRecord = null; - private FluxLogDTO? currRecordFlux; private List? ListRecords; private List? ListStati; diff --git a/MP.SPEC/Components/ListODL.razor.cs b/MP.SPEC/Components/ListODL.razor.cs index 1ca54e7c..f93b41fc 100644 --- a/MP.SPEC/Components/ListODL.razor.cs +++ b/MP.SPEC/Components/ListODL.razor.cs @@ -274,7 +274,7 @@ namespace MP.SPEC.Components { get { - List answ = new List(); + List? answ = new List(); if (hideSpenta) { answ = ListOdlStatsNetto; diff --git a/MP.SPEC/Components/ListPARAMS.razor.cs b/MP.SPEC/Components/ListPARAMS.razor.cs index 48e9b2bb..67a203e0 100644 --- a/MP.SPEC/Components/ListPARAMS.razor.cs +++ b/MP.SPEC/Components/ListPARAMS.razor.cs @@ -136,7 +136,7 @@ namespace MP.SPEC.Components #region Protected Methods - protected override async Task OnInitializedAsync() + protected override void OnInitialized() { StartTimer(); } diff --git a/MP.SPEC/Data/MessageService.cs b/MP.SPEC/Data/MessageService.cs index 02a690b2..512434b6 100644 --- a/MP.SPEC/Data/MessageService.cs +++ b/MP.SPEC/Data/MessageService.cs @@ -4,13 +4,13 @@ { #region Public Events - public event Action EA_PageUpdated; + public event Action EA_PageUpdated = null!; - public event Action EA_SearchUpdated; + public event Action EA_SearchUpdated = null!; - public event Action EA_ShowSearch; + public event Action EA_ShowSearch = null!; - public event Action EA_StatoSearch; + public event Action EA_StatoSearch = null!; #endregion Public Events diff --git a/MP.SPEC/Data/MpDataService.cs b/MP.SPEC/Data/MpDataService.cs index 146ff727..b0c3db2e 100644 --- a/MP.SPEC/Data/MpDataService.cs +++ b/MP.SPEC/Data/MpDataService.cs @@ -171,7 +171,7 @@ namespace MP.SPEC.Data /// public async Task> ArticoliGetSearch(int numRecord, string azienda, string searchVal) { - List result = new List(); + List? result = new List(); Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); string readType = "DB"; @@ -238,7 +238,7 @@ namespace MP.SPEC.Data { // cerco in cache se ci sia la tabella con gli articoli impiegati... string rawTable = redisDb.StringGet(redKeyTabCheckArt); - List artList = new List(); + List? artList = new List(); if (!string.IsNullOrEmpty(rawTable)) { artList = JsonConvert.DeserializeObject>(rawTable); @@ -763,7 +763,7 @@ namespace MP.SPEC.Data /// public List OdlGetCurrent() { - List dbResult = new List(); + List? dbResult = new List(); Stopwatch stopWatch = new Stopwatch(); stopWatch.Start(); string readType = "DB"; diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 4eed2b81..b31710e7 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2211.311 + 6.16.2211.312 diff --git a/MP.SPEC/Pages/Articoli.razor.cs b/MP.SPEC/Pages/Articoli.razor.cs index ffb568d3..0d45f5de 100644 --- a/MP.SPEC/Pages/Articoli.razor.cs +++ b/MP.SPEC/Pages/Articoli.razor.cs @@ -58,7 +58,7 @@ namespace MP.SPEC.Pages protected MpDataService MDService { get; set; } = null!; [Inject] - protected NavigationManager NavManager { get; set; } + protected NavigationManager NavManager { get; set; } = null!; protected int totalCount { diff --git a/MP.SPEC/Pages/DOSS.razor.cs b/MP.SPEC/Pages/DOSS.razor.cs index 6e08e9c0..af62c038 100644 --- a/MP.SPEC/Pages/DOSS.razor.cs +++ b/MP.SPEC/Pages/DOSS.razor.cs @@ -1,7 +1,6 @@ using Microsoft.AspNetCore.Components; using Microsoft.JSInterop; using MP.Data.DatabaseModels; -using MP.Data.DTO; using MP.SPEC.Components; using MP.SPEC.Data; @@ -11,7 +10,7 @@ namespace MP.SPEC.Pages { #region Protected Fields - protected DataPager pagerODL = null!; + protected DataPager? pagerODL = null!; #endregion Protected Fields @@ -23,7 +22,6 @@ namespace MP.SPEC.Pages [Inject] protected MpDataService MDService { get; set; } = null!; - #endregion Protected Properties #region Protected Methods @@ -58,6 +56,56 @@ namespace MP.SPEC.Pages await Task.Delay(1); } + protected void updateTotal(int newTotCount) + { + totalCount = newTotCount; + } + + protected void UpdateTotCount(int newTotCount) + { + totalCount = newTotCount; + } + + #endregion Protected Methods + + #region Private Properties + + private SelectDossierParams currFilter { get; set; } = new SelectDossierParams(); + + private int currPage + { + get => currFilter.CurrPage; + set => currFilter.CurrPage = value; + } + + private Dossiers? currRecordDoss { get; set; } = null; + + private bool isEditing + { + get => currFilter.isEditing; + set => currFilter.isEditing = value; + } + + private bool isFiltering { get; set; } = false; + + private bool isLoading { get; set; } = true; + + private int numRecord + { + get => currFilter.NumRec; + set => currFilter.NumRec = value; + } + + private int totalCount + { + get => currFilter.TotCount; + set => currFilter.TotCount = value; + } + + #endregion Private Properties + + #region Private Methods + private string css() { string answ = ""; @@ -77,55 +125,6 @@ namespace MP.SPEC.Pages isEditing = true; } - protected void updateTotal(int newTotCount) - { - totalCount = newTotCount; - } - - #endregion Protected Methods - - #region Private Fields - - private FluxLogDTO? _currDetFluxLogRecord = null; - - #endregion Private Fields - - #region Private Properties - - - - private SelectDossierParams currFilter { get; set; } = new SelectDossierParams(); - - private int currPage - { - get => currFilter.CurrPage; - set => currFilter.CurrPage = value; - } - - private Dossiers? currRecordDoss { get; set; } = null; - private bool isFiltering { get; set; } = false; - private bool isLoading { get; set; } = true; - - private int numRecord - { - get => currFilter.NumRec; - set => currFilter.NumRec = value; - } - private bool isEditing - { - get => currFilter.isEditing; - set => currFilter.isEditing = value; - } - private int totalCount - { - get => currFilter.TotCount; - set => currFilter.TotCount = value; - } - - #endregion Private Properties - - #region Private Methods - private async Task updateFilter(SelectDossierParams newParams) { isFiltering = false; @@ -137,10 +136,6 @@ namespace MP.SPEC.Pages currFilter = newParams; isLoading = false; } - protected void UpdateTotCount(int newTotCount) - { - totalCount = newTotCount; - } #endregion Private Methods } diff --git a/MP.SPEC/Pages/Index.razor.cs b/MP.SPEC/Pages/Index.razor.cs index 5d774ba8..0751fffd 100644 --- a/MP.SPEC/Pages/Index.razor.cs +++ b/MP.SPEC/Pages/Index.razor.cs @@ -18,7 +18,7 @@ namespace MP.SPEC.Pages protected MpDataService MDService { get; set; } = null!; [Inject] - protected MessageService MessageService { get; set; } + protected MessageService MessageService { get; set; } = null!; #endregion Protected Properties diff --git a/MP.SPEC/Pages/ODL.razor.cs b/MP.SPEC/Pages/ODL.razor.cs index 592e6c2a..1925fb7c 100644 --- a/MP.SPEC/Pages/ODL.razor.cs +++ b/MP.SPEC/Pages/ODL.razor.cs @@ -26,7 +26,7 @@ namespace MP.SPEC.Pages #region Protected Fields - protected DataPager pagerODL = null!; + protected DataPager? pagerODL = null!; #endregion Protected Fields @@ -104,7 +104,11 @@ namespace MP.SPEC.Pages { if (doReset) { - await pagerODL.resetCurrPage(); + await Task.Delay(1); + if (pagerODL != null) + { + pagerODL.resetCurrPage(); + } } } diff --git a/MP.SPEC/Pages/PARAMS.razor.cs b/MP.SPEC/Pages/PARAMS.razor.cs index 2428b24d..e0598d34 100644 --- a/MP.SPEC/Pages/PARAMS.razor.cs +++ b/MP.SPEC/Pages/PARAMS.razor.cs @@ -9,7 +9,7 @@ namespace MP.SPEC.Pages { #region Protected Fields - protected DataPager pagerODL = null!; + protected DataPager? pagerODL = null!; #endregion Protected Fields @@ -31,6 +31,7 @@ namespace MP.SPEC.Pages DateTime adesso = DateTime.Now.AddSeconds(1); var updFilter = currFilter; //updFilter.LiveUpdate = (currPage == 1); + updFilter.LiveUpdate = (currFilter.CurrPage == 1); updFilter.lastUpdate = updFilter.LiveUpdate ? "-" : $"{adesso:yyyy/MM/dd HH:mm:ss}"; // salvo filtro currFilter = updFilter; @@ -55,7 +56,11 @@ namespace MP.SPEC.Pages { if (doReset) { - await pagerODL.resetCurrPage(); + await Task.Delay(1); + if (pagerODL != null) + { + pagerODL.resetCurrPage(); + } } } diff --git a/MP.SPEC/Pages/PODL.razor.cs b/MP.SPEC/Pages/PODL.razor.cs index 351d2ed0..379e469d 100644 --- a/MP.SPEC/Pages/PODL.razor.cs +++ b/MP.SPEC/Pages/PODL.razor.cs @@ -87,7 +87,8 @@ namespace MP.SPEC.Pages { if (doReset) { - await pagerODL.resetCurrPage(); + await Task.Delay(1); + pagerODL.resetCurrPage(); } } @@ -206,16 +207,17 @@ namespace MP.SPEC.Pages private bool selectFirst(string idxMacchina) { string firstMacchina=""; - bool ans = false; + bool answ = false; if (ListMacchine != null) { - firstMacchina = ListMacchine.Select(x => x.IdxMacchina).FirstOrDefault(); + var rawData = ListMacchine.Select(x => x.IdxMacchina).FirstOrDefault(); + firstMacchina = rawData != null ? rawData : ""; } if (firstMacchina == idxMacchina) { - ans = true; + answ = true; } - return ans; + return answ; } private string btnNewText diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 0fb5f0b8..df775592 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2211.311

+

Versione: 6.16.2211.312


Note di rilascio:
  • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index 22639881..f4d62064 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2211.311 +6.16.2211.312 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index 33dd5804..f915a747 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2211.311 + 6.16.2211.312 https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html false