Commit inicial: ITCA_API_SAP_WMS (.NET Core 3.1)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
2b82744eb8
168 files changed
+11066
No files matched your search
@@ -0,0 +1,83 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Net.Business.Entities;
|
||||
using Net.Business.Entities.ServicesLayer;
|
||||
using Net.Business.Entities.ServicesLayer.CreditNotes;
|
||||
using Net.Business.Entities.ServicesLayer.HR;
|
||||
using Net.Business.Entities.ServicesLayer.Invoices;
|
||||
using Net.Connection;
|
||||
using Net.Connection.ServiceLayer;
|
||||
using Net.CrossCotting;
|
||||
using Net.Data.HelperData.HojaRuta;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Net.Data.ServicesLayer.GlobalData
|
||||
{
|
||||
public class GlobalDataRepository : IGlobalDataRepository
|
||||
{
|
||||
|
||||
#region Variables Globales
|
||||
private string _aplicacionName;
|
||||
private string _metodoName;
|
||||
private readonly Regex regex = new Regex(@"<(\w+)>.*");
|
||||
|
||||
//Services Layer
|
||||
private readonly ConnectionServiceLayer _connectServiceLayer;
|
||||
private readonly IConnectionSQL _context;
|
||||
#endregion
|
||||
|
||||
public GlobalDataRepository(IHttpClientFactory clientFactory, IConfiguration configuration, IConnectionSQL context)
|
||||
{
|
||||
_aplicacionName = this.GetType().Name;
|
||||
|
||||
_connectServiceLayer = new ConnectionServiceLayer(configuration, clientFactory);
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public async Task<BE_ResultadoTransaccion<ITC_SOLSALMER>> GetSolicitudSalida(int DocEntry)
|
||||
{
|
||||
_metodoName = regex.Match(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name).Groups[1].Value.ToString();
|
||||
|
||||
ResultadoTransaccion<ITC_SOLSALMER> resultadoTransaccion = new ResultadoTransaccion<ITC_SOLSALMER>(_metodoName, _aplicacionName);
|
||||
try
|
||||
{
|
||||
|
||||
string cadena = $"ITC_SOLSALMER({DocEntry})";
|
||||
int maxpagesize = 0;
|
||||
List<ITC_SOLSALMER> objectList = await _connectServiceLayer.GetAsync<ITC_SOLSALMER>(cadena, maxpagesize, true);
|
||||
|
||||
return resultadoTransaccion.GetInformacionResultado(0, 0, "Se Listo correctamento...!!!", objectList);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return resultadoTransaccion.GetInformacionResultado(-1, -1, ex.Message.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<BE_ResultadoTransaccion<ITC_SOLINGMER>> GetSolicitudIngreso(int DocEntry)
|
||||
{
|
||||
_metodoName = regex.Match(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name).Groups[1].Value.ToString();
|
||||
|
||||
ResultadoTransaccion<ITC_SOLINGMER> resultadoTransaccion = new ResultadoTransaccion<ITC_SOLINGMER>(_metodoName, _aplicacionName);
|
||||
try
|
||||
{
|
||||
|
||||
string cadena = $"ITC_SOLINGMER({DocEntry})";
|
||||
int maxpagesize = 0;
|
||||
List<ITC_SOLINGMER> objectList = await _connectServiceLayer.GetAsync<ITC_SOLINGMER>(cadena, maxpagesize, true);
|
||||
|
||||
return resultadoTransaccion.GetInformacionResultado(0, 0, "Se Listo correctamento...!!!", objectList);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return resultadoTransaccion.GetInformacionResultado(-1, -1, ex.Message.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using Net.Business.Entities;
|
||||
using Net.Business.Entities.ServicesLayer;
|
||||
using Net.Business.Entities.ServicesLayer.CreditNotes;
|
||||
using Net.Business.Entities.ServicesLayer.HR;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Net.Data.ServicesLayer.GlobalData
|
||||
{
|
||||
public interface IGlobalDataRepository
|
||||
{
|
||||
Task<BE_ResultadoTransaccion<ITC_SOLSALMER>> GetSolicitudSalida(int DocEntry);
|
||||
Task<BE_ResultadoTransaccion<ITC_SOLINGMER>> GetSolicitudIngreso(int DocEntry);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user