-
+
@*
*@
diff --git a/MP.Stats/Pages/Scarti.razor b/MP.Stats/Pages/Scarti.razor
index c6503e13..513ece02 100644
--- a/MP.Stats/Pages/Scarti.razor
+++ b/MP.Stats/Pages/Scarti.razor
@@ -12,7 +12,7 @@
}
@if (ListRecords == null)
{
-
Loading...
+
}
else
{
diff --git a/MP.Stats/Pages/Scarti.razor.cs b/MP.Stats/Pages/Scarti.razor.cs
index 2a8a3d36..2f95202e 100644
--- a/MP.Stats/Pages/Scarti.razor.cs
+++ b/MP.Stats/Pages/Scarti.razor.cs
@@ -43,7 +43,7 @@ namespace MP.Stats.Pages
protected async Task ForceReload(int newNum)
{
numRecord = newNum;
- ListRecords = await StatService.ScartiGetAll(numRecord, MessageService.SearchVal);
+ ListRecords = await StatService.StatScartiGetAll(numRecord, MessageService.SearchVal);
}
protected override async Task OnInitializedAsync()
@@ -51,7 +51,7 @@ namespace MP.Stats.Pages
numRecord = 10;
MessageService.ShowSearch = true;
MessageService.EA_SearchUpdated += OnSeachUpdated;
- ListRecords = await StatService.ScartiGetAll(numRecord, MessageService.SearchVal);
+ ListRecords = await StatService.StatScartiGetAll(numRecord, MessageService.SearchVal);
}
protected void ResetData()
@@ -63,7 +63,7 @@ namespace MP.Stats.Pages
protected async Task UpdateData()
{
currRecord = null;
- ListRecords = await StatService.ScartiGetAll(numRecord, MessageService.SearchVal);
+ ListRecords = await StatService.StatScartiGetAll(numRecord, MessageService.SearchVal);
}
#endregion Protected Methods
@@ -100,48 +100,5 @@ namespace MP.Stats.Pages
}
#endregion Public Methods
-
-#if false
- [Inject]
- protected BBM_SelectData SelectData { get; set; }
-
- protected void CreateNew()
- {
- // recupero counter
- string newCode = BBMService.CounterGetNext("EGW.B", 6);
- DatabaseModels.BasketsModel newRecord = new DatabaseModels.BasketsModel()
- {
- CodBasket = newCode,
- DataIns = DateTime.Now,
- CustomerId = 1,
- Descript = "New Basket"
- };
- currBasket = newRecord;
- }
-
- protected async Task Delete(SHERPA.BBM.DatabaseModels.BasketsModel currRecord)
- {
- if (!await JSRuntime.InvokeAsync
("confirm", $"Sicuro di voler eliminare il Basket '{currRecord.CodBasket}'?"))
- return;
-
- BBMService.BasketsDelete(currRecord);
- await UpdateData();
- }
-
- protected void Edit(SHERPA.BBM.DatabaseModels.BasketsModel currRecord)
- {
- currBasket = currRecord;
- }
-
- protected void ShowDocs(SHERPA.BBM.DatabaseModels.BasketsModel currRecord)
- {
- // salvo
- SelectData.BasketId = currRecord.BasketId;
- SelectData.NegotiationId = 0;
- // rimando...
- NavManager.NavigateTo("docs");
- }
-
-#endif
}
}
\ No newline at end of file
diff --git a/MP.Stats/Pages/UserLog.razor b/MP.Stats/Pages/UserLog.razor
new file mode 100644
index 00000000..cd9a068c
--- /dev/null
+++ b/MP.Stats/Pages/UserLog.razor
@@ -0,0 +1,59 @@
+@page "/userlog"
+
+@using MP.Stats.Components
+@using MP.Stats.Data
+
+
+
+
+ @if (currRecord != null)
+ {
+ @*
*@
+ }
+ @if (ListRecords == null)
+ {
+
+ }
+ else
+ {
+
+
+
+ @* | *@
+ Macchina |
+ Data |
+ ODL/Commessa |
+ Articolo |
+ Azione |
+ Descrizione |
+ Operatore |
+
+
+
+ @foreach (var record in ListRecords)
+ {
+
+ @*| | *@
+ @record.IdxMacchina |
+ @record.DataOraRif |
+ - |
+ @record.CodArticolo |
+ @record.Azione |
+ @record.Valore |
+ @record.Cognome @record.Nome |
+
+ }
+
+
+ }
+
+
+
\ No newline at end of file
diff --git a/MP.Stats/Pages/UserLog.razor.cs b/MP.Stats/Pages/UserLog.razor.cs
new file mode 100644
index 00000000..a343b2dd
--- /dev/null
+++ b/MP.Stats/Pages/UserLog.razor.cs
@@ -0,0 +1,104 @@
+using Microsoft.AspNetCore.Components;
+using Microsoft.JSInterop;
+using MP.Stats.Data;
+using System;
+using System.Threading.Tasks;
+
+namespace MP.Stats.Pages
+{
+ public partial class UserLog : ComponentBase, IDisposable
+ {
+ #region Private Fields
+
+ private MP.Data.DatabaseModels.UserActionLog currRecord = null;
+
+ private MP.Data.DatabaseModels.UserActionLog[] ListRecords;
+
+ #endregion Private Fields
+
+ #region Private Properties
+
+ private int numRecord { get; set; } = 10;
+
+ #endregion Private Properties
+
+ #region Protected Properties
+
+ [Inject]
+ protected IJSRuntime JSRuntime { get; set; }
+
+ [Inject]
+ protected MessageService MessageService { get; set; }
+
+ [Inject]
+ protected NavigationManager NavManager { get; set; }
+
+ [Inject]
+ protected MpStatsService StatService { get; set; }
+
+ #endregion Protected Properties
+
+ #region Protected Methods
+
+ protected async Task ForceReload(int newNum)
+ {
+ numRecord = newNum;
+ ListRecords = await StatService.StatUserLogGetAll(numRecord, MessageService.SearchVal);
+ }
+
+ protected override async Task OnInitializedAsync()
+ {
+ numRecord = 10;
+ MessageService.ShowSearch = true;
+ MessageService.EA_SearchUpdated += OnSeachUpdated;
+ ListRecords = await StatService.StatUserLogGetAll(numRecord, MessageService.SearchVal);
+ }
+
+ protected void ResetData()
+ {
+ StatService.rollBackEdit(currRecord);
+ currRecord = null;
+ }
+
+ protected async Task UpdateData()
+ {
+ currRecord = null;
+ ListRecords = await StatService.StatUserLogGetAll(numRecord, MessageService.SearchVal);
+ }
+
+ #endregion Protected Methods
+
+ #region Public Methods
+
+ public string checkSelect(int IdxLog)
+ {
+ string answ = "";
+ if (currRecord != null)
+ {
+ try
+ {
+ answ = (currRecord.IdxLog == IdxLog) ? "table-info" : "";
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
+
+ public void Dispose()
+ {
+ MessageService.EA_SearchUpdated -= OnSeachUpdated;
+ }
+
+ public void OnSeachUpdated()
+ {
+ InvokeAsync(() =>
+ {
+ UpdateData();
+ StateHasChanged();
+ });
+ }
+
+ #endregion Public Methods
+ }
+}
\ No newline at end of file
diff --git a/MP.Stats/Shared/NavMenu.razor b/MP.Stats/Shared/NavMenu.razor
index a2d36f59..78ef73f4 100644
--- a/MP.Stats/Shared/NavMenu.razor
+++ b/MP.Stats/Shared/NavMenu.razor
@@ -18,7 +18,7 @@
-
+
User ActionLog