Fix selezione ODL quando disponibile....
This commit is contained in:
@@ -825,6 +825,36 @@ namespace MP.Data.Controllers
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
/// <summary>
|
||||
/// Recupero PODL da chiave
|
||||
/// </summary>
|
||||
/// <param name="idxPODL"></param>
|
||||
/// <returns></returns>
|
||||
public PODLExpModel PODLExp_getByKey(int idxPODL)
|
||||
{
|
||||
PODLExpModel dbResult = new PODLExpModel();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var IdxPromessa = new SqlParameter("@IdxPromessa", idxPODL);
|
||||
var rawResult = dbCtx
|
||||
.DbSetPODLExp
|
||||
.FromSqlRaw("EXEC stp_PODL_getByIdx @IdxPromessa", IdxPromessa)
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
if (rawResult != null && rawResult.Count > 0)
|
||||
{
|
||||
dbResult = rawResult.FirstOrDefault();
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante PODL_getByKey{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stato prod macchina
|
||||
|
||||
Reference in New Issue
Block a user