From 19cfce23192e422c6ffd5c754670aa7271d3b77e Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Sat, 19 Jun 2021 18:08:57 +0200 Subject: [PATCH 1/8] fix layout vari --- GWMS.UI/Components/OrderEditor.razor | 2 +- GWMS.UI/Pages/Suppliers.razor | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GWMS.UI/Components/OrderEditor.razor b/GWMS.UI/Components/OrderEditor.razor index 790b02c..b46c82f 100644 --- a/GWMS.UI/Components/OrderEditor.razor +++ b/GWMS.UI/Components/OrderEditor.razor @@ -11,7 +11,7 @@
Modifica
-
+
diff --git a/GWMS.UI/Pages/Suppliers.razor b/GWMS.UI/Pages/Suppliers.razor index e525ff7..65924bd 100644 --- a/GWMS.UI/Pages/Suppliers.razor +++ b/GWMS.UI/Pages/Suppliers.razor @@ -69,7 +69,7 @@
-
+
@if (currRecord != null) { From abb42fad73c15a1535fbaee1c39842d571c54d94 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 21 Jun 2021 11:12:30 +0200 Subject: [PATCH 2/8] INserimento veri QRCode generati --- GWMS.UI/Components/OrderEditor.razor | 21 ++++++++++++++++++--- GWMS.UI/Pages/Orders.razor | 2 +- GWMS.UI/Pages/Suppliers.razor | 2 +- GWMS.UI/appsettings.json | 3 ++- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 7 files changed, 25 insertions(+), 9 deletions(-) diff --git a/GWMS.UI/Components/OrderEditor.razor b/GWMS.UI/Components/OrderEditor.razor index b46c82f..fa4dafc 100644 --- a/GWMS.UI/Components/OrderEditor.razor +++ b/GWMS.UI/Components/OrderEditor.razor @@ -3,22 +3,23 @@ @using System.Security.Claims @using Microsoft.AspNetCore.Components.Authorization @using GWMS.UI.Data +@using Microsoft.Extensions.Configuration @inject MessageService AppMessages @inject GWMSDataService DataService +@inject IConfiguration Configuration
Modifica
-
+
- - mettere QRCODE da https://qrcode.steamware.net/ +
@@ -128,4 +129,18 @@ { transpList = await DataService.TransportersGetFilt(SupplierId); } + + /// + /// Restituisce URL immagine QRCode + /// + /// Parametro da renderizzare con QRCode + /// + protected string getImgUrl(object QrValue) + { + string baseUrl = $"{Configuration["matrixUrl"]}/HOME/QR_site/JSON?val="; + string payload = "{'baseUrl':'{0}','parameters':['" + $"{QrValue}" + "']}"; + string answ = $"{baseUrl}{payload}"; + return answ; + } + } \ No newline at end of file diff --git a/GWMS.UI/Pages/Orders.razor b/GWMS.UI/Pages/Orders.razor index f6b8dad..b0f9698 100644 --- a/GWMS.UI/Pages/Orders.razor +++ b/GWMS.UI/Pages/Orders.razor @@ -69,7 +69,7 @@
-
+
@if (ListRecords == null) { diff --git a/GWMS.UI/Pages/Suppliers.razor b/GWMS.UI/Pages/Suppliers.razor index 65924bd..e90c0bb 100644 --- a/GWMS.UI/Pages/Suppliers.razor +++ b/GWMS.UI/Pages/Suppliers.razor @@ -69,7 +69,7 @@
-
+
@if (currRecord != null) { diff --git a/GWMS.UI/appsettings.json b/GWMS.UI/appsettings.json index c43fdbb..d65a4be 100644 --- a/GWMS.UI/appsettings.json +++ b/GWMS.UI/appsettings.json @@ -10,5 +10,6 @@ "ConnectionStrings": { "DefaultConnection": "Server=SQL2016DEV;Database=GWMS;Trusted_Connection=True;MultipleActiveResultSets=true", "GWMS.Data": "Server=SQL2016DEV;Database=GWMS;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=GWMS.UI;" - } + }, + "matrixUrl": "http://qrcode.steamware.net/" } \ No newline at end of file diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index eec897f..e3732f3 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo statistiche MAPO -

Versione: 1.0.2106.1918

+

Versione: 1.0.2106.2110


Note di rilascio:
    diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 77bb853..13a0265 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -1.0.2106.1918 +1.0.2106.2110 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 5b8cba7..88737fd 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.0.2106.1918 + 1.0.2106.2110 http://nexus.steamware.net/repository/SWS/MP-STATS/stable/0/GWMS.UI.zip http://nexus.steamware.net/repository/SWS/MP-STATS/stable/0/ChangeLog.html false From 7a91398e59f6d3491bf84d4429ae260c71c673f2 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 21 Jun 2021 11:25:22 +0200 Subject: [PATCH 3/8] Aggiunta conf dev/staging/prod x QRCode --- GWMS.UI/appsettings.Development.json | 19 ++++++++++--------- GWMS.UI/appsettings.Production.json | 10 ++++++++++ GWMS.UI/appsettings.Staging.json | 10 ++++++++++ 3 files changed, 30 insertions(+), 9 deletions(-) create mode 100644 GWMS.UI/appsettings.Production.json create mode 100644 GWMS.UI/appsettings.Staging.json diff --git a/GWMS.UI/appsettings.Development.json b/GWMS.UI/appsettings.Development.json index 5173757..ad63c7f 100644 --- a/GWMS.UI/appsettings.Development.json +++ b/GWMS.UI/appsettings.Development.json @@ -1,10 +1,11 @@ { - "DetailedErrors": true, - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - } -} + "DetailedErrors": true, + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "matrixUrl": "http://IIS01/zcode/" +} \ No newline at end of file diff --git a/GWMS.UI/appsettings.Production.json b/GWMS.UI/appsettings.Production.json new file mode 100644 index 0000000..f3dbfd7 --- /dev/null +++ b/GWMS.UI/appsettings.Production.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Trace", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "matrixUrl": "http://qrcode.steamware.net/" +} \ No newline at end of file diff --git a/GWMS.UI/appsettings.Staging.json b/GWMS.UI/appsettings.Staging.json new file mode 100644 index 0000000..f3dbfd7 --- /dev/null +++ b/GWMS.UI/appsettings.Staging.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Trace", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "matrixUrl": "http://qrcode.steamware.net/" +} \ No newline at end of file From 239ee52d5fced8e2dba30bdc6756d2ab69794737 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 21 Jun 2021 11:25:40 +0200 Subject: [PATCH 4/8] Aggiunta preliminare editors x ordini distinti --- GWMS.UI/Components/OrderAdminEditor.razor | 146 +++++++++++++++++++ GWMS.UI/Components/OrderSupplierEditor.razor | 146 +++++++++++++++++++ 2 files changed, 292 insertions(+) create mode 100644 GWMS.UI/Components/OrderAdminEditor.razor create mode 100644 GWMS.UI/Components/OrderSupplierEditor.razor diff --git a/GWMS.UI/Components/OrderAdminEditor.razor b/GWMS.UI/Components/OrderAdminEditor.razor new file mode 100644 index 0000000..fa4dafc --- /dev/null +++ b/GWMS.UI/Components/OrderAdminEditor.razor @@ -0,0 +1,146 @@ +@using GWMS.UI.Components +@using GWMS.Data.DatabaseModels +@using System.Security.Claims +@using Microsoft.AspNetCore.Components.Authorization +@using GWMS.UI.Data +@using Microsoft.Extensions.Configuration + +@inject MessageService AppMessages +@inject GWMSDataService DataService +@inject IConfiguration Configuration + +
    +
    + Modifica +
    +
    + + + +
    +
    + +
    +
    +
    +
    + + + @foreach (var item in transpList) + { + + } + +
    +
    + + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +@code { + + private List transpList; + + protected OrderModel _currItem = new OrderModel(); + protected int _supplierId { get; set; } = 0; + + [Parameter] + public OrderModel currItem + { + get + { + return _currItem = null; + } + set + { + _currItem = value; + } + } + + [Parameter] + public EventCallback DataReset { get; set; } + [Parameter] + public EventCallback DataUpdated { get; set; } + [Parameter] + public int SupplierId + { + get + { + return _supplierId; + } + set + { + _supplierId = value; + // condiziono visualizzazione... + var pUpd = Task.Run(async () => await ReloadAllData()); + pUpd.Wait(); + } + } + + private async Task saveUpdate() + { + if (_currItem != null) + { + DataService.OrderUpdate(_currItem); + await DataUpdated.InvokeAsync(1); + } + else + { + Console.WriteLine("Order null!"); + } + } + + private async Task cancelUpdate() + { + await DataReset.InvokeAsync(0); + } + + protected override async Task OnInitializedAsync() + { + await ReloadAllData(); + } + + protected async Task ReloadAllData() + { + transpList = await DataService.TransportersGetFilt(SupplierId); + } + + /// + /// Restituisce URL immagine QRCode + /// + /// Parametro da renderizzare con QRCode + /// + protected string getImgUrl(object QrValue) + { + string baseUrl = $"{Configuration["matrixUrl"]}/HOME/QR_site/JSON?val="; + string payload = "{'baseUrl':'{0}','parameters':['" + $"{QrValue}" + "']}"; + string answ = $"{baseUrl}{payload}"; + return answ; + } + +} \ No newline at end of file diff --git a/GWMS.UI/Components/OrderSupplierEditor.razor b/GWMS.UI/Components/OrderSupplierEditor.razor new file mode 100644 index 0000000..fa4dafc --- /dev/null +++ b/GWMS.UI/Components/OrderSupplierEditor.razor @@ -0,0 +1,146 @@ +@using GWMS.UI.Components +@using GWMS.Data.DatabaseModels +@using System.Security.Claims +@using Microsoft.AspNetCore.Components.Authorization +@using GWMS.UI.Data +@using Microsoft.Extensions.Configuration + +@inject MessageService AppMessages +@inject GWMSDataService DataService +@inject IConfiguration Configuration + +
    +
    + Modifica +
    +
    + + + +
    +
    + +
    +
    +
    +
    + + + @foreach (var item in transpList) + { + + } + +
    +
    + + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +@code { + + private List transpList; + + protected OrderModel _currItem = new OrderModel(); + protected int _supplierId { get; set; } = 0; + + [Parameter] + public OrderModel currItem + { + get + { + return _currItem = null; + } + set + { + _currItem = value; + } + } + + [Parameter] + public EventCallback DataReset { get; set; } + [Parameter] + public EventCallback DataUpdated { get; set; } + [Parameter] + public int SupplierId + { + get + { + return _supplierId; + } + set + { + _supplierId = value; + // condiziono visualizzazione... + var pUpd = Task.Run(async () => await ReloadAllData()); + pUpd.Wait(); + } + } + + private async Task saveUpdate() + { + if (_currItem != null) + { + DataService.OrderUpdate(_currItem); + await DataUpdated.InvokeAsync(1); + } + else + { + Console.WriteLine("Order null!"); + } + } + + private async Task cancelUpdate() + { + await DataReset.InvokeAsync(0); + } + + protected override async Task OnInitializedAsync() + { + await ReloadAllData(); + } + + protected async Task ReloadAllData() + { + transpList = await DataService.TransportersGetFilt(SupplierId); + } + + /// + /// Restituisce URL immagine QRCode + /// + /// Parametro da renderizzare con QRCode + /// + protected string getImgUrl(object QrValue) + { + string baseUrl = $"{Configuration["matrixUrl"]}/HOME/QR_site/JSON?val="; + string payload = "{'baseUrl':'{0}','parameters':['" + $"{QrValue}" + "']}"; + string answ = $"{baseUrl}{payload}"; + return answ; + } + +} \ No newline at end of file From 4bc51a072ff729e017b567bfd29ee613ef992871 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 21 Jun 2021 11:25:44 +0200 Subject: [PATCH 5/8] refresh --- GWMS.UI/Pages/Suppliers.razor | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/GWMS.UI/Pages/Suppliers.razor b/GWMS.UI/Pages/Suppliers.razor index e90c0bb..f2fe516 100644 --- a/GWMS.UI/Pages/Suppliers.razor +++ b/GWMS.UI/Pages/Suppliers.razor @@ -72,7 +72,7 @@
    @if (currRecord != null) { - + } @if (ListRecords == null) { diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index e3732f3..2b2d9f0 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo statistiche MAPO -

    Versione: 1.0.2106.2110

    +

    Versione: 1.0.2106.2111


    Note di rilascio:
      diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 13a0265..ef749b4 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -1.0.2106.2110 +1.0.2106.2111 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 88737fd..fb5f845 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.0.2106.2110 + 1.0.2106.2111 http://nexus.steamware.net/repository/SWS/MP-STATS/stable/0/GWMS.UI.zip http://nexus.steamware.net/repository/SWS/MP-STATS/stable/0/ChangeLog.html false From 07fd13d678d11126a515357b8457d885f1f23d24 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 21 Jun 2021 12:39:58 +0200 Subject: [PATCH 6/8] Fix edit ordini --- GWMS.UI/Components/LoadingData.razor | 2 +- GWMS.UI/Components/OrderAdminEditor.razor | 26 ++-- GWMS.UI/Components/OrderEditor.razor | 146 ------------------- GWMS.UI/Components/OrderSupplierEditor.razor | 4 +- GWMS.UI/Data/GWMSDataService.cs | 34 ++--- GWMS.UI/Pages/Orders.razor | 6 + GWMS.UI/Pages/Orders.razor.cs | 63 ++++---- GWMS.UI/Pages/Suppliers.razor | 1 - GWMS.UI/Startup.cs | 3 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 12 files changed, 75 insertions(+), 216 deletions(-) delete mode 100644 GWMS.UI/Components/OrderEditor.razor diff --git a/GWMS.UI/Components/LoadingData.razor b/GWMS.UI/Components/LoadingData.razor index 2ffebab..d3228ba 100644 --- a/GWMS.UI/Components/LoadingData.razor +++ b/GWMS.UI/Components/LoadingData.razor @@ -1,4 +1,4 @@ -
      +

      loading data

      diff --git a/GWMS.UI/Components/OrderAdminEditor.razor b/GWMS.UI/Components/OrderAdminEditor.razor index fa4dafc..5ec004d 100644 --- a/GWMS.UI/Components/OrderAdminEditor.razor +++ b/GWMS.UI/Components/OrderAdminEditor.razor @@ -5,7 +5,7 @@ @using GWMS.UI.Data @using Microsoft.Extensions.Configuration -@inject MessageService AppMessages +@inject MessageService AppMService @inject GWMSDataService DataService @inject IConfiguration Configuration @@ -24,19 +24,19 @@
      - - - @foreach (var item in transpList) + + + @foreach (var item in suppList) { - + }
      -
      - - -
      -
      + @*
      + + +
      *@ +
      @@ -64,7 +64,7 @@ @code { - private List transpList; + private List suppList; protected OrderModel _currItem = new OrderModel(); protected int _supplierId { get; set; } = 0; @@ -106,7 +106,7 @@ { if (_currItem != null) { - DataService.OrderUpdate(_currItem); + DataService.OrderUpdate(_currItem, AppMService.Order_Filter); await DataUpdated.InvokeAsync(1); } else @@ -127,7 +127,7 @@ protected async Task ReloadAllData() { - transpList = await DataService.TransportersGetFilt(SupplierId); + suppList = await DataService.SuppliersGetAll(); } /// diff --git a/GWMS.UI/Components/OrderEditor.razor b/GWMS.UI/Components/OrderEditor.razor deleted file mode 100644 index fa4dafc..0000000 --- a/GWMS.UI/Components/OrderEditor.razor +++ /dev/null @@ -1,146 +0,0 @@ -@using GWMS.UI.Components -@using GWMS.Data.DatabaseModels -@using System.Security.Claims -@using Microsoft.AspNetCore.Components.Authorization -@using GWMS.UI.Data -@using Microsoft.Extensions.Configuration - -@inject MessageService AppMessages -@inject GWMSDataService DataService -@inject IConfiguration Configuration - -
      -
      - Modifica -
      -
      - - - -
      -
      - -
      -
      -
      -
      - - - @foreach (var item in transpList) - { - - } - -
      -
      - - -
      -
      -
      - - -
      -
      -
      -
      -
      -
      -
      -
      - -
      -
      - -
      -
      -
      -
      -
      -
      -
      -
      -
      - -@code { - - private List transpList; - - protected OrderModel _currItem = new OrderModel(); - protected int _supplierId { get; set; } = 0; - - [Parameter] - public OrderModel currItem - { - get - { - return _currItem = null; - } - set - { - _currItem = value; - } - } - - [Parameter] - public EventCallback DataReset { get; set; } - [Parameter] - public EventCallback DataUpdated { get; set; } - [Parameter] - public int SupplierId - { - get - { - return _supplierId; - } - set - { - _supplierId = value; - // condiziono visualizzazione... - var pUpd = Task.Run(async () => await ReloadAllData()); - pUpd.Wait(); - } - } - - private async Task saveUpdate() - { - if (_currItem != null) - { - DataService.OrderUpdate(_currItem); - await DataUpdated.InvokeAsync(1); - } - else - { - Console.WriteLine("Order null!"); - } - } - - private async Task cancelUpdate() - { - await DataReset.InvokeAsync(0); - } - - protected override async Task OnInitializedAsync() - { - await ReloadAllData(); - } - - protected async Task ReloadAllData() - { - transpList = await DataService.TransportersGetFilt(SupplierId); - } - - /// - /// Restituisce URL immagine QRCode - /// - /// Parametro da renderizzare con QRCode - /// - protected string getImgUrl(object QrValue) - { - string baseUrl = $"{Configuration["matrixUrl"]}/HOME/QR_site/JSON?val="; - string payload = "{'baseUrl':'{0}','parameters':['" + $"{QrValue}" + "']}"; - string answ = $"{baseUrl}{payload}"; - return answ; - } - -} \ No newline at end of file diff --git a/GWMS.UI/Components/OrderSupplierEditor.razor b/GWMS.UI/Components/OrderSupplierEditor.razor index fa4dafc..0c61095 100644 --- a/GWMS.UI/Components/OrderSupplierEditor.razor +++ b/GWMS.UI/Components/OrderSupplierEditor.razor @@ -5,7 +5,7 @@ @using GWMS.UI.Data @using Microsoft.Extensions.Configuration -@inject MessageService AppMessages +@inject MessageService AppMService @inject GWMSDataService DataService @inject IConfiguration Configuration @@ -106,7 +106,7 @@ { if (_currItem != null) { - DataService.OrderUpdate(_currItem); + DataService.OrderUpdate(_currItem, AppMService.Order_Filter); await DataUpdated.InvokeAsync(1); } else diff --git a/GWMS.UI/Data/GWMSDataService.cs b/GWMS.UI/Data/GWMSDataService.cs index 213129f..a57e363 100644 --- a/GWMS.UI/Data/GWMSDataService.cs +++ b/GWMS.UI/Data/GWMSDataService.cs @@ -31,13 +31,13 @@ namespace GWMS.UI.Data /// /// Durata assoluta massima della cache IN SECONDI /// - private int chAbsExp = 60; + private int chAbsExp = 60 * 5; /// /// Durata della cache IN SECONDI in modalità inattiva (non acceduta) prima di venire rimossa /// NON estende oltre il tempo massimo di validità della cache (chAbsExp) /// - private int chSliExp = 5; + private int chSliExp = 60 * 1; #endregion Private Fields @@ -159,30 +159,18 @@ namespace GWMS.UI.Data public async Task> OrdersGetFilt(SelectOrderData CurrFilter) { List dbResult = new List(); - string cacheKey = getCacheKey("GWMS:DATA:ORDERS", CurrFilter); - string rawData; - var redisDataList = await distributedCache.GetAsync(cacheKey); - if (redisDataList != null) - { - rawData = Encoding.UTF8.GetString(redisDataList); - dbResult = JsonConvert.DeserializeObject>(rawData); - } - else - { - Stopwatch stopWatch = new Stopwatch(); - stopWatch.Start(); - dbResult = dbController.GetOrdersFilt(CurrFilter.PlantId, CurrFilter.SupplierId, CurrFilter.DateStart, CurrFilter.DateEnd); - rawData = JsonConvert.SerializeObject(dbResult); - redisDataList = Encoding.UTF8.GetBytes(rawData); - await distributedCache.SetAsync(cacheKey, redisDataList, cacheOpt(true)); - stopWatch.Stop(); - TimeSpan ts = stopWatch.Elapsed; - Log.Info($"Effettuata lettura da DB + caching per OrdersGetFilt: {ts.TotalMilliseconds} ms"); - } + + Stopwatch stopWatch = new Stopwatch(); + stopWatch.Start(); + dbResult = dbController.GetOrdersFilt(CurrFilter.PlantId, CurrFilter.SupplierId, CurrFilter.DateStart, CurrFilter.DateEnd); + stopWatch.Stop(); + TimeSpan ts = stopWatch.Elapsed; + Log.Info($"Effettuata lettura da DB per OrdersGetFilt: {ts.TotalMilliseconds} ms"); + return await Task.FromResult(dbResult); } - public void OrderUpdate(OrderModel currItem) + public void OrderUpdate(OrderModel currItem, SelectOrderData CurrFilter) { try { diff --git a/GWMS.UI/Pages/Orders.razor b/GWMS.UI/Pages/Orders.razor index b0f9698..9d3153e 100644 --- a/GWMS.UI/Pages/Orders.razor +++ b/GWMS.UI/Pages/Orders.razor @@ -70,6 +70,10 @@
      + @if (currRecord != null) + { + + } @if (ListRecords == null) { @@ -85,6 +89,7 @@ + @@ -96,6 +101,7 @@ @foreach (var record in ListRecords) { +
      Impianto Data Ordine Ordine
      @record.Plant.PlantCode
      @record.Plant.PlantDesc
      diff --git a/GWMS.UI/Pages/Orders.razor.cs b/GWMS.UI/Pages/Orders.razor.cs index 2b293b3..577f56d 100644 --- a/GWMS.UI/Pages/Orders.razor.cs +++ b/GWMS.UI/Pages/Orders.razor.cs @@ -64,17 +64,17 @@ namespace GWMS.UI.Pages get { int answ = 0; - if (MessageService.Order_Filter != null) + if (AppMService.Order_Filter != null) { - answ = MessageService.Order_Filter.PlantId; + answ = AppMService.Order_Filter.PlantId; } return answ; } set { - if (!MessageService.Order_Filter.PlantId.Equals(value)) + if (!AppMService.Order_Filter.PlantId.Equals(value)) { - MessageService.Order_Filter.PlantId = value; + AppMService.Order_Filter.PlantId = value; var pUpd = Task.Run(async () => await ReloadData()); pUpd.Wait(); } @@ -86,17 +86,17 @@ namespace GWMS.UI.Pages get { int answ = 0; - if (MessageService.Order_Filter != null) + if (AppMService.Order_Filter != null) { - answ = MessageService.Order_Filter.SupplierId; + answ = AppMService.Order_Filter.SupplierId; } return answ; } set { - if (!MessageService.Order_Filter.SupplierId.Equals(value)) + if (!AppMService.Order_Filter.SupplierId.Equals(value)) { - MessageService.Order_Filter.SupplierId = value; + AppMService.Order_Filter.SupplierId = value; var pUpd = Task.Run(async () => await ReloadData()); pUpd.Wait(); } @@ -109,6 +109,9 @@ namespace GWMS.UI.Pages #region Protected Properties + [Inject] + protected MessageService AppMService { get; set; } + [Inject] protected GWMSDataService DataService { get; set; } @@ -117,17 +120,17 @@ namespace GWMS.UI.Pages get { DateTime answ = DateTime.Today.AddDays(1); - if (MessageService.Order_Filter != null) + if (AppMService.Order_Filter != null) { - answ = MessageService.Order_Filter.DateEnd; + answ = AppMService.Order_Filter.DateEnd; } return answ; } set { - if (!MessageService.Order_Filter.DateEnd.Equals(value)) + if (!AppMService.Order_Filter.DateEnd.Equals(value)) { - MessageService.Order_Filter.DateEnd = value; + AppMService.Order_Filter.DateEnd = value; var pUpd = Task.Run(async () => await ReloadData()); pUpd.Wait(); } @@ -139,17 +142,17 @@ namespace GWMS.UI.Pages get { DateTime answ = DateTime.Today.AddDays(-1); - if (MessageService.Order_Filter != null) + if (AppMService.Order_Filter != null) { - answ = MessageService.Order_Filter.DateStart; + answ = AppMService.Order_Filter.DateStart; } return answ; } set { - if (!MessageService.Order_Filter.DateStart.Equals(value)) + if (!AppMService.Order_Filter.DateStart.Equals(value)) { - MessageService.Order_Filter.DateStart = value; + AppMService.Order_Filter.DateStart = value; var pUpd = Task.Run(async () => await ReloadData()); pUpd.Wait(); } @@ -159,9 +162,6 @@ namespace GWMS.UI.Pages [Inject] protected IJSRuntime JSRuntime { get; set; } - [Inject] - protected MessageService MessageService { get; set; } - [Inject] protected NavigationManager NavManager { get; set; } @@ -195,7 +195,7 @@ namespace GWMS.UI.Pages private async Task ReloadData() { isLoading = true; - SearchRecords = await DataService.OrdersGetFilt(MessageService.Order_Filter); + SearchRecords = await DataService.OrdersGetFilt(AppMService.Order_Filter); ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList(); isLoading = false; } @@ -204,6 +204,11 @@ namespace GWMS.UI.Pages #region Protected Methods + protected void Edit(OrderModel selRecord) + { + currRecord = selRecord; + } + protected void ForceReload(int newNum) { numRecord = newNum; @@ -216,10 +221,10 @@ namespace GWMS.UI.Pages protected override async Task OnInitializedAsync() { - MessageService.ShowSearch = false; - MessageService.PageName = "Ordini"; - MessageService.PageIcon = "fas fa-file-invoice pr-2"; - MessageService.EA_SearchUpdated += OnSeachUpdated; + AppMService.ShowSearch = false; + AppMService.PageName = "Ordini"; + AppMService.PageIcon = "fas fa-file-invoice pr-2"; + AppMService.EA_SearchUpdated += OnSeachUpdated; await ReloadAllData(); } @@ -230,12 +235,18 @@ namespace GWMS.UI.Pages await ReloadData(); } + protected void ResetData() + { + DataService.rollBackEdit(currRecord); + currRecord = null; + } + protected async Task ResetFilter(SelectOrderData newFilter) { currRecord = null; SearchRecords = null; ListRecords = null; - MessageService.Order_Filter = SelectOrderData.Init(5, 7); + AppMService.Order_Filter = SelectOrderData.Init(5, 7); await ReloadAllData(); } @@ -272,7 +283,7 @@ namespace GWMS.UI.Pages public void Dispose() { - MessageService.EA_SearchUpdated -= OnSeachUpdated; + AppMService.EA_SearchUpdated -= OnSeachUpdated; } public async void OnSeachUpdated() diff --git a/GWMS.UI/Pages/Suppliers.razor b/GWMS.UI/Pages/Suppliers.razor index f2fe516..ae8a8e5 100644 --- a/GWMS.UI/Pages/Suppliers.razor +++ b/GWMS.UI/Pages/Suppliers.razor @@ -54,7 +54,6 @@ - -
      - -
      - - + +
      +
      + +
      +
      +
      diff --git a/GWMS.UI/Components/OrderSupplierEditor.razor b/GWMS.UI/Components/OrderSupplierEditor.razor index 0c61095..888eb7c 100644 --- a/GWMS.UI/Components/OrderSupplierEditor.razor +++ b/GWMS.UI/Components/OrderSupplierEditor.razor @@ -16,45 +16,60 @@
      -
      - +
      -
      +
      -
      - - - @foreach (var item in transpList) - { - - } - +
      +
      +
      + + + +
      + + @foreach (var item in transpList) + { + + } + +
      -
      - - +
      +
      +
      + + + +
      + +
      -
      -
      - - +
      +
      +
      + + + +
      + +
      + + Note + +
      -
      -
      -
      -
      -
      - -
      -
      - -
      -
      -
      +
      +
      +
      + +
      +
      +
      diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index a2f5ed4..92419e0 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo statistiche MAPO -

      Versione: 1.0.2106.2112

      +

      Versione: 1.0.2106.2116


      Note di rilascio:
        diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index f55da85..81f7759 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -1.0.2106.2112 +1.0.2106.2116 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 92ab233..3470a26 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.0.2106.2112 + 1.0.2106.2116 http://nexus.steamware.net/repository/SWS/MP-STATS/stable/0/GWMS.UI.zip http://nexus.steamware.net/repository/SWS/MP-STATS/stable/0/ChangeLog.html false From 8c81ddcba5bbf212252fb244e6b258bfa90483b6 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 21 Jun 2021 17:59:27 +0200 Subject: [PATCH 8/8] update messaggi pagine ordini --- GWMS.UI/Pages/Orders.razor | 2 +- GWMS.UI/Pages/Suppliers.razor | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/GWMS.UI/Pages/Orders.razor b/GWMS.UI/Pages/Orders.razor index 9d3153e..88da5b9 100644 --- a/GWMS.UI/Pages/Orders.razor +++ b/GWMS.UI/Pages/Orders.razor @@ -7,7 +7,7 @@
        - Ordini + Elenco Ordini
        diff --git a/GWMS.UI/Pages/Suppliers.razor b/GWMS.UI/Pages/Suppliers.razor index ae8a8e5..ddcf199 100644 --- a/GWMS.UI/Pages/Suppliers.razor +++ b/GWMS.UI/Pages/Suppliers.razor @@ -7,7 +7,7 @@
        - Elenco Ordini Fornitore + Ordini Fornitore
        diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 92419e0..75f4136 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo statistiche MAPO -

        Versione: 1.0.2106.2116

        +

        Versione: 1.0.2106.2117


        Note di rilascio:
          diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 81f7759..750ad84 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -1.0.2106.2116 +1.0.2106.2117 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 3470a26..05b54a3 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.0.2106.2116 + 1.0.2106.2117 http://nexus.steamware.net/repository/SWS/MP-STATS/stable/0/GWMS.UI.zip http://nexus.steamware.net/repository/SWS/MP-STATS/stable/0/ChangeLog.html false