diff --git a/MP.Data/Controllers/MpIocController.cs b/MP.Data/Controllers/MpIocController.cs
index a70f7c09..729bdceb 100644
--- a/MP.Data/Controllers/MpIocController.cs
+++ b/MP.Data/Controllers/MpIocController.cs
@@ -153,6 +153,23 @@ namespace MP.Data.Controllers
}
return dbResult;
}
+ ///
+ /// Intera tab dati macchina
+ ///
+ ///
+ public async Task> DatiMacchineGetAllAsync()
+ {
+ List dbResult = new List();
+ using (var dbCtx = new MoonProContext(_configuration))
+ {
+ dbResult = await dbCtx
+ .DbSetDatiMacchine
+ .AsNoTracking()
+ .OrderBy(x => x.IdxMacchina)
+ .ToListAsync();
+ }
+ return dbResult;
+ }
///
/// Inserimento record in DDB
@@ -318,6 +335,28 @@ namespace MP.Data.Controllers
return fatto;
}
+ ///
+ /// Record ConfFlux dato macchina (oppure tutti se vuoto)
+ ///
+ ///
+ ///
+ public async Task> ConfFluxFiltAsync(string idxMacc)
+ {
+ List dbResult = new();
+ using (var dbCtx = new MoonPro_FluxContext(_configuration))
+ {
+ var query = dbCtx.DbSetConfFlux
+ .AsNoTracking()
+ .AsQueryable();
+
+ if (!string.IsNullOrEmpty(idxMacc))
+ query = query.Where(x => x.IdxMacchina == idxMacc);
+
+ dbResult = await query.ToListAsync();
+ }
+ return dbResult;
+ }
+
public bool KeepAliveUpsert(string IdxMacc, DateTime OraServer, DateTime OraMacc)
{
bool fatto = false;
diff --git a/MP.Data/DbModels/ConfFluxModel.cs b/MP.Data/DbModels/ConfFluxModel.cs
new file mode 100644
index 00000000..68495241
--- /dev/null
+++ b/MP.Data/DbModels/ConfFluxModel.cs
@@ -0,0 +1,26 @@
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+
+
+#nullable disable
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
+namespace MP.Data.DbModels
+{
+ [Table("ConfFlux")]
+ public partial class ConfFluxModel
+ {
+ #region Public Properties
+
+ [MaxLength(50)]
+ public string IdxMacchina { get; set; }
+
+ [MaxLength(50)]
+ public string CodFlux { get; set; }
+
+ public bool EnabDoss { get; set; }
+
+ #endregion Public Properties
+ }
+}
\ No newline at end of file
diff --git a/MP.Data/MoonPro_FluxContext.cs b/MP.Data/MoonPro_FluxContext.cs
index f68e84eb..bf060309 100644
--- a/MP.Data/MoonPro_FluxContext.cs
+++ b/MP.Data/MoonPro_FluxContext.cs
@@ -1,11 +1,9 @@
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using MP.Core.DTO;
using MP.Data.DbModels;
-using MP.Data.DTO;
using NLog;
+using System;
#nullable disable
//
@@ -54,6 +52,8 @@ namespace MP.Data
public virtual DbSet DbSetFluxLog { get; set; }
public virtual DbSet DbSetDossiers { get; set; }
public virtual DbSet DbSetParetoFluxLog { get; set; }
+ public virtual DbSet DbSetConfFlux { get; set; }
+
#endregion Public Properties