Exemplo n.º 1
0
        public static List <ResponseDicomInformation> GetDicomDebtDetail(RequestDicomInformation requestDicom)
        {
            try
            {
                List <ResponseDicomInformation> listDebtDetail = new List <ResponseDicomInformation>();

                var wsDicom = new WSConsultas.ConsultasSoapClient("ConsultasSoap");

                var response = wsDicom.InformeComercial(requestDicom.Rut, false);

                if (response.detalleInforme != null)
                {
                    foreach (var item in response.detalleInforme)
                    {
                        var debtDetail = new ResponseDicomInformation();

                        debtDetail.Id        = item.id;
                        debtDetail.Tipo      = item.tipo;
                        debtDetail.Fec_Venc  = item.fecha_vencimiento.ToString();
                        debtDetail.Cod_Mon   = item.codigo_moneda;
                        debtDetail.Monto     = item.monto;
                        debtDetail.Librador  = item.librador;
                        debtDetail.Categoria = GetDebtType(item.librador);

                        listDebtDetail.Add(debtDetail);
                    }
                }
                return(listDebtDetail);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
 public List <ResponseDicomInformation> GetDicomDebtDetail(RequestDicomInformation requestDicom)
 {
     try
     {
         return(Business.Client.GetDicomDebtDetail(requestDicom));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 3
0
 public string GetDicomState(RequestDicomInformation requestDicom)
 {
     try
     {
         return(Business.Client.GetDicomState(requestDicom));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// Get basic information
        /// </summary>
        /// <param name="requestClient"></param>
        /// <returns></returns>

        public static string GetDicomState(RequestDicomInformation requestDicom)
        {
            try
            {
                var wsDicom = new WSConsultas.ConsultasSoapClient("ConsultasSoap");

                var response = wsDicom.InformeComercial(requestDicom.Rut, false);

                var resultEval = "Sin datos";

                double totalDebt     = 0;
                double educationDebt = 0;

                if (response.detalleInforme != null)
                {
                    foreach (var item in response.detalleInforme)
                    {
                        if (string.IsNullOrWhiteSpace(GetDebtType(item.librador)))
                        {
                            totalDebt += item.monto;
                        }
                        else
                        {
                            educationDebt += item.monto;
                        }
                    }
                }

                if ((totalDebt + educationDebt) > 0)
                {
                    if ((totalDebt + educationDebt) <= Constantes.DicomLimit)
                    {
                        resultEval = "Pendiente";
                    }
                    else
                    {
                        resultEval = "Rechazado";
                    }
                }
                else
                {
                    resultEval = "Aprobado";
                }

                return(resultEval);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 5
0
 public static List <ResponseDicomInformation> GetDicomDebtDetail(RequestDicomInformation requestDicom)
 {
     return(Data.Client.GetDicomDebtDetail(requestDicom));
 }
Exemplo n.º 6
0
 public static string GetDicomState(RequestDicomInformation requestDicom)
 {
     return(Data.Client.GetDicomState(requestDicom));
 }