798 lines
No EOL
26 KiB
C#
798 lines
No EOL
26 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Data.Entity.Validation;
|
|
using System.Data.Entity;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Web.Http;
|
|
using ULA.Davivienda.PrendarioModel;
|
|
using ULA.Davivienda.PrendarioModel.Prendario;
|
|
using ULA.Davivienda.PrestamoAutos.Commons;
|
|
using ULA.Davivienda.PrestamoAutos.Json;
|
|
using ULA.Davivienda.PrestamoAutos.WCFServiciosGenerales;
|
|
using ULA.Davivienda.PrestamoAutos.ServiciosCobisConsultaCliente;
|
|
|
|
using ULA.Davivienda.PrestamoAutos.ServiciosCobisConsultaGeneral;
|
|
using ULA.Davivienda.PrestamoAutos.ServiciosCobisCarteraPrendario;
|
|
using System.Configuration;
|
|
using Ultimus.Utilitarios;
|
|
using System.Globalization;
|
|
|
|
namespace ULA.Davivienda.PrestamoAutos.ControllersWebApi
|
|
{
|
|
public class InterfacesAPIController : ApiController
|
|
{
|
|
Crypt crypt = new Crypt();
|
|
LogFile log = new LogFile();
|
|
|
|
[HttpPost]
|
|
public WCFServiciosGenerales.ObtenerDatosCICBDResponse ObtenerDatosCICBD([FromBody] WCFServiciosGenerales.ObtenerDatosCICBDRequest req)
|
|
{
|
|
|
|
WCFServiciosGenerales.ObtenerDatosCICBDResponse resp = null;
|
|
try
|
|
{
|
|
using (WCFServiciosGenerales.ServiciosClient ws = new WCFServiciosGenerales.ServiciosClient())
|
|
{
|
|
resp = ws.ObtenerDatosCICBD(new WCFServiciosGenerales.ObtenerDatosCICBDRequest(){
|
|
idcliente = req.idcliente,
|
|
identificacion = req.identificacion,
|
|
incidente = req.incidente,
|
|
opcion = req.opcion,
|
|
proceso = req.proceso,
|
|
solicitud = req.solicitud
|
|
});
|
|
}
|
|
|
|
if(resp.errCode == "99")
|
|
{
|
|
throw new Exception(resp.errMessage);
|
|
}
|
|
|
|
|
|
resp.errCode = TipoCodigoRespuesta.EXITOSO.ToString();
|
|
resp.errMessage = string.Empty;
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
resp.errCode = TipoCodigoRespuesta.ERROR.ToString();
|
|
resp.errMessage = ex.Message;
|
|
|
|
log.EscribirArchivo("ULA.Davivienda.PrestamoAutos", ex);
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
|
|
return resp;
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
public ServiciosCobisConsultaCliente.ConsultarSolicitanteResponse ConsultarSolicitante([FromBody] ServiciosCobisConsultaCliente.ConsultarSolicitanteRequest req)
|
|
{
|
|
|
|
ServiciosCobisConsultaCliente.ConsultarSolicitanteResponse resp = null;
|
|
try
|
|
{
|
|
using (ServiciosCobisConsultaCliente.ConsultaClienteClient ws = new ServiciosCobisConsultaCliente.ConsultaClienteClient())
|
|
{
|
|
resp = ws.ConsultarSolicitante(new ServiciosCobisConsultaCliente.ConsultarSolicitanteRequest()
|
|
{
|
|
Identificacion = req.Identificacion,
|
|
Proceso = req.Proceso,
|
|
TipoIdentificacion = req.TipoIdentificacion,
|
|
UserName = req.UserName.ToLower(),
|
|
Password = req.Password
|
|
});
|
|
}
|
|
|
|
if (resp.errCode == "99")
|
|
{
|
|
throw new Exception(resp.errMessage);
|
|
}
|
|
|
|
|
|
resp.errCode = TipoCodigoRespuesta.EXITOSO.ToString();
|
|
resp.errMessage = string.Empty;
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
resp.errCode = TipoCodigoRespuesta.ERROR.ToString();
|
|
resp.errMessage = ex.Message;
|
|
|
|
log.EscribirArchivo("ULA.Davivienda.PrestamoAutos", ex);
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
|
|
return resp;
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
public ServiciosCobisConsultaGeneral.ConsultarTasaCambioResponse ConsultarTasaCambio([FromBody] ServiciosCobisConsultaGeneral.ConsultarTasaCambioRequest req)
|
|
{
|
|
|
|
ServiciosCobisConsultaGeneral.ConsultarTasaCambioResponse resp = null;
|
|
try
|
|
{
|
|
using (ServiciosCobisConsultaGeneral.ConsultaGeneralClient ws = new ServiciosCobisConsultaGeneral.ConsultaGeneralClient())
|
|
{
|
|
resp = ws.ConsultarTasaCambio(new ServiciosCobisConsultaGeneral.ConsultarTasaCambioRequest()
|
|
{
|
|
Proceso = req.Proceso,
|
|
UserName = req.UserName.ToLower(),
|
|
Password = req.Password
|
|
});
|
|
}
|
|
|
|
if (resp.errCode == "99")
|
|
{
|
|
throw new Exception(resp.errMessage);
|
|
}
|
|
|
|
|
|
resp.errCode = TipoCodigoRespuesta.EXITOSO.ToString();
|
|
resp.errMessage = string.Empty;
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
resp.errCode = TipoCodigoRespuesta.ERROR.ToString();
|
|
resp.errMessage = ex.Message;
|
|
|
|
log.EscribirArchivo("ULA.Davivienda.PrestamoAutos", ex);
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
|
|
return resp;
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
public ServiciosCobisConsultaGeneral.ConsultarFechaProcesoCobisResponse ConsultarFechaProcesoCobis([FromBody] ServiciosCobisConsultaGeneral.ConsultarFechaProcesoCobisRequest req)
|
|
{
|
|
|
|
ServiciosCobisConsultaGeneral.ConsultarFechaProcesoCobisResponse resp = null;
|
|
try
|
|
{
|
|
using (ServiciosCobisConsultaGeneral.ConsultaGeneralClient ws = new ServiciosCobisConsultaGeneral.ConsultaGeneralClient())
|
|
{
|
|
resp = ws.ConsultarFechaProcesoCobis(new ServiciosCobisConsultaGeneral.ConsultarFechaProcesoCobisRequest()
|
|
{
|
|
Proceso = req.Proceso,
|
|
UserName = req.UserName.ToLower(),
|
|
Password = req.Password
|
|
});
|
|
}
|
|
|
|
if (resp.errCode == "99")
|
|
{
|
|
throw new Exception(resp.errMessage);
|
|
}
|
|
|
|
|
|
resp.errCode = TipoCodigoRespuesta.EXITOSO.ToString();
|
|
resp.errMessage = string.Empty;
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
resp.errCode = TipoCodigoRespuesta.ERROR.ToString();
|
|
resp.errMessage = ex.Message;
|
|
|
|
log.EscribirArchivo("ULA.Davivienda.PrestamoAutos", ex);
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
|
|
return resp;
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
public ServiciosCobisConsultaGeneral.ConsultarOficialNombreResponse ConsultarOficialNombre([FromBody] ServiciosCobisConsultaGeneral.ConsultarOficialNombreRequest req)
|
|
{
|
|
|
|
ServiciosCobisConsultaGeneral.ConsultarOficialNombreResponse resp = null;
|
|
try
|
|
{
|
|
using (ServiciosCobisConsultaGeneral.ConsultaGeneralClient ws = new ServiciosCobisConsultaGeneral.ConsultaGeneralClient())
|
|
{
|
|
resp = ws.ConsultarOficialNombre(new ServiciosCobisConsultaGeneral.ConsultarOficialNombreRequest()
|
|
{
|
|
CoSucursal = req.CoSucursal,
|
|
NombreOficial = req.NombreOficial,
|
|
|
|
Proceso = req.Proceso,
|
|
UserName = req.UserName.ToLower(),
|
|
Password = req.Password
|
|
});
|
|
}
|
|
|
|
if (resp.errCode == "99")
|
|
{
|
|
throw new Exception(resp.errMessage);
|
|
}
|
|
|
|
|
|
resp.errCode = TipoCodigoRespuesta.EXITOSO.ToString();
|
|
resp.errMessage = string.Empty;
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
resp.errCode = TipoCodigoRespuesta.ERROR.ToString();
|
|
resp.errMessage = ex.Message;
|
|
|
|
log.EscribirArchivo("ULA.Davivienda.PrestamoAutos", ex);
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
|
|
return resp;
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpPost]
|
|
public ServiciosCobisCarteraPrendario.ActualizarOperacionCompletaResponse ActualizarOperacionCompleta([FromBody] ServiciosCobisCarteraPrendario.ActualizarOperacionCompletaRequest req)
|
|
{
|
|
|
|
ServiciosCobisCarteraPrendario.ActualizarOperacionCompletaResponse resp = null;
|
|
try
|
|
{
|
|
using (ServiciosCobisCarteraPrendario.CarteraPrendarioClient ws = new ServiciosCobisCarteraPrendario.CarteraPrendarioClient())
|
|
{
|
|
resp = ws.ActualizarOperacionCompleta(new ServiciosCobisCarteraPrendario.ActualizarOperacionCompletaRequest()
|
|
{
|
|
EstadoEtapa = req.EstadoEtapa,
|
|
Proceso = req.Proceso,
|
|
Solicitud= req.Solicitud,
|
|
strXML = req.strXML,
|
|
Usuario = req.Usuario.ToLower()
|
|
});
|
|
}
|
|
|
|
if (resp.errCode == "99")
|
|
{
|
|
throw new Exception(resp.errMessage);
|
|
}
|
|
|
|
|
|
resp.errCode = TipoCodigoRespuesta.EXITOSO.ToString();
|
|
resp.errMessage = string.Empty;
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
resp.errCode = TipoCodigoRespuesta.ERROR.ToString();
|
|
resp.errMessage = ex.Message;
|
|
|
|
log.EscribirArchivo("ULA.Davivienda.PrestamoAutos", ex);
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
|
|
return resp;
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
public ServiciosCobisCarteraPrendario.GenerarLiquidacionCompletaResponse GenerarLiquidacionCompleta([FromBody] ServiciosCobisCarteraPrendario.GenerarLiquidacionCompletaRequest req)
|
|
{
|
|
|
|
ServiciosCobisCarteraPrendario.GenerarLiquidacionCompletaResponse resp = null;
|
|
try
|
|
{
|
|
using (ServiciosCobisCarteraPrendario.CarteraPrendarioClient ws = new ServiciosCobisCarteraPrendario.CarteraPrendarioClient())
|
|
{
|
|
resp = ws.GenerarLiquidacionCompleta(new ServiciosCobisCarteraPrendario.GenerarLiquidacionCompletaRequest()
|
|
{
|
|
NumOperacion = req.NumOperacion,
|
|
Proceso = req.Proceso,
|
|
Solicitud = req.Solicitud,
|
|
strXML = req.strXML,
|
|
Usuario = req.Usuario.ToLower()
|
|
});
|
|
}
|
|
|
|
if (resp.errCode == "99")
|
|
{
|
|
throw new Exception(resp.errMessage);
|
|
}
|
|
|
|
|
|
resp.errCode = TipoCodigoRespuesta.EXITOSO.ToString();
|
|
resp.errMessage = string.Empty;
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
resp.errCode = TipoCodigoRespuesta.ERROR.ToString();
|
|
resp.errMessage = ex.Message;
|
|
|
|
log.EscribirArchivo("ULA.Davivienda.PrestamoAutos", ex);
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
|
|
return resp;
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
public ServiciosCobisCarteraPrendario.GenerarOperacionCompletaResponse GenerarOperacionCompleta([FromBody] ServiciosCobisCarteraPrendario.GenerarOperacionCompletaRequest req)
|
|
{
|
|
|
|
ServiciosCobisCarteraPrendario.GenerarOperacionCompletaResponse resp = null;
|
|
try
|
|
{
|
|
|
|
using (ServiciosCobisCarteraPrendario.CarteraPrendarioClient ws = new ServiciosCobisCarteraPrendario.CarteraPrendarioClient())
|
|
{
|
|
resp = ws.GenerarOperacionCompleta(new ServiciosCobisCarteraPrendario.GenerarOperacionCompletaRequest()
|
|
{
|
|
NumOperacion = req.NumOperacion,
|
|
Proceso = req.Proceso,
|
|
Solicitud = req.Solicitud,
|
|
strXML = req.strXML,
|
|
Usuario = req.Usuario.ToLower()
|
|
});
|
|
}
|
|
|
|
if (resp.errCode == "99")
|
|
{
|
|
throw new Exception(resp.errMessage);
|
|
}
|
|
|
|
|
|
resp.errCode = TipoCodigoRespuesta.EXITOSO.ToString();
|
|
resp.errMessage = string.Empty;
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
resp.errCode = TipoCodigoRespuesta.ERROR.ToString();
|
|
resp.errMessage = ex.Message;
|
|
|
|
log.EscribirArchivo("ULA.Davivienda.PrestamoAutos", ex);
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
|
|
return resp;
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
public ServiciosCobisCarteraPrendario.RegistrarCodeudorResponse RegistrarCodeudor([FromBody] ServiciosCobisCarteraPrendario.RegistrarCodeudorRequest req)
|
|
{
|
|
|
|
ServiciosCobisCarteraPrendario.RegistrarCodeudorResponse resp = null;
|
|
try
|
|
{
|
|
using (ServiciosCobisCarteraPrendario.CarteraPrendarioClient ws = new ServiciosCobisCarteraPrendario.CarteraPrendarioClient())
|
|
{
|
|
resp = ws.RegistrarCodeudor(new ServiciosCobisCarteraPrendario.RegistrarCodeudorRequest()
|
|
{
|
|
Proceso = req.Proceso,
|
|
Solicitud = req.Solicitud,
|
|
strXML = req.strXML,
|
|
Usuario = req.Usuario.ToLower()
|
|
});
|
|
}
|
|
|
|
if (resp.errCode == "99")
|
|
{
|
|
throw new Exception(resp.errMessage);
|
|
}
|
|
|
|
|
|
resp.errCode = TipoCodigoRespuesta.EXITOSO.ToString();
|
|
resp.errMessage = string.Empty;
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
resp.errCode = TipoCodigoRespuesta.ERROR.ToString();
|
|
resp.errMessage = ex.Message;
|
|
|
|
log.EscribirArchivo("ULA.Davivienda.PrestamoAutos", ex);
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
|
|
return resp;
|
|
}
|
|
|
|
[HttpPost]
|
|
public ServiciosCobisCarteraPrendario.RegistrarSeguroResponse RegistrarSeguro([FromBody] ServiciosCobisCarteraPrendario.RegistrarSeguroRequest req)
|
|
{
|
|
|
|
ServiciosCobisCarteraPrendario.RegistrarSeguroResponse resp = null;
|
|
try
|
|
{
|
|
using (ServiciosCobisCarteraPrendario.CarteraPrendarioClient ws = new ServiciosCobisCarteraPrendario.CarteraPrendarioClient())
|
|
{
|
|
resp = ws.RegistrarSeguro(new ServiciosCobisCarteraPrendario.RegistrarSeguroRequest()
|
|
{
|
|
Proceso = req.Proceso,
|
|
Solicitud = req.Solicitud,
|
|
strXML = req.strXML,
|
|
Usuario = req.Usuario.ToLower(),
|
|
TipoSeguro = req.TipoSeguro
|
|
});
|
|
}
|
|
|
|
if (resp.errCode == "99")
|
|
{
|
|
throw new Exception(resp.errMessage);
|
|
}
|
|
|
|
|
|
resp.errCode = TipoCodigoRespuesta.EXITOSO.ToString();
|
|
resp.errMessage = string.Empty;
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
resp.errCode = TipoCodigoRespuesta.ERROR.ToString();
|
|
resp.errMessage = ex.Message;
|
|
|
|
log.EscribirArchivo("ULA.Davivienda.PrestamoAutos", ex);
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
|
|
return resp;
|
|
}
|
|
|
|
[HttpPost]
|
|
public ServiciosCobisCarteraPrendario.RegistrarTasaEscalonadaResponse RegistrarTasaEscalonada([FromBody] ServiciosCobisCarteraPrendario.RegistrarTasaEscalonadaRequest req)
|
|
{
|
|
|
|
ServiciosCobisCarteraPrendario.RegistrarTasaEscalonadaResponse resp = null;
|
|
try
|
|
{
|
|
using (ServiciosCobisCarteraPrendario.CarteraPrendarioClient ws = new ServiciosCobisCarteraPrendario.CarteraPrendarioClient())
|
|
{
|
|
resp = ws.RegistrarTasaEscalonada(new ServiciosCobisCarteraPrendario.RegistrarTasaEscalonadaRequest()
|
|
{
|
|
Proceso = req.Proceso,
|
|
Solicitud = req.Solicitud,
|
|
strXML = req.strXML,
|
|
Usuario = req.Usuario.ToLower()
|
|
});
|
|
}
|
|
|
|
if (resp.errCode == "99")
|
|
{
|
|
throw new Exception(resp.errMessage);
|
|
}
|
|
|
|
|
|
resp.errCode = TipoCodigoRespuesta.EXITOSO.ToString();
|
|
resp.errMessage = string.Empty;
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
resp.errCode = TipoCodigoRespuesta.ERROR.ToString();
|
|
resp.errMessage = ex.Message;
|
|
|
|
log.EscribirArchivo("ULA.Davivienda.PrestamoAutos", ex);
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
|
|
return resp;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[HttpPost]
|
|
public WCFServiciosGenerales.ObtenerNumeroBoletaResponse ObtenerNumeroBoleta([FromBody] WCFServiciosGenerales.ObtenerNumeroBoletaRequest req)
|
|
{
|
|
|
|
WCFServiciosGenerales.ObtenerNumeroBoletaResponse resp = null;
|
|
try
|
|
{
|
|
using (WCFServiciosGenerales.ServiciosClient ws = new WCFServiciosGenerales.ServiciosClient())
|
|
{
|
|
resp = ws.ObtenerNumeroBoleta(new WCFServiciosGenerales.ObtenerNumeroBoletaRequest()
|
|
{
|
|
Proceso = req.Proceso,
|
|
Usuario = req.Usuario.ToLower(),
|
|
NumObjeto = req.NumObjeto
|
|
});
|
|
}
|
|
|
|
if (resp.errCode == "99")
|
|
{
|
|
throw new Exception(resp.errMessage);
|
|
}
|
|
|
|
|
|
resp.errCode = TipoCodigoRespuesta.EXITOSO.ToString();
|
|
resp.errMessage = string.Empty;
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
resp.errCode = TipoCodigoRespuesta.ERROR.ToString();
|
|
resp.errMessage = ex.Message;
|
|
|
|
log.EscribirArchivo("ULA.Davivienda.PrestamoAutos", ex);
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
|
|
return resp;
|
|
}
|
|
|
|
|
|
|
|
[HttpPost]
|
|
public WCFServiciosGenerales.ObtenerEstratoSocialResponse ObtenerEstratoSocial([FromBody] WCFServiciosGenerales.ObtenerEstratoSocialRequest req)
|
|
{
|
|
|
|
WCFServiciosGenerales.ObtenerEstratoSocialResponse resp = null;
|
|
try
|
|
{
|
|
using (WCFServiciosGenerales.ServiciosClient ws = new WCFServiciosGenerales.ServiciosClient())
|
|
{
|
|
resp = ws.ObtenerEstratoSocial(new WCFServiciosGenerales.ObtenerEstratoSocialRequest()
|
|
{
|
|
Proceso = req.Proceso,
|
|
TasaCambio = req.TasaCambio,
|
|
TotalIngresoBrutoCol = req.TotalIngresoBrutoCol,
|
|
TotalIngresoBrutoDol = req.TotalIngresoBrutoDol
|
|
|
|
});
|
|
}
|
|
|
|
if (resp.errCode == "99")
|
|
{
|
|
throw new Exception(resp.errMessage);
|
|
}
|
|
|
|
|
|
resp.errCode = TipoCodigoRespuesta.EXITOSO.ToString();
|
|
resp.errMessage = string.Empty;
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
resp.errCode = TipoCodigoRespuesta.ERROR.ToString();
|
|
resp.errMessage = ex.Message;
|
|
|
|
log.EscribirArchivo("ULA.Davivienda.PrestamoAutos", ex);
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
|
|
return resp;
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpPost]
|
|
public WCFServiciosGenerales.ObtenerNivelCapacidadPagoDeudorResponse ObtenerNivelCapacidadPagoDeudor([FromBody] WCFServiciosGenerales.ObtenerNivelCapacidadPagoDeudorRequest req)
|
|
{
|
|
|
|
WCFServiciosGenerales.ObtenerNivelCapacidadPagoDeudorResponse resp = null;
|
|
try
|
|
{
|
|
using (WCFServiciosGenerales.ServiciosClient ws = new WCFServiciosGenerales.ServiciosClient())
|
|
{
|
|
resp = ws.ObtenerNivelCapacidadPagoDeudor(new WCFServiciosGenerales.ObtenerNivelCapacidadPagoDeudorRequest()
|
|
{
|
|
Proceso = req.Proceso,
|
|
TasaCambio = req.TasaCambio,
|
|
IdMoneda = req.IdMoneda,
|
|
IngresoNetoColones = req.IngresoNetoColones,
|
|
IngresoNetoDolares = req.IngresoNetoDolares,
|
|
PorcEndeudamiento = req.PorcEndeudamiento
|
|
});
|
|
}
|
|
|
|
if (resp.errCode == "99")
|
|
{
|
|
throw new Exception(resp.errMessage);
|
|
}
|
|
|
|
|
|
resp.errCode = TipoCodigoRespuesta.EXITOSO.ToString();
|
|
resp.errMessage = string.Empty;
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
resp.errCode = TipoCodigoRespuesta.ERROR.ToString();
|
|
resp.errMessage = ex.Message;
|
|
|
|
log.EscribirArchivo("ULA.Davivienda.PrestamoAutos", ex);
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
|
|
return resp;
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpPost]
|
|
public WCFServiciosGenerales.ClasificaGeneradorMonedaResponse ClasificaGeneradorMoneda([FromBody] WCFServiciosGenerales.ClasificaGeneradorMonedaRequest req)
|
|
{
|
|
|
|
WCFServiciosGenerales.ClasificaGeneradorMonedaResponse resp = null;
|
|
try
|
|
{
|
|
using (WCFServiciosGenerales.ServiciosClient ws = new WCFServiciosGenerales.ServiciosClient())
|
|
{
|
|
resp = ws.ClasificaGeneradorMoneda(new WCFServiciosGenerales.ClasificaGeneradorMonedaRequest()
|
|
{
|
|
CuotaPrestamo = req.CuotaPrestamo,
|
|
IdCliente= req.IdCliente,
|
|
IdSolicitud= req.IdSolicitud,
|
|
Moneda = req.Moneda,
|
|
TotalIngresoNetoColones = req.TotalIngresoNetoColones,
|
|
TotalIngresoNetoDolares = req.TotalIngresoNetoDolares,
|
|
Proceso = req.Proceso,
|
|
TasaCambio = req.TasaCambio
|
|
});
|
|
}
|
|
|
|
if (resp.errCode == "99")
|
|
{
|
|
throw new Exception(resp.errMessage);
|
|
}
|
|
|
|
|
|
resp.errCode = TipoCodigoRespuesta.EXITOSO.ToString();
|
|
resp.errMessage = string.Empty;
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
resp.errCode = TipoCodigoRespuesta.ERROR.ToString();
|
|
resp.errMessage = ex.Message;
|
|
|
|
log.EscribirArchivo("ULA.Davivienda.PrestamoAutos", ex);
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
|
|
return resp;
|
|
}
|
|
|
|
|
|
[HttpPost]
|
|
public WCFServiciosGenerales.ObtenerSalarioNetoResponse ObtenerSalarioNeto([FromBody] WCFServiciosGenerales.ObtenerSalarioNetoRequest req)
|
|
{
|
|
|
|
WCFServiciosGenerales.ObtenerSalarioNetoResponse resp = null;
|
|
|
|
try
|
|
{
|
|
using (WCFServiciosGenerales.ServiciosClient ws = new WCFServiciosGenerales.ServiciosClient())
|
|
{
|
|
resp = ws.ObtenerSalarioNeto(new WCFServiciosGenerales.ObtenerSalarioNetoRequest()
|
|
{
|
|
IdMoneda = req.IdMoneda,
|
|
Proceso = WCFServiciosGenerales.EnumeradorProcesoUltimus.PrestamoPrendario,
|
|
SalarioBrutoCol = req.SalarioBrutoCol,
|
|
SalarioBrutoDol = req.SalarioBrutoDol,
|
|
TasaCambio = req.TasaCambio
|
|
});
|
|
}
|
|
|
|
if (resp.errCode == "99")
|
|
{
|
|
throw new Exception(resp.errMessage);
|
|
}
|
|
|
|
|
|
|
|
resp.errCode = TipoCodigoRespuesta.EXITOSO.ToString();
|
|
resp.errMessage = string.Empty;
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
resp.errCode = TipoCodigoRespuesta.ERROR.ToString();
|
|
resp.errMessage = ex.Message;
|
|
|
|
log.EscribirArchivo("ULA.Davivienda.PrestamoAutos", ex);
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
|
|
return resp;
|
|
}
|
|
|
|
|
|
[HttpPost]
|
|
public WCFServiciosGenerales.EvaluarCICResponse EvaluarCIC([FromBody] WCFServiciosGenerales.EvaluarCICRequest req)
|
|
{
|
|
|
|
WCFServiciosGenerales.EvaluarCICResponse resp = null;
|
|
|
|
try
|
|
{
|
|
using (WCFServiciosGenerales.ServiciosClient ws = new WCFServiciosGenerales.ServiciosClient())
|
|
{
|
|
resp = ws.EvaluarCIC(new WCFServiciosGenerales.EvaluarCICRequest()
|
|
{
|
|
idCliente = req.idCliente,
|
|
identificacion= req.identificacion,
|
|
incidente= req.incidente,
|
|
juicios = req.juicios,
|
|
malas_ref = req.malas_ref,
|
|
modo = req.modo,
|
|
proceso = WCFServiciosGenerales.EnumeradorProcesoUltimus.PrestamoPrendario,
|
|
solicitud = req.solicitud,
|
|
});
|
|
}
|
|
|
|
if (resp.errCode == "99")
|
|
{
|
|
throw new Exception(resp.errMessage);
|
|
}
|
|
|
|
|
|
|
|
resp.errCode = TipoCodigoRespuesta.EXITOSO.ToString();
|
|
resp.errMessage = string.Empty;
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
resp.errCode = TipoCodigoRespuesta.ERROR.ToString();
|
|
resp.errMessage = ex.Message;
|
|
|
|
log.EscribirArchivo("ULA.Davivienda.PrestamoAutos", ex);
|
|
}
|
|
finally
|
|
{
|
|
}
|
|
|
|
return resp;
|
|
}
|
|
|
|
}
|
|
} |