Merge branch 'release/AddDebugParams_01'
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
<div class="col">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<button @onclick="() => setCalc()" class="btn btn-primary">@CalcVal.ToString("N3") <i class="fas fa-arrow-alt-circle-right"></i></button>
|
||||
<button @onclick="() => setCalc()" class="btn btn-primary">@CalcVal.ToString("N2") <i class="fas fa-arrow-alt-circle-right"></i></button>
|
||||
</div>
|
||||
<InputNumber @bind-Value="@_currItem.reqValDec" class="form-control text-right"></InputNumber>
|
||||
<div class="input-group-append">
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using GWMS.Data.DatabaseModels;
|
||||
using GWMS.UI.Data;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.JSInterop;
|
||||
using NLog;
|
||||
using System;
|
||||
@@ -53,17 +54,59 @@ namespace GWMS.UI.Components
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected objItem _currItem = new objItem();
|
||||
protected int _plantId = 0;
|
||||
protected string ParamUid = "";
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected decimal CalcVal
|
||||
[Inject]
|
||||
protected IConfiguration _configuration { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
// fix arrotondamento
|
||||
roundFactor = _configuration.GetValue<int>("RuntimeOpt:100", 10);
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task ReloadData()
|
||||
{
|
||||
ListRecords = null;
|
||||
try
|
||||
{
|
||||
ListRecords = await DataService.ParamSetGetFiltAsync(PlantId, ParamUid);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione in ReloadData:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private objItem _currItem = new objItem();
|
||||
|
||||
private int _plantId = 0;
|
||||
|
||||
private List<ParamSetModel> ListRecords;
|
||||
|
||||
private string ParamUid = "";
|
||||
|
||||
/// <summary>
|
||||
/// fattore arrotondamento valori calcolati
|
||||
/// </summary>
|
||||
private int roundFactor = 100;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private decimal CalcVal
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -88,9 +131,12 @@ namespace GWMS.UI.Components
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected GWMSDataService DataService { get; set; }
|
||||
private GWMSDataService DataService { get; set; }
|
||||
|
||||
protected int totalCount
|
||||
[Inject]
|
||||
private IJSRuntime JSRuntime { get; set; }
|
||||
|
||||
private int totalCount
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -103,40 +149,6 @@ namespace GWMS.UI.Components
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected async Task ChildUpdated()
|
||||
{
|
||||
//await DataReset.InvokeAsync(0);
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected void setCalc()
|
||||
{
|
||||
currItem.reqValDec = Math.Round(CalcVal * 1000) / 1000;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private List<ParamSetModel> ListRecords;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
[Inject]
|
||||
private IJSRuntime JSRuntime { get; set; }
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
@@ -146,17 +158,10 @@ namespace GWMS.UI.Components
|
||||
await DataReset.InvokeAsync(0);
|
||||
}
|
||||
|
||||
private async Task ReloadData()
|
||||
private async Task ChildUpdated()
|
||||
{
|
||||
ListRecords = null;
|
||||
try
|
||||
{
|
||||
ListRecords = await DataService.ParamSetGetFiltAsync(PlantId, ParamUid);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione in ReloadData:{Environment.NewLine}{exc}");
|
||||
}
|
||||
//await DataReset.InvokeAsync(0);
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
private async Task saveUpdate()
|
||||
@@ -175,6 +180,11 @@ namespace GWMS.UI.Components
|
||||
}
|
||||
}
|
||||
|
||||
private void setCalc()
|
||||
{
|
||||
currItem.reqValDec = Math.Round(CalcVal * roundFactor) / roundFactor;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -1,32 +1,22 @@
|
||||
using GWMS.Data;
|
||||
using GWMS.Data.DatabaseModels;
|
||||
using GWMS.Data.DTO;
|
||||
using IdentityModel.OidcClient;
|
||||
using k8s.Models;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Identity.UI.Services;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Caching.Distributed;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
using OpenTelemetry.Resources;
|
||||
using Org.BouncyCastle.Asn1.IsisMtt.Ocsp;
|
||||
using Org.BouncyCastle.Asn1.Pkcs;
|
||||
using StackExchange.Redis;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static GWMS.Data.IobObjects;
|
||||
using static Humanizer.In;
|
||||
using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database;
|
||||
|
||||
namespace GWMS.UI.Data
|
||||
{
|
||||
@@ -50,6 +40,9 @@ namespace GWMS.UI.Data
|
||||
// Verifica conf trace...
|
||||
traceEnabled = _configuration.GetValue<bool>("Otel:EnableTracing", false);
|
||||
|
||||
// fix arrotondamento
|
||||
roundFactor = _configuration.GetValue<int>("RuntimeOpt:100", 10);
|
||||
|
||||
// Conf cache
|
||||
redisConn = redisConnMult;
|
||||
redisDb = this.redisConn.GetDatabase();
|
||||
@@ -219,7 +212,7 @@ namespace GWMS.UI.Data
|
||||
|
||||
/// <summary>
|
||||
/// Esecuzione cleanup + recupero allarmi
|
||||
/// </summary>
|
||||
/// </summary><
|
||||
/// <param name="PlantId"></param>
|
||||
/// <param name="skipRec"></param>
|
||||
/// <param name="numRec"></param>
|
||||
@@ -1008,6 +1001,8 @@ namespace GWMS.UI.Data
|
||||
decimal maxVal = Math.Max(prevPar.TargetVal, nextPar.TargetVal);
|
||||
answ = Math.Min(maxVal, answ);
|
||||
answ = Math.Max(minVal, answ);
|
||||
// arrotondo il valore x evitare errori...
|
||||
answ = Math.Round(answ * roundFactor) / roundFactor;
|
||||
}
|
||||
}
|
||||
activity?.SetTag("data.source", source);
|
||||
@@ -1018,6 +1013,11 @@ namespace GWMS.UI.Data
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// fattore arrotondamento valori calcolati
|
||||
/// </summary>
|
||||
private int roundFactor = 100;
|
||||
|
||||
/// <summary>
|
||||
/// Cancellazione ParamSet
|
||||
/// </summary>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Version>1.2.2603.0409</Version>
|
||||
<Version>1.2.2603.1217</Version>
|
||||
<UserSecretsId>95c9f021-52d1-4390-a670-5810b7b777b0</UserSecretsId>
|
||||
<EnableNETAnalyzers>true</EnableNETAnalyzers>
|
||||
<RunAnalyzersDuringBuild>true</RunAnalyzersDuringBuild>
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
{
|
||||
<tr class="@checkSelect(@record.uid)">
|
||||
<td class="text-nowrap">
|
||||
@if (record.writable)
|
||||
@if (record.writable || editAll)
|
||||
{
|
||||
if (currRecord == null)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using GWMS.Data.DatabaseModels;
|
||||
using GWMS.Data.DTO;
|
||||
using GWMS.UI.Data;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
@@ -18,30 +17,168 @@ namespace GWMS.UI.Pages
|
||||
[Authorize(Roles = "SuperAdmin, Admin, User")]
|
||||
public partial class PlantParameters : ComponentBase, IDisposable
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
aTimer.Stop();
|
||||
aTimer.Dispose();
|
||||
AppMService.EA_SearchUpdated -= OnSeachUpdated;
|
||||
}
|
||||
|
||||
public async void OnSeachUpdated()
|
||||
{
|
||||
await UpdateData();
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; }
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; }
|
||||
|
||||
protected int totalCount
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (ListRecords != null)
|
||||
{
|
||||
answ = ListRecords.Count;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void ElapsedTimer(Object source, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
var pUpd = Task.Run(async () =>
|
||||
{
|
||||
await ReloadData();
|
||||
await InvokeAsync(StateHasChanged);
|
||||
});
|
||||
pUpd.Wait();
|
||||
}
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
var currMode = GetQueryParm("currMode");
|
||||
if (!string.IsNullOrWhiteSpace(currMode))
|
||||
{
|
||||
editAll = currMode.Equals("debug");
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
AppMService.ShowSearch = false;
|
||||
AppMService.PageName = "Parametri Impianto";
|
||||
AppMService.PageIcon = "fas fa-folder-open pr-2";
|
||||
AppMService.EA_SearchUpdated += OnSeachUpdated;
|
||||
StartTimer();
|
||||
await ReloadAllData();
|
||||
}
|
||||
|
||||
protected void StartTimer()
|
||||
{
|
||||
int tOutPeriod = 3000;
|
||||
int.TryParse(Configuration["ReloadParamTimer"], out tOutPeriod);
|
||||
aTimer = new System.Timers.Timer(tOutPeriod);
|
||||
aTimer.Elapsed += ElapsedTimer;
|
||||
aTimer.Enabled = true;
|
||||
aTimer.Start();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static System.Timers.Timer aTimer;
|
||||
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private objItem currRecord = null;
|
||||
private List<objItem> ListRecords;
|
||||
private List<PlantDetailModel> PlantsList;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
/// <summary>
|
||||
/// Valore PlantId filtrato da claim
|
||||
/// </summary>
|
||||
protected int ClaimPlantId = -1;
|
||||
private int ClaimPlantId = -1;
|
||||
|
||||
#endregion Protected Fields
|
||||
private objItem currRecord = null;
|
||||
|
||||
private bool editAll = false;
|
||||
|
||||
private List<objItem> ListRecords;
|
||||
|
||||
private List<PlantDetailModel> PlantsList;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
[Inject]
|
||||
private MessageService AppMService { get; set; }
|
||||
|
||||
[Inject]
|
||||
private AuthenticationStateProvider AuthenticationStateProvider { get; set; }
|
||||
|
||||
[Inject]
|
||||
private IConfiguration Configuration { get; set; }
|
||||
|
||||
[Inject]
|
||||
private GWMSDataService DataService { get; set; }
|
||||
|
||||
private DateTime DateEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime answ = DateTime.Today.AddDays(1);
|
||||
if (AppMService.Order_Filter != null)
|
||||
{
|
||||
answ = AppMService.Order_Filter.DateEnd;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!AppMService.Order_Filter.DateEnd.Equals(value))
|
||||
{
|
||||
AppMService.Order_Filter.DateEnd = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private DateTime DateStart
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime answ = DateTime.Today.AddDays(-1);
|
||||
if (AppMService.Order_Filter != null)
|
||||
{
|
||||
answ = AppMService.Order_Filter.DateStart;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!AppMService.Order_Filter.DateStart.Equals(value))
|
||||
{
|
||||
AppMService.Order_Filter.DateStart = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool isLoading { get; set; } = false;
|
||||
|
||||
private string SelPlantCode
|
||||
@@ -85,98 +222,33 @@ namespace GWMS.UI.Pages
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
protected MessageService AppMService { get; set; }
|
||||
|
||||
[Inject]
|
||||
protected AuthenticationStateProvider AuthenticationStateProvider { get; set; }
|
||||
|
||||
[Inject]
|
||||
protected GWMSDataService DataService { get; set; }
|
||||
|
||||
protected DateTime DateEnd
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime answ = DateTime.Today.AddDays(1);
|
||||
if (AppMService.Order_Filter != null)
|
||||
{
|
||||
answ = AppMService.Order_Filter.DateEnd;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!AppMService.Order_Filter.DateEnd.Equals(value))
|
||||
{
|
||||
AppMService.Order_Filter.DateEnd = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected DateTime DateStart
|
||||
{
|
||||
get
|
||||
{
|
||||
DateTime answ = DateTime.Today.AddDays(-1);
|
||||
if (AppMService.Order_Filter != null)
|
||||
{
|
||||
answ = AppMService.Order_Filter.DateStart;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!AppMService.Order_Filter.DateStart.Equals(value))
|
||||
{
|
||||
AppMService.Order_Filter.DateStart = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected bool editAll
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
var currMode = GetQueryParm("currMode");
|
||||
if (!string.IsNullOrEmpty(currMode))
|
||||
{
|
||||
answ = currMode.Equals("debug");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; }
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; }
|
||||
|
||||
protected int totalCount
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (ListRecords != null)
|
||||
{
|
||||
answ = ListRecords.Count;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private string checkSelect(string uid)
|
||||
{
|
||||
string answ = "";
|
||||
if (currRecord != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
answ = (currRecord.uid == uid) ? "table-info" : "";
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
private void Edit(objItem selRecord)
|
||||
{
|
||||
currRecord = selRecord;
|
||||
}
|
||||
|
||||
private async Task ForceReload()
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupero Claims dell'utente...
|
||||
///
|
||||
@@ -201,54 +273,15 @@ namespace GWMS.UI.Pages
|
||||
}
|
||||
}
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
isLoading = true;
|
||||
ListRecords = null;
|
||||
try
|
||||
{
|
||||
ListRecords = await DataService.getCurrObjItems(SelPlantCode);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione in ReloadData:{Environment.NewLine}{exc}");
|
||||
}
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void Edit(objItem selRecord)
|
||||
{
|
||||
currRecord = selRecord;
|
||||
}
|
||||
|
||||
protected async Task ForceReload()
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
// Blazor: get query parm from the URL
|
||||
protected string GetQueryParm(string parmName)
|
||||
private string GetQueryParm(string parmName)
|
||||
{
|
||||
var uriBuilder = new UriBuilder(NavManager.Uri);
|
||||
var q = System.Web.HttpUtility.ParseQueryString(uriBuilder.Query);
|
||||
return q[parmName] ?? "";
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
AppMService.ShowSearch = false;
|
||||
AppMService.PageName = "Parametri Impianto";
|
||||
AppMService.PageIcon = "fas fa-folder-open pr-2";
|
||||
AppMService.EA_SearchUpdated += OnSeachUpdated;
|
||||
StartTimer();
|
||||
await ReloadAllData();
|
||||
}
|
||||
|
||||
protected async Task ReloadAllData()
|
||||
private async Task ReloadAllData()
|
||||
{
|
||||
isLoading = true;
|
||||
PlantsList = null;
|
||||
@@ -272,7 +305,22 @@ namespace GWMS.UI.Pages
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task RemoveItem(objItem selRecord)
|
||||
private async Task ReloadData()
|
||||
{
|
||||
isLoading = true;
|
||||
ListRecords = null;
|
||||
try
|
||||
{
|
||||
ListRecords = await DataService.getCurrObjItems(SelPlantCode);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione in ReloadData:{Environment.NewLine}{exc}");
|
||||
}
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
private async Task RemoveItem(objItem selRecord)
|
||||
{
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Sicuro di voler rimuovere il parametro {selRecord.uid} ({selRecord.name})?"))
|
||||
return;
|
||||
@@ -284,77 +332,25 @@ namespace GWMS.UI.Pages
|
||||
await ReloadAllData();
|
||||
}
|
||||
|
||||
protected void ResetData()
|
||||
private void ResetData()
|
||||
{
|
||||
DataService.rollBackEdit(currRecord);
|
||||
currRecord = null;
|
||||
}
|
||||
|
||||
protected void Select(objItem selRecord)
|
||||
private void Select(objItem selRecord)
|
||||
{
|
||||
// applico filtro da selezione
|
||||
currRecord = selRecord;
|
||||
}
|
||||
|
||||
protected async Task UpdateData()
|
||||
private async Task UpdateData()
|
||||
{
|
||||
currRecord = null;
|
||||
await DataService.PlantsAnalisysResetAsync(AppMService.Order_Filter);
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public string checkSelect(string uid)
|
||||
{
|
||||
string answ = "";
|
||||
if (currRecord != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
answ = (currRecord.uid == uid) ? "table-info" : "";
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
aTimer.Stop();
|
||||
aTimer.Dispose();
|
||||
AppMService.EA_SearchUpdated -= OnSeachUpdated;
|
||||
}
|
||||
|
||||
public void ElapsedTimer(Object source, System.Timers.ElapsedEventArgs e)
|
||||
{
|
||||
var pUpd = Task.Run(async () =>
|
||||
{
|
||||
await ReloadData();
|
||||
await InvokeAsync(StateHasChanged);
|
||||
});
|
||||
pUpd.Wait();
|
||||
}
|
||||
|
||||
public async void OnSeachUpdated()
|
||||
{
|
||||
await UpdateData();
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
public void StartTimer()
|
||||
{
|
||||
int tOutPeriod = 3000;
|
||||
int.TryParse(Configuration["ReloadParamTimer"], out tOutPeriod);
|
||||
aTimer = new System.Timers.Timer(tOutPeriod);
|
||||
aTimer.Elapsed += ElapsedTimer;
|
||||
aTimer.Enabled = true;
|
||||
aTimer.Start();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -36,6 +36,7 @@
|
||||
"ReloadStatusTimer": 20000,
|
||||
"RuntimeOpt": {
|
||||
"CodApp": "GWMS",
|
||||
"RoundFact": 100,
|
||||
"NumPar": 4,
|
||||
"BaseUrl": "https://localhost:5003",
|
||||
"BaseAppPath": "/pizzaferri/",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>GWMS - Gas Warehouse Management System</i>
|
||||
<h4>Versione: 1.2.2603.0409</h4>
|
||||
<h4>Versione: 1.2.2603.1217</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.2.2603.0409
|
||||
1.2.2603.1217
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.2.2603.0409</version>
|
||||
<version>1.2.2603.1217</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/GWMS/stable/0/GWMS.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/GWMS/stable/0/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user