Example #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            MessageBox.Show("                             Ok, não tem problema! \n Vamos voltar aos assuntos e livros que poderão lhe ajudar a chegar na onde você deseja, fique tranquilo/a.");
            Hide();
            TelaResultados abreTelaResultados = new TelaResultados();

            abreTelaResultados.ShowDialog();
        }
Example #2
0
        private void btnPortugues_Click(object sender, EventArgs e)
        {
            Hide();
            Materia = "Portugues";
            TelaResultados abreResultados = new TelaResultados();

            abreResultados.ShowDialog();
        }
Example #3
0
        private void btnTecnologia_Click(object sender, EventArgs e)
        {
            Hide();
            Materia = "Tecnologia";
            TelaResultados abreResultados = new TelaResultados();

            abreResultados.ShowDialog();
        }
Example #4
0
        private void btnPesquisar_Click(object sender, EventArgs e)
        {
            if (txtAssunto.Text != "")
            {
                string         strCommand = "Select * from livros where materia = '" + txtAssunto.Text + "'";
                DataTable      dt         = new DataTable();
                SqlDataAdapter da         = new SqlDataAdapter(strCommand, ConnectOpen);
                da.Fill(dt);

                if (dt.Rows.Count > 0)
                {
                    Hide();
                    txtMateria = txtAssunto.Text;
                    TelaResultados abreResultados = new TelaResultados();
                    abreResultados.ShowDialog();
                }

                string         strCommandd = "Select * from videos where materia = '" + txtAssunto.Text + "'";
                DataTable      dt2         = new DataTable();
                SqlDataAdapter da2         = new SqlDataAdapter(strCommandd, ConnectOpen);
                da2.Fill(dt2);

                if (dt2.Rows.Count > 0)
                {
                    Hide();
                    txtMateria = txtAssunto.Text;
                    TelaResultados abreResultados = new TelaResultados();
                    abreResultados.ShowDialog();
                }
            }

            else
            {
                MessageBox.Show("Insira um assunto e tente novamente.");
            }
        }