refresh fermate

This commit is contained in:
Samuele Locatelli
2026-02-24 16:37:30 +01:00
parent 39e7a38001
commit 4f6edcae47
13 changed files with 181 additions and 18 deletions
+49 -4
View File
@@ -1,20 +1,21 @@
using Microsoft.Data.SqlClient;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using MP.Core.DTO;
using MP.Core.Objects;
using MP.Data.DbModels;
using MP.Data.DTO;
using MP.Core.Objects;
using MP.Data.Translate;
using NLog;
using Org.BouncyCastle.Crypto;
using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using static EgwCoreLib.Utils.DtUtils;
using MP.Core.DTO;
using MP.Data.Translate;
using ZXing;
using static EgwCoreLib.Utils.DtUtils;
namespace MP.Data.Controllers
{
@@ -115,6 +116,50 @@ namespace MP.Data.Controllers
return answ;
}
/// <summary>
/// Restituisce l'anagrafica EVENTI per macchina
/// </summary>
/// <returns></returns>
public List<vSelEventiBCodeModel> AnagEventiGetByMacc(string IdxMac)
{
List<vSelEventiBCodeModel> dbResult = new List<vSelEventiBCodeModel>();
using (var dbCtx = new MoonProContext(_configuration))
{
var IdxMacch = new SqlParameter("@idxMacchina", IdxMac);
dbResult = dbCtx
.DbSetVSEB
.FromSqlRaw("exec dbo.stp_vseb_getByIdxMacchinaFull @idxMacchina", IdxMacch)
.AsNoTracking()
.AsEnumerable()
.ToList();
}
return dbResult;
}
/// <summary>
/// Restituisce l'anagrafica EVENTI generalmente disponibile per OGNI macchina
/// </summary>
/// <param name="TableName">Nome Table x filtro (std: EvList)</param>
/// <param name="FieldName">Nome Field x filtro (std: Common)</param>
/// <returns></returns>
public List<vSelEventiBCodeModel> AnagEventiGeneral(string TableName = "EvList", string FieldName = "Common")
{
List<vSelEventiBCodeModel> dbResult = new List<vSelEventiBCodeModel>();
using (var dbCtx = new MoonProContext(_configuration))
{
var pTableName = new SqlParameter("@TableName", TableName);
var pFieldName = new SqlParameter("@FieldName", FieldName);
dbResult = dbCtx
.DbSetVSEB
.FromSqlRaw("exec dbo.stp_vseb_getGenerallyAvailable @TableName, @FieldName", pTableName, pFieldName)
.AsNoTracking()
.AsEnumerable()
.ToList();
}
return dbResult;
}
/// <summary>
/// Elenco Gruppi tipo Azienda
/// </summary>
+1 -1
View File
@@ -118,7 +118,7 @@ namespace MP.Data.Controllers
}
/// <summary>
/// Restituisce l'anagrafica EVENTI per intero
/// Restituisce l'anagrafica EVENTI per macchina
/// </summary>
/// <returns></returns>
public List<vSelEventiBCodeModel> AnagEventiGetByMacc(string IdxMac)