SPEC, statistiche ODL:
-aggiunta model e controllo x recupero stat da stored
This commit is contained in:
@@ -184,7 +184,7 @@ namespace MP.Data.Controllers
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetArticoli
|
||||
.DbSetArticoli
|
||||
.FromSqlRaw("EXEC stp_ART_getUsed")
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
@@ -192,6 +192,26 @@ namespace MP.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Statistiche ODL calcolate (da stored stp_STAT_ODL)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<StatODLModel> StatOdl(int IdxOdl)
|
||||
{
|
||||
List<StatODLModel> dbResult = new List<StatODLModel>();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
{
|
||||
var IdxODL = new SqlParameter("@IdxODL", IdxOdl);
|
||||
|
||||
dbResult = dbCtx
|
||||
.DbSetStatOdl
|
||||
.FromSqlRaw("EXEC stp_STAT_ODL @IdxODL", IdxODL)
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update Record
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
|
||||
#nullable disable
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
namespace MP.Data.DatabaseModels
|
||||
{
|
||||
public partial class StatODLModel
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public int IdxStato { get; set; }
|
||||
public string DescrizioneCodArticolo { get; set; } = "";
|
||||
public string Semaforo { get; set; }
|
||||
public string Css { get; set; }
|
||||
public decimal TotDurata { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
@@ -48,6 +48,7 @@ namespace MP.Data
|
||||
public virtual DbSet<PODLModel> DbSetPODL { get; set; }
|
||||
public virtual DbSet<FluxLog> DbSetFluxLog { get; set; }
|
||||
public virtual DbSet<Dossiers> DbSetDossiers { get; set; }
|
||||
public virtual DbSet<StatODLModel> DbSetStatOdl { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
|
||||
Reference in New Issue
Block a user