public static IBBAV.Entidades.SessionAfiliado SA_CreateSession(long AF_Id) { IBBAV.Entidades.SessionAfiliado sessionAfiliado = new IBBAV.Entidades.SessionAfiliado(); try { DataSet dataSet = HelperSession.ws.SA_CreateSession(AF_Id); if (dataSet.Tables.Count > 0) { DataTable item = dataSet.Tables[0]; if ((item.TableName == "SqlException" ? true : item.TableName == "Exception")) { throw new IBException(int.Parse(item.Rows[0]["NumeroError"].ToString().Trim()), "SQLIB"); } DataRow dataRow = item.Rows[0]; sessionAfiliado.AF_Id = long.Parse(dataRow["AF_ID"].ToString()); sessionAfiliado.Sesion = dataRow["sesion"].ToString(); sessionAfiliado.SES_CodStatus = dataRow["SES_CodStatus"].ToString(); } } catch (WebException webException) { IBException bException = new IBException(webException.Message, "SQLIB"); } catch (SoapException soapException) { IBException bException1 = new IBException(soapException.Message); } return(sessionAfiliado); }
protected void btnAceptarPreguntas_Click(object sender, EventArgs e) { bool flag = false; try { flag = this.PreguntasDesafio.ValidarPreguntasRespuestas(); } catch (IBException bException1) { IBException bException = bException1; if (bException.ReturnCode == "1003") { base.Afiliado.nES_Id = (long)6; } WebUtils.MessageBootstrap(this, bException.IBMessage, null); return; } catch (Exception exception) { WebUtils.MessageBootstrap(this, exception.Message, null); return; } this.PreguntasValidadas = flag; if (!flag) { WebUtils.MessageBootstrap(this, "Las respuestas no son correctas, por favor recuerde que al tercer intento, su usuario sera bloqueado por seguridad", null); } else { this.panelValidacion.Visible = false; this.panelDatos.Visible = true; } }
protected void btnContinuarSMS_Click(object sender, EventArgs e) { bool flag = false; try { if (this.txtClave.Text.Trim().Equals(string.Empty)) { throw new Exception("Debe indicar la clave de Afiliación Temporal"); } if (!HelperLogons.ValidarClaveTransacciones(base.Afiliado.nAF_Id, this.txtClave.Text.Trim(), WebUtils.GetClientIP(this), base.sCod)) { throw new Exception("Clave inválida, por favor intente de nuevo"); } flag = true; } catch (IBException bException1) { IBException bException = bException1; flag = true; if (bException.CodigoSistema.Equals("IBSX")) { WebUtils.MessageBootstrap(this, string.Concat("Se ha detectado un problema de ejecución, por favor verifique antes de realizar otra operación (", bException.ReturnCode, ")"), null); } else if ((!bException.CodigoSistema.Equals("SQLIB") ? false : bException.ReturnCode.Equals("4"))) { WebUtils.MessageBootstrap(this, bException.IBMessage, null); } else { WebUtils.MessageBootstrap(this, bException.IBMessage, null); } return; } catch (Exception exception1) { Exception exception = exception1; flag = true; WebUtils.MessageBootstrap(this, exception.Message, null); return; } if (flag) { this.panelDatos.Visible = true; this.panelValidacion.Visible = false; } }
protected void btnConfirmar_Click(object sender, EventArgs e) { IObjetoGenerico objetoTransaccion = (IObjetoGenerico)this.tipotransaccion.ObjetoTransaccion; string str = ""; bool flag = false; if (objetoTransaccion.GetType() == typeof(GAddNotificacion)) { objetoTransaccion.EjecutarAccion(); } else if (objetoTransaccion.GetType() == typeof(GAddExtraEfectivo)) { objetoTransaccion.EjecutarAccion(); //str = objetoTransaccion.EjecutarAccion(); //this.txtPassword.Text = string.Empty; //this.liTextoReferencia.Text = "Número de Orden:"; //this.liReferencia.Text = str; //this.PanelReferencia.Visible = true; } else { try { this.ValidarCampos(); str = objetoTransaccion.EjecutarAccion(); this.txtPassword.Text = string.Empty; if (objetoTransaccion.GetType() == typeof(GReferenciaBancaria)) { this.encabezado.Lista.Rows[0].BeginEdit(); this.encabezado.Lista.Rows[0][2] = str; this.encabezado.Lista.Rows[0].AcceptChanges(); this.dgDatosRecibo.DataSource = this.encabezado.Lista; this.dgDatosRecibo.DataBind(); this.PanelReferencia.Visible = true; this.liTextoReferencia.Visible = false; this.liReferencia.Visible = false; this.liTitulo.Text = " "; this.Session.Add("referencia", objetoTransaccion); this.btnImprimirRecibo.Visible = true; } else if (objetoTransaccion.GetType() == typeof(GActualizarDatos)) { base.Afiliado.CO_Celular = ((GActualizarDatos)objetoTransaccion).Celular; } else if (objetoTransaccion.GetType() == typeof(GSuspensionCheq)) { this.panelCheques.Visible = true; } else if ((objetoTransaccion.GetType() != typeof(GTransferenciasPagos) ? false : objetoTransaccion.PaginaAnterior.Contains("RegistroOrden"))) { this.liTextoReferencia.Text = "Número de Orden:"; this.liReferencia.Text = str; this.PanelReferencia.Visible = true; } else { this.liReferencia.Text = str; this.PanelReferencia.Visible = true; } } catch (IBException bException1) { IBException bException = bException1; flag = true; if (bException.CodigoSistema.Equals("IBSX")) { WebUtils.MessageBootstrap(this, string.Concat("Esta transacción presento problemas en su ejecución, por favor verifique antes de realizar otra operación (", bException.ReturnCode, ")"), null); } else if ((!bException.CodigoSistema.Equals("SQLIB") ? false : bException.ReturnCode.Equals("4"))) { WebUtils.MessageBootstrap(this, bException.IBMessage, null); } else { WebUtils.MessageBootstrap(this, bException.IBMessage, null); } return; } catch (Exception exception1) { Exception exception = exception1; flag = true; WebUtils.MessageBootstrap(this, exception.Message, this.btnConfirmar); return; } } if (!flag) { this.panelConfirmacion.Visible = false; this.panelRecibo.Visible = true; this.liNota.Visible = true; this.liNota3.Visible = true; this.lblFechaRecibo.Text = DateTime.Now.ToString("dd/MM/yyyy hh:mm:ss t"); this.lblNombreUsuarioRecibo.Text = string.Concat(base.Afiliado.sCO_Nombres, " ", base.Afiliado.sCO_Apellidos); this.liNota.Text = "se realizó exitósamente"; this.liNota3.Text = "Te recomendamos Imprimir este recibo para tu control y constancia de tu operación"; this.panelBotonImpresion.Visible = true; ((BAVMaster)base.Master).TituloPage = this.tipotransaccion.Titulo.Replace("Confirmación", "Recibo"); } }
protected void btnAceptar_Click(object sender, EventArgs e) { bool flag = false; this.afi = new Afiliado(); try { this.ValidarCampos(); List <Afiliado> afiliados = HelperAfiliado.AfiliadosGet(string.Concat(this.ddlTipoCedula.SelectedValue, this.txtCedula.Text), EnumTipoValor.CedulaAfiliado); if (afiliados.Count <= 0) { throw new Exception("Usuario o tarjeta no válida"); } this.afi = afiliados[0]; if (this.afi != null) { HelperLogons.ValidarIntentoRecuparecionCLV(this.afi.nAF_Id, this.tddnumtxt.Text, Tools.GetClientIP()); flag = true; string text = this.txtCta.Text; RespuestaAfilpedsjv respuestaAfilpedsjv = HelperIbs.ibsAfiliarNatural(this.afi.AF_CodCliente, this.afi.sAF_Rif, text, this.tddnumtxt.Text); this.afi.AF_CodCliente = long.Parse(respuestaAfilpedsjv.afilpedsjv.SUserId); } } catch (IBException bException2) { IBException bException = bException2; string empty = string.Empty; bool flag1 = false; try { if ((bException.IsErrorIB || this.afi == null ? false : this.afi.nAF_Id > (long)0)) { HelperLogons.ValidarIntentoRecuparecionCLVFALLIDO(this.afi.nAF_Id, this.tddnumtxt.Text, Tools.GetClientIP()); } } catch (IBException bException1) { empty = bException1.IBMessage; flag1 = true; } if (flag1) { WebUtils.MessageBox2005(this, empty); } else { WebUtils.MessageBox2005(this, bException.IBMessage); } return; } catch (Exception exception) { WebUtils.MessageBox2005(this, exception.Message); return; } if ((!flag ? false : this.afi != null)) { this.PreguntasDesafio.llenarPreguntasAfiliado(this.afi.nAF_Id); this.panelDatos.Visible = false; this.panelValidacion.Visible = true; } }