inizio fix giacenze

This commit is contained in:
zaccaria.majid
2022-11-29 16:42:53 +01:00
parent 4168b8cf9e
commit 15e0315544
12 changed files with 171 additions and 97 deletions
+27 -2
View File
@@ -6,6 +6,7 @@ using NLog;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
@@ -332,7 +333,7 @@ namespace MP.Data.Controllers
/// <summary>
/// Elenco giacenze
/// </summary>
/// <param name="currRec">record dossier da eliminare</param>
/// <param name="IdxOdl">id odl da cercare</param>
/// <returns></returns>
public List<AnagGiacenzeModel> ListGiacenze(int IdxOdl)
{
@@ -344,7 +345,8 @@ namespace MP.Data.Controllers
dbResult = dbCtx
.DbGiacenzeData
.AsNoTracking()
.Where(x => x.IdxOdl == IdxOdl).ToList();
.Where(x => x.IdxOdl == IdxOdl)
.ToList();
}
catch (Exception exc)
{
@@ -353,6 +355,29 @@ namespace MP.Data.Controllers
}
return dbResult;
}
/// <summary>
/// Elenco TUTTI GLI ODL
/// </summary>
/// <returns></returns>
public List<ODLModel> ListOdlAll()
{
List<ODLModel> dbResult = new List<ODLModel>();
using (var dbCtx = new MoonProContext(_configuration))
{
try
{
dbResult = dbCtx
.DbSetODL
.AsNoTracking()
.ToList();
}
catch (Exception exc)
{
Log.Error($"Eccezione durante ListOdlAll{Environment.NewLine}{exc}");
}
}
return dbResult;
}
/// <summary>
/// Elenco ultimi n record DOssiers (che contengono ad esempio "salvataggi" di FLuxLog) dato