Bozza gestione richieste

- approvazione/rifiuto
- gest base calendari
This commit is contained in:
Samuele Locatelli
2024-09-11 18:51:07 +02:00
parent 6bff05f8d4
commit db8d92cd96
19 changed files with 1591 additions and 17 deletions
@@ -2031,6 +2031,40 @@ namespace GPW.CORE.Data.Controllers
return answ;
}
/// <summary>
/// Aggiorna record registro richieste approvando la richiesta
/// </summary>
/// <param name="currItem"></param>
public bool RegRichiesteApprova(RegRichiesteModel currItem)
{
bool answ = false;
using (GPWContext localDbCtx = new GPWContext(_configuration))
{
try
{
var currRec = localDbCtx
.DbSetRegRichieste
.FirstOrDefault(x => x.IdxRegRich == currItem.IdxRegRich);
if (currRec != null)
{
currRec.Conf = true;
localDbCtx
.DbSetRegRichieste
.Update(currRec);
localDbCtx.SaveChanges();
answ = true;
}
}
catch (Exception exc)
{
Log.Error($"Eccezione in RegRichiesteApprova{Environment.NewLine}{exc}");
}
}
return answ;
}
/// <summary>
/// Elimina record registro richieste (SE non confermato)
/// </summary>