MOdifica core x nuovo DB x FluxData
- SPEC upgraded
This commit is contained in:
@@ -128,14 +128,14 @@ namespace MP.Data.Controllers
|
||||
public List<string> ArticleWithDossier()
|
||||
{
|
||||
List<string> dbResult = new List<string>();
|
||||
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<bool> 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<DossierModel> DossiersGetLastFilt(string IdxMacchina, string CodArticolo, DateTime DtStart, DateTime DtEnd)
|
||||
{
|
||||
List<DossierModel> dbResult = new List<DossierModel>();
|
||||
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<bool> 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<bool> 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<FluxLog> FluxLogGetLastFilt(DateTime DtMax, DateTime DtMin, string IdxMacchina, string CodFlux, int MaxRec)
|
||||
{
|
||||
List<FluxLog> dbResult = new List<FluxLog>();
|
||||
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<ParetoFluxLogDTO> FluxLogPareto(string idxMacchina, DateTime dtFrom, DateTime dtTo)
|
||||
{
|
||||
List<ParetoFluxLogDTO> dbResult = new List<ParetoFluxLogDTO>();
|
||||
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<List<string>> MacchineWithFlux(DateTime dtStart, DateTime dtEnd)
|
||||
{
|
||||
List<string> dbResult = new List<string>();
|
||||
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<string> ParametriGetFilt(string IdxMacchina)
|
||||
{
|
||||
List<string> dbResult = new List<string>();
|
||||
using (var dbCtx = new MoonProContext(_configuration))
|
||||
using (var dbCtx = new MoonPro_FluxContext(_configuration))
|
||||
{
|
||||
dbResult = dbCtx
|
||||
.DbSetFluxLog
|
||||
|
||||
Reference in New Issue
Block a user