private void button2_Click(object sender, EventArgs e) { MySqlConnection conexao = new MySqlConnection("server=localhost;database=TRAILER;uid=root;pwd=;"); conexao.Open(); MySqlCommand comando = conexao.CreateCommand(); comando.CommandText = "SELECT count(*) FROM USUARIOS WHERE NOME = '" + txt_usuario.Text + "' AND SENHA = '" + txt_senha.Text + "'"; int resposta = int.Parse(comando.ExecuteScalar().ToString()); if (resposta == 1) { TrailerPaulista tp = new TrailerPaulista(); Hide(); tp.Show(); } else { MessageBox.Show("TENTE NOVAMENTE"); } conexao.Close(); }
private void pictureBox1_Click(object sender, EventArgs e) { Hide(); TrailerPaulista tp = new TrailerPaulista(); tp.Show(); }