aggiunti metodo e controller x db arca
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using MP.Data.DatabaseModels;
|
||||
using NLog;
|
||||
@@ -27,12 +28,44 @@ namespace MP.Data.Controllers
|
||||
{
|
||||
_configuration = null;
|
||||
}
|
||||
|
||||
#region gestione lotti esterni
|
||||
/// <summary>
|
||||
/// Elenco lotti esterni presenti sul db di ARCA
|
||||
/// </summary>
|
||||
/// <param name="codArt">Codice articolo</param>
|
||||
/// <param name="codLotto">Codice lotto</param>
|
||||
/// <param name="codMagazzino">Codice magazzino</param>
|
||||
/// <param name="onlyTest">proprietà per definire scopo stored</param>
|
||||
/// <returns></returns>
|
||||
public List<AnagLottiArca> ListLottiEsterni(string codArt, string codLotto, string codMagazzino, bool onlyTest)
|
||||
{
|
||||
List<AnagLottiArca> dbResult = new List<AnagLottiArca>();
|
||||
using (var dbCtx = new MoonPro_InveContext(_configuration))
|
||||
{
|
||||
var DataGiac = new SqlParameter("@DataGiac", null);
|
||||
var CodArt = new SqlParameter("@CodArt", codArt);
|
||||
var CodLotto = new SqlParameter("@CodLotto", codLotto);
|
||||
var CodMagaz = new SqlParameter("@CodMagaz", codMagazzino);
|
||||
var OnlyTest = new SqlParameter("@OnlyTest", onlyTest);
|
||||
|
||||
dbResult = dbCtx
|
||||
.DbLottoArca
|
||||
.FromSqlRaw("exec dbo.stp_GIAC_getByDate @DataGiac,@CodArt,@CodLotto,@CodMagaz,@OnlyTest", DataGiac, CodArt, CodLotto, CodMagaz, OnlyTest)
|
||||
.AsNoTracking()
|
||||
//.AsEnumerable()
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
#endregion gestione lotti esterni
|
||||
|
||||
#region gestione articoli
|
||||
|
||||
/// <summary>
|
||||
/// articolo MAG corrispondente all' articolo selezionato
|
||||
/// </summary>
|
||||
/// <param name="artSearch"></param>
|
||||
/// <param name="artSearch"></param>
|
||||
/// <returns></returns>
|
||||
public AnagArticoli_MAG artBySearch(string artSearch)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user