Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            ques exm = new ques();

            exm.Show();
        }
Exemple #2
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            SqlConnection conn = new SqlConnection("Data Source=192.168.43.185,49172,49172;Initial Catalog=CC;User ID=sa;Password=mypc107");
            SqlDataReader rdr  = null;
            SqlCommand    cmd  = new SqlCommand("SELECT COUNT(*) FROM ExamStart WHERE examcode LIKE'" + Form1.examcode + "'", conn);


            rdr = cmd.ExecuteReader();
            //    while(rdr.Read())
            //     MessageBox.Show(rdr[0].ToString());
            rdr.Read();
            if ((int)rdr[0] > 0)
            {
                this.Hide();
                ques exm = new ques();
                exm.Show();
            }
        }