diff --git a/GPW.CORE.Data/Controllers/GPWController.cs b/GPW.CORE.Data/Controllers/GPWController.cs
index f8899e5..8bb08f8 100644
--- a/GPW.CORE.Data/Controllers/GPWController.cs
+++ b/GPW.CORE.Data/Controllers/GPWController.cs
@@ -248,6 +248,38 @@ namespace GPW.CORE.Data.Controllers
return answ;
}
+ public bool RegAttUpdate(RegAttivitaModel currItem)
+ {
+ bool answ = false;
+ using (GPWContext localDbCtx = new GPWContext(_configuration))
+ {
+ try
+ {
+ var currRec = localDbCtx
+ .DbSetRegAttivita
+ .FirstOrDefault(x => x.IdxRa == currItem.IdxRa);
+ if (currRec != null)
+ {
+ currRec.IdxDipendente = currItem.IdxDipendente;
+ currRec.IdxFase = currItem.IdxFase;
+ currRec.Inizio = currItem.Inizio;
+ currRec.Fine = currItem.Fine;
+ currRec.Descrizione = currItem.Descrizione;
+
+ localDbCtx.DbSetRegAttivita.Update(currRec);
+ localDbCtx.SaveChanges();
+
+ answ = true;
+ }
+ }
+ catch (Exception exc)
+ {
+ Log.Error($"Eccezione in RegAttUpdate{Environment.NewLine}{exc}");
+ }
+ }
+ return answ;
+ }
+
///