protected void txtCodigoAleatorio_TextChanged(object sender, System.EventArgs e)
        {
            if (this.txtCode != null && !String.IsNullOrEmpty(this.txtCode.Text))
            {
                //En caso si se ingrese a esta sección con un código promocional
                BL_CodigoAleatorio     blCodAleatorio = new BL_CodigoAleatorio();
                BL_PartidosProgramados blProgApuesta  = new BL_PartidosProgramados();
                BL_Cliente             blCliente      = new BL_Cliente();

                EN_CodigoAleatorio enCodAleatorio = new EN_CodigoAleatorio();
                enCodAleatorio.NroCodigoAleatorio = this.txtCode.Text;
                String    textError = blCodAleatorio.BL_validarCodigoIngresado(enCodAleatorio);
                DataTable dt        = new DataTable();

                if (!String.IsNullOrEmpty(textError))
                {
                    this.lblStatusCode.Text             = textError; //EN_Constante.textCodigoNoValido;
                    this.pnlValidator.CssClass          = "alert alert-danger";
                    this.txtCode.Enabled                = false;
                    this.btnGuardarApuestaGoles.Enabled = false;
                }
                else
                {
                    //Validar que existe codigo relacionado al programa de apuestas.....
                    EN_ProgramacionApuesta enProgXCodAleatorio = blCodAleatorio.BL_validarCodigoXprograma(enCodAleatorio, EN_Constante.apuestaGoles);

                    if (enProgXCodAleatorio == null)
                    {
                        this.lblStatusCode.Text             = EN_Constante.textNohayProgramaParaCodigo; //EN_Constante.textCodigoNoValido;
                        this.pnlValidator.CssClass          = "alert alert-danger";
                        this.txtCode.Enabled                = false;
                        this.btnGuardarApuestaGoles.Enabled = false;
                    }
                    else
                    {
                        dt = blProgApuesta.BL_ObtenerPozoMayorxApuesta(enProgXCodAleatorio);

                        this.lblStatusCode.Text             = EN_Constante.textCodigoValido;
                        this.pnlValidator.CssClass          = "alert alert-success";
                        this.txtCode.Enabled                = false;
                        this.btnGuardarApuestaGoles.Enabled = true;
                        BL_Util.guardarCookie(HttpContext.Current, EN_Constante.nombreCookieCodAleatorio, this.txtCode.Text);

                        //EN_ProgramacionApuesta d = blCodAleatorio.BL_codAleatorio_fechaTope(enCodAleatorio,EN_Constante.apuestaGoles);
                        this.lblCodFecTope.Text      = enProgXCodAleatorio.FechaFinal.ToShortTimeString() + " del " + enProgXCodAleatorio.FechaFinal.ToShortDateString(); // d.ToLongDateString();
                        this.txtNroProgramacion.Text = enProgXCodAleatorio.IdProgramaApuesta.ToString();
                        this.lblPozoPrograma.Text    = "S/. " + dt.Rows[0]["montoPozoMayor"].ToString();

                        pintarPartidos(enCodAleatorio);
                    }
                }
            }
            else
            {
                this.lblStatusCode.Text             = EN_Constante.textCodigoNoIngresado;
                this.pnlValidator.CssClass          = "alert alert-info";
                this.txtCode.Enabled                = true;
                this.btnGuardarApuestaGoles.Enabled = false;
            }
        }
Ejemplo n.º 2
0
        protected void txtCodigoAleatorio_TextChanged(object sender, System.EventArgs e)
        {
            // Response.Write("<script> alert('changed:"+ this.txtCode.Text +"') </script>");
            if (this.txtCode != null && !String.IsNullOrEmpty(this.txtCode.Text))
            {
                //En caso si se ingrese a esta sección con un código promocional
                BL_CodigoAleatorio     blCodAleatorio = new BL_CodigoAleatorio();
                BL_Cliente             blCliente      = new BL_Cliente();
                BL_PartidosProgramados blProgApuesta  = new BL_PartidosProgramados();
                DataTable dt = new DataTable();

                EN_CodigoAleatorio enCodAleatorio = new EN_CodigoAleatorio();
                enCodAleatorio.NroCodigoAleatorio = this.txtCode.Text;
                String textError = blCodAleatorio.BL_validarCodigoJugado(enCodAleatorio);
                //  Response.Write("<script> alert('EE-" + textError + "') </script>");
                if (!String.IsNullOrEmpty(textError))
                {
                    this.lblStatusCode.Text    = textError; //EN_Constante.textCodigoNoValido;
                    this.pnlValidator.CssClass = "alert alert-danger";
                    //this.txtCode.Enabled = false;
                    //this.btnGuardarPollaSemanal.Enabled = false;
                }
                else
                {
                    EN_ProgramacionApuesta enProgXCodAleatorio = null; //blCodAleatorio.BL_obtenerCodigoXprograma(enCodAleatorio, EN_Constante.laPollaSemanal);

                    if (enProgXCodAleatorio == null)
                    {
                        this.lblStatusCode.Text    = EN_Constante.textCodigoValido; //EN_Constante.textNohayProgramaParaCodigo; //EN_Constante.textCodigoNoValido;
                        this.pnlValidator.CssClass = "alert alert-success";         //"alert alert-danger";
                        //  this.txtCode.Enabled = false;
                        //  this.btnGuardarPollaSemanal.Enabled = false;
                        // pintarPartidos(enCodAleatorio);
                        pintarDatosJugada(this.txtCode.Text, sender, e);
                    }
                    else
                    {
                        this.lblStatusCode.Text    = EN_Constante.textCodigoValido;
                        this.pnlValidator.CssClass = "alert alert-success";
                        // this.txtCode.Enabled = false;
                        pintarDatosJugada(this.txtCode.Text, sender, e);
                        BL_Util.guardarCookie(HttpContext.Current, EN_Constante.nombreCookieCodAleatorio, this.txtCode.Text);

                        //this.lblCodFecTope.Text = enProgXCodAleatorio.FechaFinal.ToShortTimeString() + " del " + enProgXCodAleatorio.FechaFinal.ToShortDateString(); // d.ToLongDateString();
                        //this.txtNroProgramacion.Text = enProgXCodAleatorio.IdProgramaApuesta.ToString();
                        //dt = blProgApuesta.BL_ObtenerPozoMayorxApuesta(enProgXCodAleatorio);
                        //this.lblPozoPrograma.Text = "S/. " + dt.Rows[0]["montoPozoMayor"].ToString();
                    }
                }
            }
            else
            {
                this.lblStatusCode.Text    = EN_Constante.textCodigoNoIngresado;
                this.pnlValidator.CssClass = "alert alert-info";
                this.txtCode.Enabled       = true;
                //this.btnGuardarPollaSemanal.Enabled = false;
            }
        }
Ejemplo n.º 3
0
        public void pintarDatosJugada(String p_codeFrom, object sender, EventArgs e)
        {
            this.txtCode.Text = p_codeFrom;
            EN_CodigoAleatorio enCodAleatorio = new EN_CodigoAleatorio();

            enCodAleatorio.NroCodigoAleatorio = this.txtCode.Text;

            BL_ApuestaUsuario blApuestaUsuario = new BL_ApuestaUsuario();
            DataTable         dt = blApuestaUsuario.BL_ObtenerDatosApuesta(enCodAleatorio, "");

            if (dt.Rows.Count > 0)
            {
                this.lblTituloResultado.InnerText = dt.Rows[0]["tipoApuesta"].ToString();
                this.ls_codTipoApuesta            = dt.Rows[0]["codTipoApuesta"].ToString();
            }

            BL_CodigoAleatorio blCodAleatorio = new BL_CodigoAleatorio();
            DataTable          dt2            = blCodAleatorio.BL_ValidarCodigoAlearorio_ResultadoListo(enCodAleatorio);


            if (dt2.Rows.Count > 0)
            {
                flagResListos = "SI";
                pintarResultadoPartidos(enCodAleatorio);
                pintarGanadores(enCodAleatorio);
            }
            else
            {
                // divResulTitulo.Visible = false;
                divTableResultados.Visible         = false;
                divResulResumen.Visible            = false;
                divResulGanadores.Visible          = false;
                this.txtNroProgramacion2.Text      = "No existe resultado aún de la programación.";
                this.txtNroProgramacion2.ForeColor = System.Drawing.Color.Red;
            }

            //txtCodigoAleatorio_TextChanged(sender, e);
            pintarDatosApuesta(enCodAleatorio);
            pintarPartidoJugado(enCodAleatorio);
        }
Ejemplo n.º 4
0
        protected void btnVerJugada_Click(object sender, EventArgs e)
        {
            String textError = "Datos Incompletos";
            //  Response.Write("<script> alert('" + textError + "') </script>");

            BL_CodigoAleatorio blCodAleatorio = new BL_CodigoAleatorio();
            BL_Cliente         blCliente      = new BL_Cliente();

            EN_CodigoAleatorio enCodAleatorio = new EN_CodigoAleatorio();
            EN_Cliente         enCliente      = new EN_Cliente();

            textError = "";
            if (this.txtNroPromocionalJugado != null && !String.IsNullOrEmpty(this.txtNroPromocionalJugado.Text))
            {
                enCodAleatorio.NroCodigoAleatorio = this.txtNroPromocional.Text;
                //String codTipoApuesta = blCodAleatorio.BL_validarCodigoJugadoResultadoListo(enCodAleatorio);
                //if (String.IsNullOrEmpty(codTipoApuesta))
                //{
                textError = blCodAleatorio.BL_validarCodigoIngresado(enCodAleatorio);

                if (String.IsNullOrEmpty(textError))
                {
                    Response.Write("<script> alert('" + textError + "') </script>");
                }
                else
                {
                    BL_Util.guardarCookie(HttpContext.Current, EN_Constante.nombreCookieCodAleatorioVerJugada, this.txtNroPromocionalJugado.Text);
                    //String valor = HttpContext.Current.Session[EN_Constante.nombreCookieCodAleatorio].ToString();
                    this.txtNroPromocionalJugado.Text = "";
                    Response.Redirect("/Visualizar/VisualizarJugada.aspx", false);
                }
            }
            else
            {
                Response.Write("<script> alert('Ingresar Codigo Promocional') </script>");
            }
        }
Ejemplo n.º 5
0
        protected void btnLoguear_Click(object sender, EventArgs e)
        {
            BL_CodigoAleatorio blCodAleatorio = new BL_CodigoAleatorio();
            BL_Cliente         blCliente      = new BL_Cliente();

            EN_CodigoAleatorio enCodAleatorio = new EN_CodigoAleatorio();
            EN_Cliente         enCliente      = new EN_Cliente();

            try
            {
                //String recaptchaResponse = Request.Form.Get("g-recaptcha-response");
                //Response.Write("<script> alert('Iniicio') </script>");
                Captcha2.ValidateCaptcha(txtCaptcha2.Text.Trim());

                Boolean b = Captcha2.UserValidated;

                //Response.Write("<script> alert('" + recaptchaResponse + "') </script>");
                if (!this.checkBoxLogin.Checked)
                {
                    if (this.txtNroPromocional != null && !String.IsNullOrEmpty(this.txtNroPromocional.Text))
                    {
                        if (b) //recaptchaResponse != null && !recaptchaResponse.Equals(""))
                        {
                            enCodAleatorio.NroCodigoAleatorio = this.txtNroPromocional.Text;
                            //String codTipoApuesta = blCodAleatorio.BL_validarCodigoJugadoResultadoListo(enCodAleatorio);
                            //if (String.IsNullOrEmpty(codTipoApuesta))
                            //{
                            String textError = blCodAleatorio.BL_validarCodigoIngresado(enCodAleatorio);
                            if (!String.IsNullOrEmpty(textError))
                            {
                                Response.Write("<script> alert('" + textError + "') </script>");
                            }
                            else
                            {
                                BL_Util.guardarCookie(HttpContext.Current, EN_Constante.nombreCookieCodAleatorio, enCodAleatorio.NroCodigoAleatorio);
                                //String valor = HttpContext.Current.Session[EN_Constante.nombreCookieCodAleatorio].ToString();
                                Response.Redirect("InicioAG.aspx", false);
                            }
                            //}
                            //else
                            //    irAResultados(codTipoApuesta, enCodAleatorio);
                        }
                        else
                        {
                            Response.Write("<script> alert('Ingrese Código de Seguridad Correcto') </script>");
                        }
                    }
                    else
                    {
                        Response.Write("<script> alert('Ingresar Codigo Promocional') </script>");
                    }
                }
                else
                {
                    enCliente.NroDocumento = this.textNroDocumento.Text.ToString();
                    enCliente.Contrasena   = this.textContrasenha.Text.ToString();
                    String textError = blCliente.BL_validarUsuarioIngresado(enCliente);
                    if (!String.IsNullOrEmpty(textError))
                    {
                        Response.Write("<script> alert('" + textError + "') </script>");
                    }
                    else
                    {
                        if (this.txtNroPromocional != null && !String.IsNullOrEmpty(this.txtNroPromocional.Text))
                        {
                            enCodAleatorio.NroCodigoAleatorio = this.txtNroPromocional.Text;
                            textError = blCodAleatorio.BL_validarCodigoIngresado(enCodAleatorio);
                            //String codTipoApuesta = blCodAleatorio.BL_validarCodigoJugadoResultadoListo(enCodAleatorio);
                            //if (String.IsNullOrEmpty(codTipoApuesta))
                            //{
                            if (!String.IsNullOrEmpty(textError))
                            {
                                Response.Write("<script> alert('" + textError + "') </script>");
                            }
                            else
                            {
                                if (b)     //recaptchaResponse != null && !recaptchaResponse.Equals(""))
                                {
                                    BL_Util.guardarCookie(HttpContext.Current, EN_Constante.nombreCookieCodAleatorio, enCodAleatorio.NroCodigoAleatorio);
                                    BL_Util.guardarCookie(HttpContext.Current, EN_Constante.nombreCookieNroDoc, enCliente.NroDocumento);
                                    Response.Redirect("InicioAG.aspx", false);
                                }
                                else
                                {
                                    Response.Write("<script> alert('Ingrese Código de Seguridad Correcto') </script>");
                                }
                            }
                            //}
                            //else
                            //    irAResultados(codTipoApuesta, enCodAleatorio);
                        }
                        else
                        {
                            if (b) //recaptchaResponse != null && !recaptchaResponse.Equals(""))
                            {
                                BL_Util.guardarCookie(HttpContext.Current, EN_Constante.nombreCookieNroDoc, enCliente.NroDocumento);
                                Response.Redirect("InicioAG.aspx", false);
                            }
                            else
                            {
                                Response.Write("<script> alert('Ingrese Código de Seguridad Correcto') </script>");
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Response.Write("<script> alert('Hubo problemas...') </script>");
            }
            finally
            {
            }
        }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            String codeFrom = BL_Util.obtenerCookie(HttpContext.Current, EN_Constante.nombreCookieCodAleatorio);

            //codeFrom = "5SWH2A9R";
            if (!String.IsNullOrEmpty(codeFrom) && !codeFrom.Equals(""))
            {
                this.txtCode.Text = codeFrom;

                //En caso si se ingrese a esta sección con un código promocional
                BL_CodigoAleatorio     blCodAleatorio = new BL_CodigoAleatorio();
                BL_PartidosProgramados blProgApuesta  = new BL_PartidosProgramados();
                BL_Cliente             blCliente      = new BL_Cliente();

                EN_CodigoAleatorio enCodAleatorio = new EN_CodigoAleatorio();
                enCodAleatorio.NroCodigoAleatorio = codeFrom;
                DataTable dt        = new DataTable();
                String    textError = blCodAleatorio.BL_validarCodigoIngresado(enCodAleatorio);


                //DateTime d = blCodAleatorio.BL_codAleatorio_fechaTope(enCodAleatorio);
                //this.codFecTope.Text = d.ToShortTimeString() + " del " + d.ToShortDateString(); // d.ToLongDateString();


                if (!String.IsNullOrEmpty(textError))
                {
                    this.lblStatusCode.Text        = textError; //EN_Constante.textCodigoNoValido;
                    this.pnlValidator.CssClass     = "alert alert-danger";
                    this.txtCode.Enabled           = false;
                    this.btnGuardarPartida.Enabled = false;
                }
                else
                {
                    EN_ProgramacionApuesta enProgXCodAleatorio = blCodAleatorio.BL_validarCodigoXprograma(enCodAleatorio, EN_Constante.cartillaDeLaSuerte);

                    if (enProgXCodAleatorio == null)
                    {
                        this.lblStatusCode.Text        = EN_Constante.textNohayProgramaParaCodigo; //EN_Constante.textCodigoNoValido;
                        this.pnlValidator.CssClass     = "alert alert-danger";
                        this.txtCode.Enabled           = false;
                        this.btnGuardarPartida.Enabled = false;
                    }
                    else
                    {
                        this.lblStatusCode.Text        = EN_Constante.textCodigoValido;
                        this.pnlValidator.CssClass     = "alert alert-success";
                        this.txtCode.Enabled           = false;
                        this.btnGuardarPartida.Enabled = true;

                        // EN_ProgramacionApuesta d = blCodAleatorio.BL_codAleatorio_fechaTope(enCodAleatorio, EN_Constante.cartillaDeLaSuerte);
                        this.lblCodFecTope.Text      = enProgXCodAleatorio.FechaFinal.ToShortTimeString() + " del " + enProgXCodAleatorio.FechaFinal.ToShortDateString(); // d.ToLongDateString();
                        this.txtNroProgramacion.Text = enProgXCodAleatorio.IdProgramaApuesta.ToString();
                        dt = blProgApuesta.BL_ObtenerPozoMayorxApuesta(enProgXCodAleatorio);
                        this.lblPozoPrograma.Text = dt.Rows[0]["signoMoneda"].ToString() + " " + dt.Rows[0]["montoPozoMayor"].ToString();

                        pintarPartidos(enCodAleatorio);
                    }
                }
            }
            else
            {
                this.lblStatusCode.Text        = EN_Constante.textCodigoNoIngresado;
                this.pnlValidator.CssClass     = "alert alert-info";
                this.txtCode.Enabled           = true;
                this.btnGuardarPartida.Enabled = false;
            }
        }