protected void btn_Cambiar_contrasena_Click(object sender, EventArgs e)
 {
     if ((txt_Old_Password.Text != string.Empty) && (txt_New_Password.Text != string.Empty) &&
         (txt_email.Text != string.Empty))
     {
         if (Cls_Secure.ValidarChangePasswod(txt_New_Password.Text))
         {
             AmazonFakeService.I_Base_DatosClient cliente = new AmazonFakeService.I_Base_DatosClient();
             List <string> lista  = new List <string>();
             string        passwd = "";
             foreach (var item in cliente.Password_Restore(txt_email.Text.Trim()))
             {
                 passwd = item.SPassword;
             }
             if (passwd.Equals(txt_Old_Password.Text.Trim()))
             {
                 lbl_Respuesta.Text = cliente.Change_Password(txt_email.Text.Trim(), txt_New_Password.Text.Trim());
                 Cls_Secure.Correo_Cambio_Contrasena(txt_email.Text.Trim(), txt_New_Password.Text.Trim());
             }
             else
             {
                 lbl_Respuesta.Text    = "La contraseña actual no coincide con los registros. Verifiquela!";
                 txt_Old_Password.Text = string.Empty;
                 txt_New_Password.Text = string.Empty;
                 txt_Old_Password.Focus();
             }
         }
     }
     else
     {
         lbl_Respuesta.Text = "Debe llenar todos los campos";
     }
 }
Exemplo n.º 2
0
 protected void btn_SingIn_Click(object sender, EventArgs e)
 {
     if ((txt_email.Text != string.Empty) && (txt_contrasena.Text != string.Empty))
     {
         if (Cls_Secure.Validar(txt_email.Text.Trim(), txt_contrasena.Text.Trim()))
         {
             this.Administracion_Accesos();
         }
         else
         {
             lbl_Errores.Text = "Error Contraseña";
         }
     }
     else
     {
         lbl_Errores.Text = "Ambos campos son obligatorios";
     }
 }
Exemplo n.º 3
0
        protected void btn_Continue_Click(object sender, EventArgs e)
        {
            if (this.txt_email.Text != string.Empty)
            {
                /*PENDIENTE:
                 * Crear if con consulta a base de datos para validar si el correo realmente existe
                 * ademas de agregar la contraseña del mismo en el campo contraseña del mesaje del correo*/

                if (Cls_Secure.Validar(this.txt_email.Text.Trim()))
                {
                    Cls_Secure.Correo_Recuperacion(this.txt_email.Text.Trim());
                    this.lbl_Errores.Text = "Correo Enviado Exitosamente!";
                    this.txt_email.Text   = string.Empty;
                    this.txt_email.Focus();
                }
            }
            else
            {
                this.lbl_Errores.Text = "El Campo de Correo no deberia estar Vacio!";
            }
        }
Exemplo n.º 4
0
 protected void btn_Createaccount_Click(object sender, EventArgs e)
 {
     if ((txt_nombre.Text != string.Empty) && (txt_email.Text != string.Empty) &&
         (txt_contrasena.Text != string.Empty))
     {
         if (txt_contrasena.Text.Trim().Equals(txt_contrasena2.Text.Trim()))
         {
             if (Cls_Secure.Validar(txt_nombre.Text, txt_email.Text.Trim(), txt_contrasena.Text.Trim()))
             {
                 AmazonFakeService.I_Base_DatosClient cliente = new AmazonFakeService.I_Base_DatosClient();
                 lbl_Errores.Text = cliente.Create_Account(txt_email.Text, txt_nombre.Text, txt_contrasena.Text);
                 Cls_Secure.Correo_Creacion_Cuenta(txt_email.Text, txt_nombre.Text, txt_contrasena.Text);
             }
         }
         else
         {
             lbl_Errores.Text = "Los campos de Password y Re-enter password deben ser iguales!";
         }
     }
     else
     {
         lbl_Errores.Text = "Todos los campos son obligatorios";
     }
 }