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 @@ -
- mettere QRCODE da https://qrcode.steamware.net/
- | Impianto | Data Ordine | Ordine | @@ -96,6 +101,7 @@ @foreach (var record in ListRecords) {|
|---|---|---|---|
|
@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 e525ff7..ddcf199 100644
--- a/GWMS.UI/Pages/Suppliers.razor
+++ b/GWMS.UI/Pages/Suppliers.razor
@@ -7,7 +7,7 @@
- Elenco Ordini Fornitore
+ Ordini Fornitore
@@ -54,7 +54,6 @@
+
@if (currRecord != null)
{
- Versione: 1.0.2106.1918+Versione: 1.0.2106.2117Note di rilascio:
|