DbSetEvList { get; set; }
diff --git a/MP.SPEC/Components/ListDossiers.razor b/MP.SPEC/Components/ListDossiers.razor
index 46df94e2..83356622 100644
--- a/MP.SPEC/Components/ListDossiers.razor
+++ b/MP.SPEC/Components/ListDossiers.razor
@@ -207,11 +207,11 @@ else
}
|
- @record.OdlNav.CodArticolo
- @record.OdlNav.ArticoloNav.DescArticolo
+ @record.CodArticolo
+ @record.ArticoloNav.DescArticolo
|
- @tradFase(record.OdlNav.KeyRichiesta)
+ @tradFase(record.KeyRichiesta)
|
@record.IdxMacchina
@@ -277,8 +277,8 @@ else
@record.dtEvento
|
- @record.CodFlux
- @traduci(record.CodFlux)
+ @traduci(record.CodFlux)
+ @record.CodFlux
|
@if (record.ValoreEdit != record.Valore)
diff --git a/MP.SPEC/Components/ListDossiers.razor.cs b/MP.SPEC/Components/ListDossiers.razor.cs
index b1c69a7f..f04d9b29 100644
--- a/MP.SPEC/Components/ListDossiers.razor.cs
+++ b/MP.SPEC/Components/ListDossiers.razor.cs
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Components;
-using Microsoft.AspNetCore.DataProtection;
using Microsoft.JSInterop;
using MP.Data.DatabaseModels;
using MP.Data.DTO;
@@ -13,7 +12,7 @@ namespace MP.SPEC.Components
#region Public Properties
[Parameter]
- public EventCallback RecordSel { get; set; }
+ public EventCallback RecordSel { get; set; }
[Parameter]
public EventCallback RecordSelFlux { get; set; }
@@ -23,15 +22,25 @@ namespace MP.SPEC.Components
[Parameter]
public EventCallback TotRecordChanged { get; set; }
- [Inject]
- private NavigationManager NavManager { get; set; } = null!;
#endregion Public Properties
#region Public Methods
- private FluxLogDTO? currFluxLogDto = null;
-
+ public string checkSelect(DossierModel recordSel)
+ {
+ string answ = "";
+ if (currRecord != null)
+ {
+ try
+ {
+ answ = (currRecord.IdxMacchina == recordSel.IdxMacchina && currRecord.DtRif == recordSel.DtRif) ? "table-info" : "";
+ }
+ catch
+ { }
+ }
+ return answ;
+ }
public string checkSelPar(FluxLogDTO recordSel)
{
@@ -48,21 +57,6 @@ namespace MP.SPEC.Components
return answ;
}
- public string checkSelect(Dossiers recordSel)
- {
- string answ = "";
- if (currRecord != null)
- {
- try
- {
- answ = (currRecord.IdxMacchina == recordSel.IdxMacchina && currRecord.DtRif == recordSel.DtRif) ? "table-info" : "";
-
- }
- catch
- { }
- }
- return answ;
- }
public void Dispose()
{
currRecord = null;
@@ -70,40 +64,72 @@ namespace MP.SPEC.Components
ListRecords = null;
GC.Collect();
}
- private SelectDossierParams lastFilter { get; set; } = new SelectDossierParams() { CurrPage = -1 };
- protected override async Task OnParametersSetAsync()
- {
- if (!lastFilter.Equals(SelFilter))
- {
- lastFilter = SelFilter.clone();
- await reloadData(true);
- }
- }
+
#endregion Public Methods
#region Protected Properties
- private string traduci(string lemma)
- {
- var answ = MDService.Traduci(lemma, "IT");
- return answ;
- }
-
[Inject]
protected IJSRuntime JSRuntime { get; set; } = null!;
[Inject]
protected MpDataService MDService { get; set; } = null!;
+
#endregion Protected Properties
#region Protected Methods
+ protected async Task cancel()
+ {
+ var alert = await JSRuntime.InvokeAsync("confirm", "Confermi di voler annullare TUTTE le modifiche? i dati saranno ricaricati.");
+ if (alert)
+ {
+ currFluxLogDto = null;
+ isEditing = false;
+ await Task.Delay(1);
+ if (currRecord != null)
+ {
+ listaFlux = MDService.getFluxLog(currRecord.Valore);
+ }
+ StateHasChanged();
+ }
+ }
+
+ protected async Task cancelNewDoss()
+ {
+ var alert = await JSRuntime.InvokeAsync("confirm", "Confermi di voler annullare l'aggiunta di un nuovo dossier? i dati saranno ricaricati.");
+ if (alert)
+ {
+ currRecordClone = null;
+ isEditing = false;
+ await Task.Delay(1);
+ StateHasChanged();
+ }
+ }
+
+ protected async Task cloneRecord(DossierModel selRec)
+ {
+ // creo record duplicato...
+ DossierModel newRec = new DossierModel()
+ {
+ IdxDossier = 0,
+ DataType = selRec.DataType,
+ DtRif = DateTime.Now,
+ IdxMacchina = selRec.IdxMacchina,
+ CodArticolo = selRec.CodArticolo,
+ IdxODL = 0,
+ Valore = selRec.Valore,
+ };
+ currRecordClone = newRec;
+ await Task.Delay(1);
+ }
+
///
/// Eliminazione record selezionato (previa conferma)
///
///
///
- protected async Task deleteRecord(Dossiers selRec)
+ protected async Task deleteRecord(DossierModel selRec)
{
if (!await JSRuntime.InvokeAsync("confirm", "Eliminazione Dossier: sei sicuro di voler procedere?"))
return;
@@ -122,45 +148,78 @@ namespace MP.SPEC.Components
await RecordSelFlux.InvokeAsync(selRec);
}
- private void enableEditing()
+ protected async Task newDossier(DossierModel selRec)
{
- isEditing = true;
- }
+ var alert = await JSRuntime.InvokeAsync("confirm", "Confermi di voler creare un nuovo Dossier per l'impianto/articolo selezioanto?");
- protected async Task cancel()
- {
- var alert = await JSRuntime.InvokeAsync("confirm", "Confermi di voler annullare TUTTE le modifiche? i dati saranno ricaricati.");
if (alert)
{
- currFluxLogDto = null;
- isEditing = false;
await Task.Delay(1);
- if (currRecord != null)
+ if (currRecordClone != null)
{
- listaFlux = MDService.getFluxLog(currRecord.Valore);
+ // serializzo valore x flux log...
+ DossierFluxLogDTO updatedResult = new DossierFluxLogDTO() { ODL = listaFlux };
+ string newVal = JsonConvert.SerializeObject(updatedResult);
+ // preparo x insert
+ currRecordClone.DtRif = DateTime.Now;
+ currRecordClone.Valore = newVal;
+ // METODO PER UPDATE FLUX
+ await MDService.DossiersInsert(currRecordClone);
+ currRecordClone = null;
+ isEditing = false;
+ await Task.Delay(1);
+ StateHasChanged();
}
- StateHasChanged();
+ return;
}
- }
- protected async Task cancelNewDoss()
- {
- var alert = await JSRuntime.InvokeAsync("confirm", "Confermi di voler annullare l'aggiunta di un nuovo dossier? i dati saranno ricaricati.");
- if (alert)
+ else
{
currRecordClone = null;
- isEditing = false;
await Task.Delay(1);
- StateHasChanged();
+ // TOGLIERE!!!!!
+ await JSRuntime.InvokeAsync("location.reload");
}
}
+ protected override async Task OnInitializedAsync()
+ {
+ ListGruppiFase = await MDService.ElencoGruppiFase();
+ ListStati = await MDService.AnagStatiComm();
+ await reloadData(true);
+ }
+
+ protected override async Task OnParametersSetAsync()
+ {
+ if (!lastFilter.Equals(SelFilter))
+ {
+ lastFilter = SelFilter.clone();
+ await reloadData(true);
+ }
+ }
+
+ protected async void OnSeachUpdated()
+ {
+ await InvokeAsync(() =>
+ {
+ currPage = 1;
+ StateHasChanged();
+ });
+ }
+
+ protected async Task selRecord(DossierModel selRec)
+ {
+ currRecord = selRec;
+ await RecordSel.InvokeAsync(selRec);
+ listaFlux = MDService.getFluxLog(selRec.Valore);
+ await toggleTableFlux();
+ }
+
protected async Task update(FluxLogDTO selRec)
{
var alert = await JSRuntime.InvokeAsync("confirm", "Confermi di voler salvare TUTTE le modifiche? queste saranno parte del dossier inviato all'impianto");
if (alert)
{
-
await Task.Delay(1);
if (currRecord != null)
{
@@ -184,106 +243,13 @@ namespace MP.SPEC.Components
// rimando a pagina corrente
NavManager.NavigateTo(NavManager.Uri, true);
}
-
}
- protected async Task newDossier(Dossiers selRec)
- {
- var alert = await JSRuntime.InvokeAsync("confirm", "Confermi di voler salvare TUTTE le modifiche? queste saranno parte del dossier inviato all'impianto");
-
- if (alert)
- {
-
- await Task.Delay(1);
- if (currRecordClone != null)
- {
- // serializzo valore x flux log...
- DossierFluxLogDTO updatedResult = new DossierFluxLogDTO() { ODL = listaFlux };
- string newVal = JsonConvert.SerializeObject(updatedResult);
- currRecordClone.DataType = selRec.DataType;
- currRecordClone.DtRif = DateTime.Now;
- currRecordClone.IdxMacchina = selRec.IdxMacchina;
- currRecordClone.CodArticolo = selRec.CodArticolo;
- currRecordClone.IdxODL = selRec.IdxODL;
- currRecordClone.Valore = selRec.Valore;
- // METODO PER UPDATE FLUX
- await MDService.DossiersInsert(currRecordClone);
- currRecordClone = null;
- isEditing = false;
- await Task.Delay(1);
- StateHasChanged();
- }
- return;
- }
- else
- {
- currRecordClone = null;
- await Task.Delay(1);
- await JSRuntime.InvokeAsync("location.reload");
-
- }
-
- }
-
- protected override async Task OnInitializedAsync()
- {
- ListGruppiFase = await MDService.ElencoGruppiFase();
- ListStati = await MDService.AnagStatiComm();
- await reloadData(true);
- }
-
- protected async void OnSeachUpdated()
- {
- await InvokeAsync(() =>
- {
- currPage = 1;
- StateHasChanged();
- });
- }
-
- protected async Task selRecord(Dossiers selRec)
- {
- currRecord = selRec;
- await RecordSel.InvokeAsync(selRec);
- listaFlux = MDService.getFluxLog(selRec.Valore);
- await toggleTableFlux();
- }
- protected async Task cloneRecord(Dossiers selRec)
- {
- // creo record duplicato...
- Dossiers newRec = new Dossiers()
- {
- IdxDossier = selRec.IdxDossier,
- DataType = selRec.DataType,
- DtRif = selRec.DtRif,
- IdxMacchina = selRec.IdxMacchina,
- CodArticolo = selRec.CodArticolo,
- IdxODL = selRec.IdxODL,
- Valore = selRec.Valore,
- };
- currRecordClone = selRec;
- await Task.Delay(1);
- }
- private List? ListGruppiFase;
-
protected async Task UpdateData()
{
currRecord = null;
await reloadData(true);
}
- private string css()
- {
- string answ = "";
- if (isEditing)
- {
- answ = "visible";
- }
- else
- {
- answ = "hidden";
- }
- return answ;
- }
#endregion Protected Methods
@@ -291,13 +257,19 @@ namespace MP.SPEC.Components
private int _totalCount = 0;
- private Dossiers? currRecord = null;
- private Dossiers? currRecordClone = null;
+ private FluxLogDTO? currFluxLogDto = null;
+
+ private DossierModel? currRecord = null;
+
+ private DossierModel? currRecordClone = null;
+
+ private List? ListGruppiFase;
+
+ private List? ListRecords;
- private List? ListRecords;
private List? ListStati;
- private List? SearchRecords;
+ private List? SearchRecords;
#endregion Private Fields
@@ -317,6 +289,8 @@ namespace MP.SPEC.Components
private bool isLoading { get; set; } = false;
+ private SelectDossierParams lastFilter { get; set; } = new SelectDossierParams() { CurrPage = -1 };
+
private List? listaFlux { get; set; } = null;
private int MaxRecord
@@ -324,6 +298,9 @@ namespace MP.SPEC.Components
get => SelFilter.MaxRecord;
}
+ [Inject]
+ private NavigationManager NavManager { get; set; } = null!;
+
private int numRecord
{
get => SelFilter.NumRec;
@@ -339,6 +316,7 @@ namespace MP.SPEC.Components
{
get => SelFilter.DtEnd;
}
+
private DateTime SelDtStart
{
get => SelFilter.DtStart;
@@ -368,6 +346,35 @@ namespace MP.SPEC.Components
#region Private Methods
+ private async Task closeTableFlux()
+ {
+ currFluxLogDto = null;
+ currRecord = null;
+ visualizzaFlux = true;
+ isEditing = false;
+ await RecordSelFlux.InvokeAsync(currFluxLogDto);
+ await Task.Delay(1);
+ }
+
+ private string css()
+ {
+ string answ = "";
+ if (isEditing)
+ {
+ answ = "visible";
+ }
+ else
+ {
+ answ = "hidden";
+ }
+ return answ;
+ }
+
+ private void enableEditing()
+ {
+ isEditing = true;
+ }
+
private async Task reloadData(bool setChanged)
{
isLoading = true;
@@ -402,14 +409,10 @@ namespace MP.SPEC.Components
return answ;
}
- private async Task closeTableFlux()
+ private string traduci(string lemma)
{
- currFluxLogDto = null;
- currRecord = null;
- visualizzaFlux = true;
- isEditing = false;
- await RecordSelFlux.InvokeAsync(currFluxLogDto);
- await Task.Delay(1);
+ var answ = MDService.Traduci(lemma, "IT");
+ return answ;
}
#endregion Private Methods
diff --git a/MP.SPEC/Data/MpDataService.cs b/MP.SPEC/Data/MpDataService.cs
index 81bc0a03..bdcf0c87 100644
--- a/MP.SPEC/Data/MpDataService.cs
+++ b/MP.SPEC/Data/MpDataService.cs
@@ -338,7 +338,7 @@ namespace MP.SPEC.Data
///
/// record dossier da eliminare
///
- public async Task DossiersDeleteRecord(Dossiers selRecord)
+ public async Task DossiersDeleteRecord(DossierModel selRecord)
{
bool result = false;
Stopwatch stopWatch = new Stopwatch();
@@ -361,9 +361,9 @@ namespace MP.SPEC.Data
/// Data minima per estrazione records
/// Data Massima per estrazione records
///
- public async Task> DossiersGetLastFilt(string IdxMacchina, string CodArticolo, DateTime DtStart, DateTime DtEnd)
+ public async Task> DossiersGetLastFilt(string IdxMacchina, string CodArticolo, DateTime DtStart, DateTime DtEnd)
{
- List? result = new List();
+ List? result = new List();
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
string readType = "DB";
@@ -372,7 +372,7 @@ namespace MP.SPEC.Data
RedisValue rawData = redisDb.StringGet(currKey);
if (rawData.HasValue)
{
- result = JsonConvert.DeserializeObject>($"{rawData}");
+ result = JsonConvert.DeserializeObject>($"{rawData}");
readType = "REDIS";
}
else
@@ -384,7 +384,7 @@ namespace MP.SPEC.Data
}
if (result == null)
{
- result = new List();
+ result = new List();
}
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
@@ -397,7 +397,7 @@ namespace MP.SPEC.Data
///
///
///
- public async Task DossiersInsert(Dossiers currDoss)
+ public async Task DossiersInsert(DossierModel currDoss)
{
// aggiorno record sul DB
bool answ = await dbController.DossiersInsert(currDoss);
@@ -451,7 +451,7 @@ namespace MP.SPEC.Data
///
///
///
- public async Task DossiersUpdateValore(Dossiers currDoss)
+ public async Task DossiersUpdateValore(DossierModel currDoss)
{
// aggiorno record sul DB
bool answ = await dbController.DossiersUpdateValore(currDoss);
@@ -910,7 +910,7 @@ namespace MP.SPEC.Data
return answ;
}
- public async Task updateDossierValue(Dossiers currDoss, FluxLogDTO editFL)
+ public async Task updateDossierValue(DossierModel currDoss, FluxLogDTO editFL)
{
bool answ = false;
// recupero intero set valori dossier deserializzando...
diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj
index 7b05c1a1..41d48c46 100644
--- a/MP.SPEC/MP.SPEC.csproj
+++ b/MP.SPEC/MP.SPEC.csproj
@@ -5,7 +5,7 @@
enable
enable
MP.SPEC
- 6.16.2211.409
+ 6.16.2211.410
diff --git a/MP.SPEC/Pages/DOSS.razor.cs b/MP.SPEC/Pages/DOSS.razor.cs
index af62c038..db3034d7 100644
--- a/MP.SPEC/Pages/DOSS.razor.cs
+++ b/MP.SPEC/Pages/DOSS.razor.cs
@@ -50,7 +50,7 @@ namespace MP.SPEC.Pages
isFiltering = false;
}
- protected async Task selRecordDoss(Dossiers selDoss)
+ protected async Task selRecordDoss(DossierModel selDoss)
{
currRecordDoss = selDoss;
await Task.Delay(1);
@@ -78,7 +78,7 @@ namespace MP.SPEC.Pages
set => currFilter.CurrPage = value;
}
- private Dossiers? currRecordDoss { get; set; } = null;
+ private DossierModel? currRecordDoss { get; set; } = null;
private bool isEditing
{
diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html
index 383b221f..1ded9ae5 100644
--- a/MP.SPEC/Resources/ChangeLog.html
+++ b/MP.SPEC/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOSPEC
- Versione: 6.16.2211.409
+ Versione: 6.16.2211.410
Note di rilascio:
-
diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt
index 289a3afe..45c4675e 100644
--- a/MP.SPEC/Resources/VersNum.txt
+++ b/MP.SPEC/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2211.409
+6.16.2211.410
diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml
index 9becd7e2..47c7e4e5 100644
--- a/MP.SPEC/Resources/manifest.xml
+++ b/MP.SPEC/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2211.409
+ 6.16.2211.410
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
|