@@ -101,8 +196,10 @@ else
|
@if (isEditing == false)
{
-
+
+
+
}
else
{
diff --git a/MP.SPEC/Components/ListDossiers.razor.cs b/MP.SPEC/Components/ListDossiers.razor.cs
index 2ce67f94..e2ef11d3 100644
--- a/MP.SPEC/Components/ListDossiers.razor.cs
+++ b/MP.SPEC/Components/ListDossiers.razor.cs
@@ -140,6 +140,17 @@ namespace MP.SPEC.Components
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 update(FluxLogDTO selRec)
{
@@ -174,11 +185,47 @@ namespace MP.SPEC.Components
}
- [Inject]
- private NavigationManager NavManager { get; set; } = null!;
+ 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);
}
@@ -199,6 +246,23 @@ namespace MP.SPEC.Components
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()
{
@@ -226,6 +290,7 @@ namespace MP.SPEC.Components
private int _totalCount = 0;
private Dossiers? currRecord = null;
+ private Dossiers? currRecordClone = null;
private List? ListRecords;
private List? ListStati;
|