public static RespuestaContdcdsjv ibsConSaldoTdc(long SUserId, string SCedRif, string SNroCuenta) { ContdcdsjvIn contdcdsjvIn = new ContdcdsjvIn() { SUserId = SUserId.ToString(), SCedRif = SCedRif, SNroCta = SNroCuenta, SPrefijo = string.Empty, SFiller = string.Empty }; RespuestaContdcdsjv respuestaContdcdsjv = null; using (IbsServiceService ibsServiceService = new IbsServiceService()) { ibsServiceService.Timeout = 30000; try { respuestaContdcdsjv = ibsServiceService.ibaConSaldoTdc(contdcdsjvIn); if (respuestaContdcdsjv == null) { throw new IBException(9998, "SQLIB"); } if (!string.IsNullOrEmpty(respuestaContdcdsjv.SError)) { throw new IBException(respuestaContdcdsjv.SError, "SQLIB"); } if (respuestaContdcdsjv.contdcdsjv == null) { throw new IBException(9998, "SQLIB"); } if ((respuestaContdcdsjv.contdcdsjv.EErrores == null ? false : !string.IsNullOrEmpty(respuestaContdcdsjv.contdcdsjv.EErrores.SVectorCod))) { throw new IBException(respuestaContdcdsjv.contdcdsjv.EErrores.SVectorCod, "IBS"); } } catch (WebException webException) { throw new IBException(9997, "SQLIB"); } catch (SoapException soapException) { throw new IBException(9997, "SQLIB"); } } return(respuestaContdcdsjv); }
protected void ddlCtaAcreditar_SelectedIndexChanged(object sender, EventArgs e) { this.liSaldoActual.Text = "0,00"; this.liPagoMinimo.Text = "0,00"; this.txtTarjetaPagar.Text = string.Empty; this.TxtCorreo.Text = string.Empty; this.txtOtroMonto.Text = "0,00"; this.BtAceptar.Enabled = false; this.panelTipoPago.Enabled = false; bool flag = false; if (this.ddlCtaAcreditar.SelectedIndex > 0) { if (base.sCod == 13) { string sNroCuenta = this.ddlCtaAcreditar.getCuenta().SNroCuenta; try { RespuestaContdcdsjv respuestaContdcdsjv = HelperIbs.ibsConSaldoTdc(base.Afiliado.AF_CodCliente, base.Afiliado.sAF_Rif, sNroCuenta); TextBox str = this.txtFechaPago; DateTime fecha = Formatos.ISOToFecha(respuestaContdcdsjv.contdcdsjv.SFechaProxPgo); str.Text = fecha.ToString("dd/MM/yyyy"); this.liPagoMinimo.Text = Formatos.formatoMonto(Formatos.ISOToDecimal(respuestaContdcdsjv.contdcdsjv.SCuotaMes)); this.liSaldoActual.Text = Formatos.formatoMonto(Formatos.ISOToDecimal(respuestaContdcdsjv.contdcdsjv.SSaldoActual)); if (this.Context.Items["TipoTransaccionGenerica"] != null) { TipoTransaccionGenerica item = this.Context.Items["TipoTransaccionGenerica"] as TipoTransaccionGenerica; GTransferenciasPagos objetoTransaccion = (GTransferenciasPagos)item.ObjetoTransaccion; if (objetoTransaccion.RdoSelected == 1) { this.rb_actual.Checked = true; } if (objetoTransaccion.RdoSelected == 2) { this.rb_minimo.Checked = true; } if (objetoTransaccion.RdoSelected == 3) { this.rb_otro.Checked = true; this.txtMonto.Text = Formatos.formatoMonto(objetoTransaccion.Monto).Replace(".", ""); } } this.UpdatePanel1.Update(); flag = true; } catch (IBException bException) { WebUtils.MessageBox2005(this, "Sistema de consulta de saldos de tarjetas de créditos no disponible en este momento, por favor intente más tarde."); return; } catch (Exception exception) { WebUtils.MessageBox2005(this, exception.Message); return; } } else { AfiliadoFavorito afiliadoFavorito = this.ddlCtaAcreditar.getAfiliadoFavorito(); this.txtTarjetaPagar.Text = afiliadoFavorito.NumeroInstrumento; this.TxtCorreo.Text = afiliadoFavorito.Email.Trim(); flag = true; } if (flag) { this.panelTipoPago.Enabled = true; this.BtAceptar.Enabled = true; } } }