Filtro elenco gruppi dato utente (LIMITE selezione)
This commit is contained in:
@@ -97,10 +97,10 @@ namespace GPW.CORE.Data.Controllers
|
||||
try
|
||||
{
|
||||
// recupero intero set...
|
||||
var dbResult = localDbCtx
|
||||
.DbSetAnagFasi
|
||||
.Where(x => x.IdxFase==idxFase)
|
||||
.FirstOrDefault();
|
||||
var dbResult = localDbCtx
|
||||
.DbSetAnagFasi
|
||||
.Where(x => x.IdxFase == idxFase)
|
||||
.FirstOrDefault();
|
||||
if (dbResult != null)
|
||||
{
|
||||
dbResult.Attivo = isActive;
|
||||
@@ -139,6 +139,29 @@ namespace GPW.CORE.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public List<AnagGruppiModel> AnagGruppiUser(int idxDipendente)
|
||||
{
|
||||
// init dati necessari
|
||||
List<AnagGruppiModel> dbResult = new List<AnagGruppiModel>();
|
||||
// cerco su DB recuperando set di dati....
|
||||
using (GPWContext localDbCtx = new GPWContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// recupero intero set...
|
||||
dbResult = localDbCtx
|
||||
.DbSetAnagGruppi
|
||||
.Where(x => x.Dipendenti2GruppiNav.Contains(new Dipendenti2GruppiModel() { IdxDipendente = idxDipendente, Gruppo = x.Gruppo }))
|
||||
.ToList();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Errore in AnagGruppiUser:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public List<AnagProgettiModel> AnagProjAll(bool onlyActive)
|
||||
{
|
||||
// init dati necessari
|
||||
|
||||
Reference in New Issue
Block a user