private void PrestadorTraer(WSReclamos.Reclamo oReclamo) { long idPrestador = oReclamo.UnaNovedad.UnPrestador.ID; WSPrestador.PrestadorWS servicio = new WSPrestador.PrestadorWS(); servicio.Url = ConfigurationManager.AppSettings["WSPrestador.PrestadorWS"]; servicio.Credentials = System.Net.CredentialCache.DefaultCredentials; WSPrestador.Domicilio[] lstDomicilios = servicio.DomiciliosTraer(idPrestador); if (lstDomicilios.Length > 0) { lblCodigoPostal.Text = " C.P. " + lstDomicilios[0].CodigoPostal; lblDomicilio.Text = "Calle: " + lstDomicilios[0].Calle + " Nº " + lstDomicilios[0].NumeroCalle.ToString(); if (!string.IsNullOrEmpty(lstDomicilios[0].Piso)) { lblDomicilio.Text += " Piso: " + lstDomicilios[0].Piso; } if (!string.IsNullOrEmpty(lstDomicilios[0].Departamento)) { lblDomicilio.Text += " Dpto: " + lstDomicilios[0].Departamento; } lblLocalidad.Text = lstDomicilios[0].Localidad; lblProvincia.Text = lstDomicilios[0].UnaProvincia.DescripcionProvincia; lblRazonSocial.Text = oReclamo.UnaNovedad.UnPrestador.RazonSocial; } }
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(); } }
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(); } }
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(); } }
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); }
public static void TraerPrestador(long CUIT) { WSPrestador.PrestadorWS oServicio = new WSPrestador.PrestadorWS(); oServicio.Url = ConfigurationManager.AppSettings["WSPrestador.PrestadorWS"]; oServicio.Credentials = CredentialCache.DefaultCredentials; try { VariableSession.UnPrestador = oServicio.TraerPrestador_x_CUIT(CUIT); } catch (Exception err) { log.Error(string.Format("ERROR Ejecución:{0}->{1} - Error:{2}->{3}", DateTime.Now, System.Reflection.MethodBase.GetCurrentMethod(), err.Source, err.Message)); } }
private void LlenarGrilla() { log.Info("Lleno la grilla de Comercializadoras"); lblTituloComercializadora.Text = "Listado de Comercializadoras"; List <WSComercializador.Comercializador> oListComercializador = new List <WSComercializador.Comercializador>(); try { oListComercializador = Comercializador.TraerComercializadoras_xidPrestador(VariableSession.UnPrestador.ID); } catch (Exception ex) { string errMsg = "Se produjo un error en el Servicio Comercializadores"; log.ErrorFormat(errMsg + " : ", ex.Message); mensaje.TipoMensaje = Controls_Mensaje.infoMensaje.Error; mensaje.DescripcionMensaje = errMsg; mensaje.Mostrar(); } if (oListComercializador.Count == 0) { lblErrores.Text = "No existen Comercializadoras asociadas."; lblErrores.Visible = true; dgComercializadora.Visible = false; } else { //lleno la grilla dgComercializadora.DataSource = oListComercializador; dgComercializadora.DataBind(); WSPrestador.PrestadorWS oServicio = new WSPrestador.PrestadorWS(); VariableSession.UnPrestador.Comercializadoras = (WSPrestador.Comercializador[])reSerializer.reSerialize( oListComercializador, typeof(List <WSComercializador.Comercializador>), typeof(WSPrestador.Comercializador[]), oServicio.Url); lblErrores.Visible = false; dgComercializadora.Visible = true; } }
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(); } }
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); }
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); }