예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["InicioSesion"] == null)
            {
                Response.Redirect("defaultSinLogeoUN.aspx");
            }
            lblEscuela.Text = Session["escuela"].ToString();       //coloca el nombre de la escuela
            lblNivel.Text   = Session["Nivel"].ToString();         //coloca el nombre del nivel
            string valor = Request.QueryString["rseT"].ToString(); //obtiene el valor de parametro


            lblUbicación.Text  = Session["Ubicación"].ToString();          //coloca la ubicación
            usuario            = (Usuario)Session["InicioSesion"];         //setea el usuario registrado
            lblAlumno.Text     = usuario.Nombre + " " + usuario.Apellidos; //setea el nombre del alumno
            lblInstructor.Text = Session["ConfInstructor"].ToString();     //setea el instructor
            lblFecha.Text      = Session["ConfFecha"].ToString();          //setea la fecha
            lblHora.Text       = Session["ConfHinicio"].ToString();        //setea la hora


            //variables cuando no hay alquiler
            if (valor == "0")
            {
                lblTotal.Text      = "₡ " + Session["PrecioReserva"].ToString();
                Session["idTabRe"] = valor;
                //Calculos de montos
                int    precioSesionIV = Convert.ToInt32(Session["PrecioReserva"].ToString());
                double impuesto       = precioSesionIV * (0.13);
                lblImpuestos.Text = "₡ " + impuesto;
                double precioSesion = precioSesionIV - impuesto;
                lblPrecioLec.Text = "₡ " + precioSesion;
            }//cuando hay alquiler
            else
            {
                EncriptarLogica seg = new EncriptarLogica();    //decodifica el valor del id
                valor                = seg.Base64Decode(valor); //decodifica el valor del id
                idTablaRser          = valor;                   //setea el valor de la tabla
                Session["idTabRe"]   = valor;
                lblAlquilerDeta.Text = Session["MarcaTa"].ToString();

                int    precioSesionIV = Convert.ToInt32(Session["PrecioReserva"].ToString());
                double impuestoSesion = precioSesionIV * (0.13);

                int    precioAlquilerIV = Convert.ToInt32(Session["PrecioAlqui"].ToString());
                double impuestoAlquiler = precioAlquilerIV * (0.13);

                lblImpuestos.Text = "₡ " + (impuestoSesion + impuestoAlquiler);


                lblPrecioLec.Text      = "₡ " + (precioSesionIV - impuestoSesion);
                lblPrecioAlquiler.Text = "₡ " + (precioAlquilerIV - impuestoAlquiler);
                lblTotal.Text          = "₡ " + (precioSesionIV + precioAlquilerIV);


                if (!IsPostBack)
                {
                    CrearReservaTabla();
                }
            }
        }
        protected void repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            Label     lbl = e.Item.FindControl("nombre") as Label;
            HyperLink hyp = e.Item.FindControl("hpvReservaNivel") as HyperLink;

            EncriptarLogica encrip       = new EncriptarLogica();
            String          encripNombre = encrip.Encripta(lbl.Text);

            hyp.NavigateUrl = "reservaNivel.aspx?escuela=" + encripNombre;
        }
예제 #3
0
        protected void repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            Label lbl       = e.Item.FindControl("IDTabla") as Label;
            Label lblPrecio = e.Item.FindControl("lblPrecio") as Label;
            Label lblMarca  = e.Item.FindControl("lblMarca") as Label;

            HyperLink       hyp   = e.Item.FindControl("hpvReservaConfi") as HyperLink;
            EncriptarLogica segr  = new EncriptarLogica();
            string          valor = segr.Base64Encode(lbl.Text);

            Session["PrecioAlqui"] = lblPrecio.Text;
            Session["MarcaTa"]     = lblMarca.Text;

            hyp.NavigateUrl = "reservaConfirmar.aspx?rseT=" + valor;
            //hyp.NavigateUrl = "reservaConfirmar.aspx?rseT=" +"SFo¿0y"+lbl.Text;
        }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["InicioSesion"] == null)
            {
                Response.Redirect("defaultSinLogeoUN.aspx");
            }

            Session["numero"]   = 0;
            Session["asigando"] = 0;

            nombreUbicacíon.Text = Session["Ubicación"].ToString();
            string          valor = Request.QueryString["escuela"].ToString();
            EncriptarLogica encry = new EncriptarLogica();

            nombreEscuela.Text = encry.Desencripta(valor);
            Session["escuela"] = nombreEscuela.Text;
        }