Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Aplicacion.Idiomas id = new Idiomas((string)Session["idioma"]);

            LabelDestacados.Text = id.Traducir("destacados");
            LabelMásVendidas.Text = id.Traducir("vendidos");
            LabelComponenteEstrella.Text = id.Traducir("componente");

            LabelArtículo.Text = "GT Aggressor 1.0 2014";
            LabelArtículo2.Text = "Bambino sbavando";
            Label1.Text = "MERIDA HARDY PRO STEEL 2 2013";
            Label4.Text = id.Traducir("triciclo");
            Label8.Text = id.Traducir("cambio");
            Label11.Text = "Cassete Shimano HG31 8V 11-34";

            LabelDescripciónArtículo.Text = "Suntour XCT MLO 80mm, Shimano Acera 8v, Promax Decipher Hydráulico 160mm.";
            LabelDescripciónArtículo2.Text = "Deore Shadow 30v, RockShox XC32 TK Solo Air 100mm, Frenos Tektro Draco Hyd.";
            Label2.Text = "SUNTOUR DURO, HAYES MX-5 DISC 160";
            Label5.Text = id.Traducir("descripcion4");
            Label9.Text = id.Traducir("descripcion5");
            Label12.Text = id.Traducir("descripcion6");

            LabelPrecioConIva.Text = "6499€";
            LabelPrecioConIva2.Text = "7895€";
            Label3.Text = "899€";
            Label6.Text = "46€";
            Label10.Text = "289€";
            Label13.Text = "58€";
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Aplicacion.Idiomas id = new Aplicacion.Idiomas((string)Session["idioma"]);

            //Taducciones Normales
            LabelNombre.Text = id.Traducir("nombre");
            LabelApellido1.Text = id.Traducir("apellido1");
            LabelApellido2.Text = id.Traducir("apellido2");
            LabelDirreccion.Text = id.Traducir("direccion");
            LabelPoblacion.Text = id.Traducir("poblacion");
            LabelProvincia.Text = id.Traducir("provincia");
            LabelPais.Text = id.Traducir("pais");
            LabelContrasena.Text = id.Traducir("contrasena");
            LabelContrasena2.Text = id.Traducir("contrasena2");
            LabelAviso.Text = id.Traducir("aviso");
            //Traducciones de control de Validacion
            CustomValidatorEmail.ErrorMessage = id.Traducir("erroremail4");
            CompareValidatorContrasena.ErrorMessage = id.Traducir("errorcontrasena");
            RequiredFieldValidatorContrasena.ErrorMessage = id.Traducir("errorcontrasena2");
            RequiredFieldValidatorContrasena2.ErrorMessage = id.Traducir("errorcontrasena2");
            RequiredFieldValidatorEmail.ErrorMessage = id.Traducir("erroremail2");
            RequiredFieldValidatorNombre.ErrorMessage = id.Traducir("errornombre");
            RequiredFieldValidatorApellido.ErrorMessage = id.Traducir("errorapellido");
            RequiredFieldValidatorNif.ErrorMessage = id.Traducir("errornif");
            RegularExpressionValidatorEmail.ErrorMessage = id.Traducir("erroremail");
            RegularExpressionValidatorCp.ErrorMessage = id.Traducir("errorcp");
            //Taducciones de botones
            ButtonEnviarRegistro.Text = id.Traducir("botonenviar");
            ButtonLimpiarCampos.Text = id.Traducir("botonlimpiar");
        }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Aplicacion.Idiomas id = new Idiomas((string)Session["idioma"]);
            Label1.Text = id.Traducir("carro");
            Label2.Text = id.Traducir("productos");
            Label3.Text = id.Traducir("precio");
            Label4.Text = id.Traducir("cantidad");
            Label5.Text = id.Traducir("total");

            //Bici de ejemplo
            Label6.Text = "ORBEA RALLON X-LTD";

            Label7.Text = "4.499,95";
            Label8.Text = "4.499,95";

            Label9.Text = id.Traducir("subtotal");
            Label10.Text = Label8.Text;
            Label11.Text = id.Traducir("iva");

            //calcular iva

            double subtotal = double.Parse(Label10.Text);
            double iva = subtotal * 0.21;
            Label12.Text = redondear(iva);

            Label13.Text = id.Traducir("total");

            //subtotal mas iva

            Label14.Text = redondear(subtotal + iva);

            Button1.Text = id.Traducir("actualizar");
            Button2.Text = id.Traducir("realizar_pedido");
        }
Example #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Aplicacion.Idiomas id = new Aplicacion.Idiomas((string)Session["idioma"]);

            //Taducciones Normales
            LabelNombre.Text = id.Traducir("nombre");
            LabelNombreV.Text = id.Traducir("nombreV");
            LabelApellido1.Text = id.Traducir("apellido1");
            LabelApellido1V.Text = id.Traducir("apellido1V");

            LabelApellido2V.Text = id.Traducir("apellido2");
            LabelApellido2.Text = id.Traducir("apellido2");

            LabelDirreccionV.Text = id.Traducir("direccion");
            LabelPoblacionV.Text = id.Traducir("poblacion");

            LabelDirreccion.Text = id.Traducir("direccion");
            LabelPoblacion.Text = id.Traducir("poblacion");
            LabelProvincia.Text = id.Traducir("provincia");
            LabelPais.Text = id.Traducir("pais");
            LabelContrasena3.Text = id.Traducir("contrasena3");
            LabelContrasena.Text = id.Traducir("contrasena1");
            LabelContrasena2.Text = id.Traducir("contrasena2");
            LabelAviso.Text = id.Traducir("aviso");
            //Traducciones de control de Validacion
            CompareValidatorContrasena.ErrorMessage = id.Traducir("errorcontrasena");
            RequiredFieldValidatorContrasena.ErrorMessage = id.Traducir("errorcontrasena2");
            RequiredFieldValidatorContrasena2.ErrorMessage = id.Traducir("errorcontrasena2");
            RequiredFieldValidatorEmail.ErrorMessage = id.Traducir("erroremail2");
            RequiredFieldValidatorNombre.ErrorMessage = id.Traducir("errornombre");
            RequiredFieldValidatorApellido.ErrorMessage = id.Traducir("errorapellido");
            RequiredFieldValidatorNif.ErrorMessage = id.Traducir("errornif");
            RegularExpressionValidatorEmail.ErrorMessage = id.Traducir("erroremail");
            RegularExpressionValidatorCp.ErrorMessage = id.Traducir("errorcp");
            //Taducciones de botones
            ButtonEnviarRegistro.Text = id.Traducir("botonmodificar");
            ButtonBaja.Text = id.Traducir("baja");

            if ((string)Session["usuario"] != null)
            {
                ENClientes auz = new ENClientes();
                auz = auz.ObtenerClientePorId(int.Parse(Session["IdUsuario"].ToString()));

                LabelNombreV1.Text = auz.Nombre;
                LabelApellido1V1.Text = auz.Apellido1;
                LabelApellido2V1.Text = auz.Apellido2;

                LabelNifV1.Text = auz.Nif;
                LabelEmailV1.Text = auz.Email;
                LabelContrasena3V1.Text = auz.Contrasena;
                LabelDirreccionV1.Text = auz.Direccion;
                LabelCpV1.Text = auz.Cp;
                LabelPoblacionV1.Text = auz.Poblacion;
            }
            else
            {
                Response.Redirect("registro-incorrecto.aspx");
            }
        }
Example #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //codigo para borrar del carro

            if (Request.QueryString["borrar"] != null)
            {
                int idBorrar;
                idBorrar = int.Parse(Request.QueryString["borrar"]);
                ENCarro ca = new ENCarro();
                ca.BorrarLinea(idBorrar);
            }
            //codigo para borrar del carro

            Aplicacion.Idiomas id = new Idiomas((string)Session["idioma"]);
            LabelTituloPagina.Text = id.Traducir("carro");
            Label9.Text = id.Traducir("subtotal");
            Label11.Text = id.Traducir("iva");
            Label13.Text = id.Traducir("total");
            Button1.Text = id.Traducir("actualizar");
            ButtonPedido.Text = id.Traducir("realizar_pedido");

            ENCarro c2 = new ENCarro();
            subtotal=c2.ObtenerSubTotal(Session.SessionID);
            IVA = subtotal * (float)0.21;
            total = subtotal + IVA;
            LabelSubtotal.Text = subtotal.ToString();
            LabelTotal.Text = total.ToString();
            LabelIVA.Text = IVA.ToString();

            if (Session["idioma"].ToString() == "es")
            {
                if (!Page.IsPostBack)//pruebas
                {
                    DataSet d1 = new DataSet();
                    Aplicacion.ENCarro c1 = new Aplicacion.ENCarro();
                    d1 = c1.ObtenerCarro(Session.SessionID);
                    GridViewCarroES.DataSource = d1;
                    GridViewCarroES.DataBind();

                }

            }
            else
            {
                if (!Page.IsPostBack)//pruebas
                {
                    DataSet d1 = new DataSet();
                    Aplicacion.ENCarro c1 = new Aplicacion.ENCarro();
                    d1 = c1.ObtenerCarro(Session.SessionID);
                    GridViewCarroEN.DataSource = d1;
                    GridViewCarroEN.DataBind();

                }

            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Aplicacion.Idiomas id = new Aplicacion.Idiomas((string)Session["idioma"]);

            RegularExpressionValidatorEmail.ErrorMessage = id.Traducir("erroremail");
            RequiredFieldValidatorEmail.ErrorMessage = id.Traducir("erroremail2");
            CustomValidatorEmail.ErrorMessage = id.Traducir("erroremail3");

            ButtonEnviar.Text = id.Traducir("botonenviar");

            LabelRecuperarCont.Text = id.Traducir("recuperacont");
            LabelInEmail.Text = id.Traducir("inserteemail");
        }
        protected void ButtonEnviar_Click(object sender, EventArgs e)
        {
            Aplicacion.Idiomas id = new Aplicacion.Idiomas((string)Session["idioma"]);

            ENClientes en = new ENClientes();
            en.Email = TextBoxEmail.Text;

            if (en.ExisteCliente(en))
            {
                SmtpClient smtpClient = new SmtpClient("smtp.gmail.com", 587);
                MailMessage message = new MailMessage();
                try
                {
                    MailAddress fromAddress = new MailAddress("*****@*****.**", "BicisUA");
                    MailAddress toAddress = new MailAddress(en.Email.ToString(), en.Nombre.ToString());

                    message.From = fromAddress;
                    message.To.Add(toAddress);

                    message.Subject = "Recuperar contraseña/Recover Password";
                    message.Body = "Hola, " + en.Nombre.ToString() + ", " + en.Apellido1.ToString() + " ha solicitado el recordatorio de su contraseña. Su contraseña es: " + en.Contrasena.ToString() + "/Hello, " + en.Nombre.ToString() + ", " + en.Apellido1.ToString() + " has requested the password reminder. Your password is: " + en.Contrasena.ToString();
                    smtpClient.EnableSsl = true;

                    smtpClient.Credentials = new System.Net.NetworkCredential("*****@*****.**", "universidadalicante");
                    smtpClient.Send(message);
                    LabelInEmailE.Text = id.Traducir("enviocorrecto");
                }
                catch (Exception ex)
                {
                    LabelInEmailE.Text = id.Traducir("envioincorrecto");
                }
            }
            else
            {
                LabelInEmailE.Text = id.Traducir("envioincorrecto");
            }
        }
Example #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ////////////////////////////////////////////////////////////////////////////
            //Manejo variables de sessión
            //Session["idioma"] = "00000";
            //LabelPruebas.Text = "SesionIdioma=" + (string)Session["idioma"];
            if ((string)Session["idioma"] == "es" || (string)Session["idioma"] == "en")
            {
                //LabelPruebas.Text = "asignamos valores ";
            }
            else//Asignamos un idioma por defecto
            {
                //Session["idioma"] = "es";
                //LabelPruebas.Text = "SesionIdioma=" + (string)Session["idioma"];
            }
            //LabelPruebas.Text = (string)Session["idioma"];
            ////////////////////////////////////////////////////////////////////////////////

            //Traducciones de los campos estáticos
            Aplicacion.Idiomas id = new Aplicacion.Idiomas((string)Session["idioma"]);

            LabelTituloCategorias.Text = id.Traducir("titulo_familias");
            LabelBuscarTitulo.Text = id.Traducir("buscar_titulo");
            LabelSeccion1.Text = id.Traducir("inicio");
            LabelSeccion2.Text = id.Traducir("tienda");
            LabelSeccion3.Text = id.Traducir("historialcompras");
            LabelSeccion4.Text = id.Traducir("mi_comra");
            LabelSeccion5.Text = id.Traducir("mi_cuenta");
            LabelConectadoEmail.Text = id.Traducir("usuarioConectado");
            HyperLinkConectadoEditar.Text = id.Traducir("conectadoEditar");
            HyperLinkConectadoSalir.Text = id.Traducir("conectadoDesconectar");
            HyperLinkRegistrarse.Text = id.Traducir("registrarseLogin");
            HyperLinkRecuperarContrasena.Text = id.Traducir("recuperarPass");
            LabelSuCompra.Text = id.Traducir("mi_comra");

            //FIN Traducciones de los campos estáticos

            ENFamilias family = new ENFamilias();
            DataSet d = new DataSet();

            if (Session["idioma"].ToString() == "es")
            {
                if (!Page.IsPostBack)
                {
                    d = family.ObtenerFamilias();
                    GridViewFamiliasES.DataSource = d;
                    GridViewFamiliasES.DataBind();
                }
                PanelFamiliasES.Visible = true;
                PanelFamiliasEN.Visible = false;
            }
            else if (Session["idioma"].ToString() == "en")
            {
                if (!Page.IsPostBack)
                {
                    d = family.ObtenerFamilias();
                    GridViewFamiliasEN.DataSource = d;
                    GridViewFamiliasEN.DataBind();
                }
                PanelFamiliasES.Visible = false;
                PanelFamiliasEN.Visible = true;
            }
            else
            {
                if (!Page.IsPostBack)
                {
                    d = family.ObtenerFamilias();
                    GridViewFamiliasES.DataSource = d;
                    GridViewFamiliasES.DataBind();
                }
                PanelFamiliasES.Visible = true;
                PanelFamiliasEN.Visible = false;
            }

            //PanelHipervinculosFamilias.Controls.Add(l1);

            //FIN Listado de familias

            //Usuario conectado/desconectado
            if (Session["Nombre"]!=null)
            //if (int.Parse( Session["IdUsuario"].ToString()) > 0)//Hay usuario conectado
            {
                PanelLoginConectado.Visible = true;
                PanelLoginDesconectado.Visible = false;
                LabelConectadoEmail.Text = LabelConectadoEmail.Text + Session["usuario"];
                LabelConectadoNombre.Text =  Session["Nombre"] + ", " + Session["Apellido1"] + " " + Session["Apellido2"] + "";
            }
            else//NO Hay usuario conectado
            {
                PanelLoginConectado.Visible = false;
                PanelLoginDesconectado.Visible = true;
            }

            //FIN Usuario conectado/desconectado

            ENCarro carro = new ENCarro();
            LabelCarroCantidad.Text = carro.ObtenerCantidad(Session.SessionID).ToString() + " " + id.Traducir("carroArticulos");
            LabelCarrolTotal.Text = (carro.ObtenerSubTotal(Session.SessionID)*0.21).ToString() + id.Traducir("carroTotal");
        }