diff --git a/MP.Data/Controllers/MpInveController.cs b/MP.Data/Controllers/MpInveController.cs
index 005b46eb..919aeecf 100644
--- a/MP.Data/Controllers/MpInveController.cs
+++ b/MP.Data/Controllers/MpInveController.cs
@@ -27,7 +27,28 @@ namespace MP.Data.Controllers
{
_configuration = null;
}
+ #region gestione articoli
+ ///
+ /// articolo MAG corrispondente all' articolo selezionato
+ ///
+ ///
+ ///
+ public AnagArticoli_MAG artBySearch(string artSearch)
+ {
+ AnagArticoli_MAG dbResult = new AnagArticoli_MAG();
+ using (var dbCtx = new MoonPro_InveContext(_configuration))
+ {
+ dbResult = dbCtx
+ .DbArtMag
+ .AsNoTracking()
+ .Where(x => x.CodArt == artSearch)
+ .FirstOrDefault();
+ }
+ return dbResult;
+ }
+
+ #endregion
#region gestione config
@@ -178,7 +199,6 @@ namespace MP.Data.Controllers
#endregion gestione scansioni
-
#region gestione operatori
///
diff --git a/MP.Data/DatabaseModels/AnagArticoli_MAG.cs b/MP.Data/DatabaseModels/AnagArticoli_MAG.cs
new file mode 100644
index 00000000..62c5de77
--- /dev/null
+++ b/MP.Data/DatabaseModels/AnagArticoli_MAG.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+#nullable disable
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
+
+namespace MP.Data.DatabaseModels
+{
+ [Table("AnagArticoli")]
+ public partial class AnagArticoli_MAG
+ {
+ #region Public Properties
+ [Key]
+ public string CodArt { get; set; }
+ public string DescrArt { get; set; }
+ public string CodArtExt { get; set; }
+ public string CodStato { get; set; }
+
+ #endregion Public Properties
+ }
+}
diff --git a/MP.Data/MoonPro_InveContext.cs b/MP.Data/MoonPro_InveContext.cs
index e656d1c9..323c5fa6 100644
--- a/MP.Data/MoonPro_InveContext.cs
+++ b/MP.Data/MoonPro_InveContext.cs
@@ -52,6 +52,7 @@ namespace MP.Data
public virtual DbSet DbScanData { get; set; }
public virtual DbSet DbUdcData { get; set; }
public virtual DbSet DbLottoData { get; set; }
+ public virtual DbSet DbArtMag { get; set; }
#endregion PER INVE
#region PER SPEC