diff --git a/MP-TAB3/MP-TAB3.csproj b/MP-TAB3/MP-TAB3.csproj
index 524e7c03..ae8cba14 100644
--- a/MP-TAB3/MP-TAB3.csproj
+++ b/MP-TAB3/MP-TAB3.csproj
@@ -3,7 +3,7 @@
net6.0
enable
- 6.16.2412.2310
+ 6.16.2502.1011
enable
MP_TAB3
diff --git a/MP-TAB3/Resources/ChangeLog.html b/MP-TAB3/Resources/ChangeLog.html
index 24028895..43fb1c86 100644
--- a/MP-TAB3/Resources/ChangeLog.html
+++ b/MP-TAB3/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOSPEC
- Versione: 6.16.2412.2310
+ Versione: 6.16.2502.1011
Note di rilascio:
-
diff --git a/MP-TAB3/Resources/VersNum.txt b/MP-TAB3/Resources/VersNum.txt
index 7ab0f611..7dc780a1 100644
--- a/MP-TAB3/Resources/VersNum.txt
+++ b/MP-TAB3/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2412.2310
+6.16.2502.1011
diff --git a/MP-TAB3/Resources/manifest.xml b/MP-TAB3/Resources/manifest.xml
index a83db78c..3b96a05b 100644
--- a/MP-TAB3/Resources/manifest.xml
+++ b/MP-TAB3/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2412.2310
+ 6.16.2502.1011
https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip
https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html
false
diff --git a/MP.Data/Controllers/MpIocController.cs b/MP.Data/Controllers/MpIocController.cs
index 5b289575..e9cf347e 100644
--- a/MP.Data/Controllers/MpIocController.cs
+++ b/MP.Data/Controllers/MpIocController.cs
@@ -130,7 +130,7 @@ namespace MP.Data.Controllers
public List FluxLogGetLastFilt(DateTime DtMax, DateTime DtMin, string IdxMacchina, string CodFlux, int MaxRec)
{
List dbResult = new List();
- using (var dbCtx = new MoonProContext(_configuration))
+ using (var dbCtx = new MoonPro_FluxContext(_configuration))
{
dbResult = dbCtx
.DbSetFluxLog
diff --git a/MP.Data/Controllers/MpSpecController.cs b/MP.Data/Controllers/MpSpecController.cs
index 9ba39d77..b3c1f5bc 100644
--- a/MP.Data/Controllers/MpSpecController.cs
+++ b/MP.Data/Controllers/MpSpecController.cs
@@ -128,14 +128,14 @@ namespace MP.Data.Controllers
public List ArticleWithDossier()
{
List dbResult = new List();
- using (var dbCtx = new MoonProContext(_configuration))
+ using (var dbCtx = new MoonPro_FluxContext(_configuration))
{
dbResult = dbCtx
- .DbSetDossiers
- .AsNoTracking()
- .Select(i => i.CodArticolo)
- .Distinct()
- .ToList();
+ .DbSetDossiers
+ .AsNoTracking()
+ .Select(i => i.CodArticolo)
+ .Distinct()
+ .ToList();
}
return dbResult;
}
@@ -347,7 +347,7 @@ namespace MP.Data.Controllers
public async Task DossiersDeleteRecord(DossierModel currRec)
{
bool answ = false;
- using (var dbCtx = new MoonProContext(_configuration))
+ using (var dbCtx = new MoonPro_FluxContext(_configuration))
{
try
{
@@ -381,7 +381,7 @@ namespace MP.Data.Controllers
public List DossiersGetLastFilt(string IdxMacchina, string CodArticolo, DateTime DtStart, DateTime DtEnd)
{
List dbResult = new List();
- using (var dbCtx = new MoonProContext(_configuration))
+ using (var dbCtx = new MoonPro_FluxContext(_configuration))
{
dbResult = dbCtx
.DbSetDossiers
@@ -404,7 +404,7 @@ namespace MP.Data.Controllers
public async Task DossiersInsert(DossierModel newRec)
{
bool fatto = false;
- using (var dbCtx = new MoonProContext(_configuration))
+ using (var dbCtx = new MoonPro_FluxContext(_configuration))
{
try
{
@@ -431,7 +431,7 @@ namespace MP.Data.Controllers
public bool DossiersTakeParamsSnapshot(string idxMacchina, int maxSec, DateTime dtRif)
{
bool answ = false;
- using (var dbCtx = new MoonProContext(_configuration))
+ using (var dbCtx = new MoonPro_FluxContext(_configuration))
{
var pIdxMacchina = new SqlParameter("@IdxMacchina", idxMacchina);
var pMaxSec = new SqlParameter("@MaxSec", maxSec);
@@ -454,7 +454,7 @@ namespace MP.Data.Controllers
public bool DossiersTakeParamsSnapshotLast(string idxMacchina, DateTime dtMin, DateTime dtMax)
{
bool answ = false;
- using (var dbCtx = new MoonProContext(_configuration))
+ using (var dbCtx = new MoonPro_FluxContext(_configuration))
{
var pIdxMacchina = new SqlParameter("@IdxMacchina", idxMacchina);
var pDtMin = new SqlParameter("@DtMin", dtMin);
@@ -476,7 +476,7 @@ namespace MP.Data.Controllers
public async Task DossiersUpdateValore(DossierModel editRec)
{
bool fatto = false;
- using (var dbCtx = new MoonProContext(_configuration))
+ using (var dbCtx = new MoonPro_FluxContext(_configuration))
{
try
{
@@ -593,7 +593,7 @@ namespace MP.Data.Controllers
DateTime dtCursEnd = dtCursStart.Add(step);
bool setCompleted = false;
// dbContext x ogni singolo flusso
- using (var dbCtx = new MoonProContext(_configuration))
+ using (var dbCtx = new MoonPro_FluxContext(_configuration))
{
// opzionalmente timeout comandi a 2 minuti... NON usato x ora e da testare
//dbCtx.Database.SetCommandTimeout(TimeSpan.FromMinutes(2));
@@ -699,7 +699,7 @@ namespace MP.Data.Controllers
public List FluxLogGetLastFilt(DateTime DtMax, DateTime DtMin, string IdxMacchina, string CodFlux, int MaxRec)
{
List dbResult = new List();
- using (var dbCtx = new MoonProContext(_configuration))
+ using (var dbCtx = new MoonPro_FluxContext(_configuration))
{
dbResult = dbCtx
.DbSetFluxLog
@@ -719,7 +719,7 @@ namespace MP.Data.Controllers
public List FluxLogPareto(string idxMacchina, DateTime dtFrom, DateTime dtTo)
{
List dbResult = new List();
- using (var dbCtx = new MoonProContext(_configuration))
+ using (var dbCtx = new MoonPro_FluxContext(_configuration))
{
dbResult = dbCtx
.DbSetFluxLog
@@ -1017,7 +1017,7 @@ namespace MP.Data.Controllers
public async Task
> MacchineWithFlux(DateTime dtStart, DateTime dtEnd)
{
List dbResult = new List();
- using (var dbCtx = new MoonProContext(_configuration))
+ using (var dbCtx = new MoonPro_FluxContext(_configuration))
{
dbResult = await dbCtx
.DbSetFluxLog
@@ -1275,7 +1275,7 @@ namespace MP.Data.Controllers
public List ParametriGetFilt(string IdxMacchina)
{
List dbResult = new List();
- using (var dbCtx = new MoonProContext(_configuration))
+ using (var dbCtx = new MoonPro_FluxContext(_configuration))
{
dbResult = dbCtx
.DbSetFluxLog
diff --git a/MP.Data/MoonProContext.cs b/MP.Data/MoonProContext.cs
index 6d12f3a9..f91b43e4 100644
--- a/MP.Data/MoonProContext.cs
+++ b/MP.Data/MoonProContext.cs
@@ -55,8 +55,6 @@ namespace MP.Data
public virtual DbSet DbSetODLExp { get; set; }
public virtual DbSet DbSetPODLExp { get; set; }
public virtual DbSet DbSetPODL { get; set; }
- public virtual DbSet DbSetFluxLog { get; set; }
- public virtual DbSet DbSetDossiers { get; set; }
public virtual DbSet DbSetStatOdl { get; set; }
public virtual DbSet DbSetPzProd { get; set; }
public virtual DbSet DbSetEvList { get; set; }
@@ -96,7 +94,6 @@ namespace MP.Data
public virtual DbSet DbSetVSEB { get; set; }
public virtual DbSet DbSetVSODL { get; set; }
public virtual DbSet DbSetVSCS { get; set; }
- public virtual DbSet DbSetParetoFluxLog { get; set; }
#endregion Public Properties
@@ -344,11 +341,6 @@ namespace MP.Data
{
entity.HasKey(e => new { e.TableName, e.FieldName, e.value });
- });
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => new { e.IdxMacchina, e.dtEvento, e.CodFlux });
-
});
modelBuilder.Entity(entity =>
@@ -576,10 +568,6 @@ namespace MP.Data
{
entity.ToView("v_DD_exp");
});
- modelBuilder.Entity(entity =>
- {
- entity.HasKey(e => new { e.IdxMacchina, e.CodFlux });
- });
OnModelCreatingPartial(modelBuilder);
}
diff --git a/MP.Data/MoonPro_FluxContext.cs b/MP.Data/MoonPro_FluxContext.cs
new file mode 100644
index 00000000..5d9d7a32
--- /dev/null
+++ b/MP.Data/MoonPro_FluxContext.cs
@@ -0,0 +1,146 @@
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.Extensions.Configuration;
+using MP.Data.DatabaseModels;
+using MP.Data.DTO;
+using NLog;
+
+#nullable disable
+//
+// This is here so CodeMaid doesn't reorganize this document
+//
+namespace MP.Data
+{
+ public partial class MoonPro_FluxContext : DbContext
+ {
+ #region Private Fields
+
+ private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
+
+ private IConfiguration _configuration;
+
+ #endregion Private Fields
+
+ #region Public Constructors
+
+ ///
+ /// Indispensabile x prima generazione migrations EFCore
+ ///
+
+ [Obsolete("This constructor should never be used directly, and is only needed to generate entityframework stuff. Connection string can be adapted as pleased.")]
+ public MoonPro_FluxContext()
+ {
+ }
+
+ public MoonPro_FluxContext(IConfiguration configuration)
+ {
+ _configuration = configuration;
+ }
+
+ public MoonPro_FluxContext(DbContextOptions options) : base(options)
+ {
+ }
+
+ #endregion Public Constructors
+
+ #region Public Properties
+
+
+ public virtual DbSet DbSetArticoli { get; set; }
+ public virtual DbSet DbSetMacchine { get; set; }
+ public virtual DbSet DbSetFluxLog { get; set; }
+ public virtual DbSet DbSetDossiers { get; set; }
+ public virtual DbSet DbSetParetoFluxLog { get; set; }
+
+ #endregion Public Properties
+
+ #region Private Methods
+
+ partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
+
+ #endregion Private Methods
+
+ #region Protected Methods
+
+ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
+ {
+ if (!optionsBuilder.IsConfigured)
+ {
+ string connString = _configuration.GetConnectionString("MP.Flux");
+ if (!string.IsNullOrEmpty(connString))
+ {
+ optionsBuilder.UseSqlServer(connString);
+ }
+ else
+ {
+ optionsBuilder.UseSqlServer("Server=SQL2016DEV;Database=MoonPro_FluxData;Trusted_Connection=True;");
+ }
+ }
+ }
+
+ protected override void OnModelCreating(ModelBuilder modelBuilder)
+ {
+ modelBuilder.HasAnnotation("Relational:Collation", "SQL_Latin1_General_CP1_CI_AS");
+
+ modelBuilder.Entity(entity =>
+ {
+ entity.HasKey(e => e.CodArticolo);
+
+ entity.ToView("AnagArticoli");
+
+ entity.Property(e => e.CodArticolo)
+ .IsRequired()
+ .HasMaxLength(50);
+
+ entity.Property(e => e.DescArticolo)
+ .IsRequired()
+ .HasMaxLength(250);
+
+ entity.Property(e => e.Disegno)
+ .IsRequired()
+ .HasMaxLength(50);
+
+ entity.Property(e => e.Tipo)
+ .IsRequired()
+ .HasMaxLength(50);
+
+ entity.Property(e => e.Azienda)
+ .IsRequired()
+ .HasMaxLength(50);
+ });
+
+ modelBuilder.Entity(entity =>
+ {
+ entity.HasKey(e => e.IdxMacchina);
+
+ entity.ToView("Macchine");
+
+ entity.Property(e => e.CodMacchina).HasMaxLength(50);
+
+ entity.Property(e => e.Descrizione).HasMaxLength(50);
+
+ entity.Property(e => e.IdxMacchina)
+ .IsRequired()
+ .HasMaxLength(50);
+
+ entity.Property(e => e.Nome).HasMaxLength(50);
+ });
+
+ modelBuilder.Entity(entity =>
+ {
+ entity.HasKey(e => new { e.IdxMacchina, e.dtEvento, e.CodFlux });
+
+ });
+
+ modelBuilder.Entity(entity =>
+ {
+ entity.HasKey(e => new { e.IdxMacchina, e.CodFlux });
+ });
+
+ OnModelCreatingPartial(modelBuilder);
+ }
+
+ #endregion Protected Methods
+ }
+}
\ No newline at end of file
diff --git a/MP.Data/Objects/Enums.cs b/MP.Data/Objects/Enums.cs
index 16387c80..bcbb7e0f 100644
--- a/MP.Data/Objects/Enums.cs
+++ b/MP.Data/Objects/Enums.cs
@@ -8,7 +8,7 @@ namespace MP.Data.Objects
#region Public Enums
///
- /// Intervallo dati (es per definizione quanti dati FluxLog tenere x intervallo
+ /// Intervallo dati (es per definizione quanti dati FluxLog tenere x intervallo)
///
public enum DataInterval
{
diff --git a/MP.Prog/MP.Prog.csproj b/MP.Prog/MP.Prog.csproj
index 2fb2aec3..03258e52 100644
--- a/MP.Prog/MP.Prog.csproj
+++ b/MP.Prog/MP.Prog.csproj
@@ -3,7 +3,7 @@
net6.0
MP.Prog
- 6.16.2410.3112
+ 6.16.2502.1011
True
diff --git a/MP.Prog/Resources/ChangeLog.html b/MP.Prog/Resources/ChangeLog.html
index ae33b252..d03763ff 100644
--- a/MP.Prog/Resources/ChangeLog.html
+++ b/MP.Prog/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo gestione Programmi MAPO
- Versione: 6.16.2410.3112
+ Versione: 6.16.2502.1011
Note di rilascio:
diff --git a/MP.Prog/Resources/VersNum.txt b/MP.Prog/Resources/VersNum.txt
index a2fc0f38..7dc780a1 100644
--- a/MP.Prog/Resources/VersNum.txt
+++ b/MP.Prog/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2410.3112
+6.16.2502.1011
diff --git a/MP.Prog/Resources/manifest.xml b/MP.Prog/Resources/manifest.xml
index 64ceabf5..6ef52736 100644
--- a/MP.Prog/Resources/manifest.xml
+++ b/MP.Prog/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2410.3112
+ 6.16.2502.1011
https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/MP.Prog.zip
https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/ChangeLog.html
false
diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj
index a96e75a0..d29a1048 100644
--- a/MP.SPEC/MP.SPEC.csproj
+++ b/MP.SPEC/MP.SPEC.csproj
@@ -5,7 +5,7 @@
enable
enable
MP.SPEC
- 6.16.2501.3111
+ 6.16.2502.1011
1800a78a-6ff1-40f9-b490-87fb8bfc1394
en
diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html
index 9e5e114a..43fb1c86 100644
--- a/MP.SPEC/Resources/ChangeLog.html
+++ b/MP.SPEC/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOSPEC
-
Versione: 6.16.2501.3111
+ Versione: 6.16.2502.1011
Note di rilascio:
-
diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt
index 26ca3bca..7dc780a1 100644
--- a/MP.SPEC/Resources/VersNum.txt
+++ b/MP.SPEC/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2501.3111
+6.16.2502.1011
diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml
index 79d05911..a6c4588a 100644
--- a/MP.SPEC/Resources/manifest.xml
+++ b/MP.SPEC/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2501.3111
+ 6.16.2502.1011
https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip
https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html
false
diff --git a/MP.SPEC/appsettings.json b/MP.SPEC/appsettings.json
index 9f13f6bd..1d4c6534 100644
--- a/MP.SPEC/appsettings.json
+++ b/MP.SPEC/appsettings.json
@@ -10,8 +10,6 @@
"baseFileDir": "${basedir}/logs/",
"layout": "${longdate} | ${uppercase:${level}} | ${logger:shortName=false} | ${message}"
},
- // "internalLogLevel": "Info",
- // "internalLogFile": "c:\\temp\\internal-nlog.txt",
"extensions": [
{ "assembly": "NLog.Extensions.Logging" },
{ "assembly": "NLog.Web.AspNetCore" }
@@ -51,6 +49,7 @@
"AllowedHosts": "*",
"ConnectionStrings": {
"MP.Data": "Server=SQL2016DEV;Database=MoonPro; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.SPEC;",
+ "MP.Flux": "Server=SQL2016DEV;Database=MoonPro_FluxData; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.SPEC;",
"MP.Inve": "Server=SQL2016DEV;Database=MoonPro_MAG; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=MP.SPEC;",
"Redis": "localhost:26379,serviceName=devel,DefaultDatabase=5,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false,allowAdmin=true",
"RedisAdmin": "localhost:26379,serviceName=devel,DefaultDatabase=5,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false,allowAdmin=true",
diff --git a/MP.Stats/MP.Stats.csproj b/MP.Stats/MP.Stats.csproj
index b82aa5ae..eb0176b7 100644
--- a/MP.Stats/MP.Stats.csproj
+++ b/MP.Stats/MP.Stats.csproj
@@ -4,8 +4,8 @@
net6.0
MP.Stats
826e877c-ba70-4253-84cb-d0b1cafd4440
- 6.16.2412.1915
- 6.16.2412.1915
+ 6.16.2502.1011
+ 6.16.2502.1011
true
$(NoWarn);1591
en
diff --git a/MP.Stats/Resources/ChangeLog.html b/MP.Stats/Resources/ChangeLog.html
index db45af15..2d54b823 100644
--- a/MP.Stats/Resources/ChangeLog.html
+++ b/MP.Stats/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo statistiche MAPO
-
Versione: 6.16.2412.1915
+ Versione: 6.16.2502.1011
Note di rilascio:
diff --git a/MP.Stats/Resources/VersNum.txt b/MP.Stats/Resources/VersNum.txt
index f7eab35c..7dc780a1 100644
--- a/MP.Stats/Resources/VersNum.txt
+++ b/MP.Stats/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2412.1915
+6.16.2502.1011
diff --git a/MP.Stats/Resources/manifest.xml b/MP.Stats/Resources/manifest.xml
index 1797af13..560d078f 100644
--- a/MP.Stats/Resources/manifest.xml
+++ b/MP.Stats/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2412.1915
+ 6.16.2502.1011
https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/MP.Stats.zip
https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/ChangeLog.html
false