예제 #1
0
        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");
            }
        }
예제 #2
0
        private void ValidarCampos()
        {
            string str;

            if (base.Tipo_Seguridad == 1)
            {
                if (this.txtPassword.Text.Trim().Equals(string.Empty))
                {
                    throw new Exception("La Clave de Transacciones es requerida");
                }
                if (!HelperLogons.ValidarClaveTransacciones(base.Afiliado.nAF_Id, this.txtPassword.Text.Trim(), WebUtils.GetClientIP(this), base.sCod))
                {
                    throw new Exception("La Clave de Transacciones no es válida");
                }
                this.txtPassword.Text = string.Empty;
            }
            IObjetoGenerico objetoTransaccion = (IObjetoGenerico)this.tipotransaccion.ObjetoTransaccion;

            if (objetoTransaccion.GetType() == typeof(GTransferenciasPagos))
            {
                GTransferenciasPagos gTransferenciasPago = (GTransferenciasPagos)objetoTransaccion;
                string str1 = gTransferenciasPago.TipoTransaccion.ToString();
                if (base.sCod == 30)
                {
                    if (str1 != "PagoServicioCANTV")
                    {
                        str = (str1 == "PagoServicioCANTVNET" ? "PACNN" : "PAMOV");
                    }
                    else
                    {
                        str = "PAGSE";
                    }
                    str1 = str;
                }
                else if (str1.Equals("TransferenciaMismoTitularBAV"))
                {
                    str1 = "TBAMT";
                }
                else if (str1.Equals("TransferenciaTercerosBAV"))
                {
                    str1 = "TBTER";
                }
                else if (str1.Equals("TransferenciaOtrosBancosMismoTitular"))
                {
                    str1 = "TBOMT";
                }
                else if (str1.Equals("TransferenciaOtrosBancosTerceros"))
                {
                    str1 = "TBOTE";
                }
                else if (str1.Equals("PagoTarjetaCreditoMismoTitularBAV"))
                {
                    str1 = "PTBMT";
                }
                else if (str1.Equals("PagoTarjetaCreditoTercerosBAV"))
                {
                    str1 = "PTBTE";
                }
                else if (str1.Equals("PagoTarjetaCreditoOtrosBancosMismoTitular"))
                {
                    str1 = "PTOMT";
                }
                else if (str1.Equals("PagoTarjetaCreditoOtrosBancosTerceros"))
                {
                    str1 = "PTOTE";
                }
                else
                {
                    str1 = (!str1.Equals("PagoServicioElectricidadCaracas") ? "" : "PAEDC");
                }
                if ((str1.Equals("") ? false : HelperTransaccion.AcumuladorTransVerifyUpdate(true, base.Afiliado.nAF_Id, gTransferenciasPago.Monto, base.sCod, str1)))
                {
                    throw new Exception("El Monto supera al máximo diario");
                }
            }
        }