private void btnVentanaReportes_Click(object sender, RoutedEventArgs e) { AdministracionReportes r = new AdministracionReportes(); this.Close(); r.ShowDialog(); }
private void btnIniciarSesion_Click(object sender, RoutedEventArgs e) { OracleCommand comando = new OracleCommand("SELECT * FROM USUARIO WHERE EMAIL= :email AND PASSWORD = :contra", conexion); comando.Parameters.AddWithValue(":email", txtEmail.Text); comando.Parameters.AddWithValue(":contra", passwordBox1.Password); OracleDataReader lector = comando.ExecuteReader(); if (lector.Read()) { AdministracionReportes c = new AdministracionReportes(); this.Close(); c.ShowDialog(); } else { MessageBox.Show("Usuario Incorrecto"); } }