private void CambiarContraseña_FormClosing(object sender, FormClosingEventArgs e)
        {
            start win = new start();

            win.Show();
            this.Hide();
        }
Exemple #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            start win = new start();

            win.Show();
            this.Hide();
        }
 private void button5_Click(object sender, EventArgs e)
 {
     try
     {
         if (textBox1.Text.Equals("") ||
             textBox2.Text.Equals(""))
         {
             MessageBox.Show("Llene correctamente los datos");
         }
         else
         {
             var idU = Conexion.ExecuteQuery($"SELECT idUser FROM APPUSER " +
                                             $"WHERE username='******'");
             var idUs   = idU.Rows[0];
             int idUser = Convert.ToInt32(idUs[0].ToString());
             Conexion.ExecuteNonQuery($"UPDATE APPUSER SET password = '******' " +
                                      $"WHERE idUser='******'");
             MessageBox.Show("Contraseña actualizada");
             start win = new start();
             win.Show();
             this.Hide();
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show("ERROR");
     }
 }