Example #1
0
        public static List <WSPrestador.Tasa> TasasAplicadas_TxTop20(int tipoTasa, double tasaDesde, double tasaHasta, int cuotaDesde, int cuotaHasta)
        {
            WSPrestador.PrestadorWS oServicio = new WSPrestador.PrestadorWS();
            oServicio.Url         = ConfigurationManager.AppSettings["WSPrestador.PrestadorWS"];
            oServicio.Credentials = CredentialCache.DefaultCredentials;
            List <WSPrestador.Tasa> oListTasas = new List <WSPrestador.Tasa>();

            try
            {
                oListTasas = (List <WSPrestador.Tasa>)
                             reSerializer.reSerialize(
                    oServicio.TasasAplicadas_TxTop20(tipoTasa, tasaDesde, tasaHasta, cuotaDesde, cuotaHasta),
                    typeof(WSPrestador.Tasa[]),
                    typeof(List <WSPrestador.Tasa>),
                    oServicio.Url);

                return(oListTasas);
            }
            catch (Exception ex)
            {
                log.Error(string.Format("ERROR Ejecución:{0}->{1} - Error:{2}->{3}", DateTime.Now, System.Reflection.MethodBase.GetCurrentMethod(), ex.Source, ex.Message));
                throw ex;
            }
            finally
            {
                oServicio.Dispose();
            }
        }
Example #2
0
        public static List <WSPrestador.Tasa> TraerTasas_xidPrestadorIdComercializador(long idPrestador, long idComercializador)
        {
            WSPrestador.PrestadorWS oServicio = new WSPrestador.PrestadorWS();
            oServicio.Url         = ConfigurationManager.AppSettings["WSPrestador.PrestadorWS"];
            oServicio.Credentials = CredentialCache.DefaultCredentials;
            List <WSPrestador.Tasa> oListTasas = new List <WSPrestador.Tasa>();

            try
            {
                oListTasas = (List <WSPrestador.Tasa>)
                             reSerializer.reSerialize(
                    oServicio.TraerTasas_xidPrestadorIdComercializador(idPrestador, idComercializador),
                    typeof(WSPrestador.Tasa[]),
                    typeof(List <WSPrestador.Tasa>),
                    oServicio.Url);

                return(oListTasas);
            }
            catch (Exception ex)
            {
                log.Error(string.Format("ERROR Ejecución:{0}->{1} - Error:{2}->{3}", DateTime.Now, System.Reflection.MethodBase.GetCurrentMethod(), ex.Source, ex.Message));
                throw ex;
            }
            finally
            {
                oServicio.Dispose();
            }
        }
Example #3
0
        public static List <WSPrestador.Tasa> TasasAplicadasParaAprobacioTxTop50(string codigoServicio, string razonSocial, DateTime fechaIncio, DateTime fechaFin, bool habilita)
        {
            WSPrestador.PrestadorWS oServicio = new WSPrestador.PrestadorWS();
            oServicio.Url         = ConfigurationManager.AppSettings["WSPrestador.PrestadorWS"];
            oServicio.Credentials = CredentialCache.DefaultCredentials;
            List <WSPrestador.Tasa> oListTasas = new List <WSPrestador.Tasa>();

            try
            {
                oListTasas = (List <WSPrestador.Tasa>)
                             reSerializer.reSerialize(
                    oServicio.TasasAplicadasParaGestionUCATxTop50(codigoServicio, razonSocial, fechaIncio, fechaFin, habilita),
                    typeof(WSPrestador.Tasa[]),
                    typeof(List <WSPrestador.Tasa>),
                    oServicio.Url);
                return(oListTasas);
            }
            catch (Exception ex)
            {
                log.Error(string.Format("ERROR Ejecución:{0}->{1} - Error:{2}->{3}", DateTime.Now, System.Reflection.MethodBase.GetCurrentMethod(), ex.Source, ex.Message));
                throw ex;
            }
            finally
            {
                oServicio.Dispose();
            }
        }
Example #4
0
        public static List <WSPrestador.Prestador> TraerConceptosPorCodConcepto(Int64 codConcepto)
        {
            WSPrestador.PrestadorWS oServicio = new WSPrestador.PrestadorWS();
            oServicio.Url         = ConfigurationManager.AppSettings["WSPrestador.PrestadorWS"];
            oServicio.Credentials = CredentialCache.DefaultCredentials;
            List <WSPrestador.Prestador> listaPrestador = null;

            try
            {
                listaPrestador = new List <WSPrestador.Prestador>(oServicio.TraerConceptosPorCodConcepto(codConcepto));
            }
            catch (Exception ex)
            {
                log.Error(string.Format("ERROR Ejecución:{0}->{1} - Error:{2}->{3}", DateTime.Now, System.Reflection.MethodBase.GetCurrentMethod(), ex.Source, ex.Message));
                string MsgError = String.Format("No se pudieron obtener todos los datos para el codigo de Conceptos: {0}. Error {1} ", codConcepto, ex.Message);
                log.Error(MsgError);
                throw new Exception(MsgError);
            }
            finally
            {
                oServicio.Dispose();
            }

            return(listaPrestador);
        }
Example #5
0
        public static List <WSPrestador.Prestador> TraerPrestador(byte orden, long idPrestador)
        {
            WSPrestador.PrestadorWS oServicio = new WSPrestador.PrestadorWS();
            oServicio.Url         = ConfigurationManager.AppSettings["WSPrestador.PrestadorWS"];
            oServicio.Credentials = CredentialCache.DefaultCredentials;
            List <WSPrestador.Prestador> oListPretadores = null;

            try
            {
                oListPretadores = new List <WSPrestador.Prestador>(oServicio.TraerPrestador(orden, idPrestador));

                return(oListPretadores);
            }
            catch (Exception ex)
            {
                log.Error(string.Format("ERROR Ejecución:{0}->{1} - Error:{2}->{3}", DateTime.Now, System.Reflection.MethodBase.GetCurrentMethod(), ex.Source, ex.Message));
                throw ex;
            }
            finally
            {
                oServicio.Dispose();
            }
        }
Example #6
0
        public static string TasasAplicadasHabilitaDeshabilita(List <WSPrestador.Tasa> TasasAplicadas, bool habilita)
        {
            WSPrestador.PrestadorWS oServicio = new WSPrestador.PrestadorWS();
            oServicio.Url         = ConfigurationManager.AppSettings["WSPrestador.PrestadorWS"];
            oServicio.Credentials = CredentialCache.DefaultCredentials;
            string mensage = string.Empty;

            try
            {
                mensage = oServicio.TasasAplicadasHabilitaDeshabilita(TasasAplicadas.ToArray(), habilita);
            }
            catch (Exception ex)
            {
                log.Error(string.Format("ERROR Ejecución:{0}->{1} - Error:{2}->{3}", DateTime.Now, System.Reflection.MethodBase.GetCurrentMethod(), ex.Source, ex.Message));
                throw ex;
            }
            finally
            {
                oServicio.Dispose();
            }

            return(mensage);
        }
Example #7
0
        public static string TasasAplicadasMB(long idPrestador, long idComercializador, WSPrestador.Tasa unaTasaAplicada)
        {
            WSPrestador.PrestadorWS oServicio = new WSPrestador.PrestadorWS();
            oServicio.Url         = ConfigurationManager.AppSettings["WSPrestador.PrestadorWS"];
            oServicio.Credentials = CredentialCache.DefaultCredentials;
            string mensage = string.Empty;

            try
            {
                mensage = oServicio.TasasAplicadasMB(idPrestador, idComercializador, unaTasaAplicada);
            }
            catch (Exception ex)
            {
                log.Error(string.Format("ERROR Ejecución:{0}->{1} - Error:{2}->{3}", DateTime.Now, System.Reflection.MethodBase.GetCurrentMethod(), ex.Source, ex.Message));
                throw ex;
            }
            finally
            {
                oServicio.Dispose();
            }

            return(mensage);
        }