Beispiel #1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            string pic = "";

            timer1.Interval = 100;
            label1.Text     = "";
            if (i < ss.Length)
            {
                pictureBox1.Image = Image.FromFile(Application.StartupPath + "\\images\\" + ss[i]);
                i++;
                pic = ss[i - 1];
            }
            else
            {
                i = 0;
                pictureBox1.Image = Image.FromFile(Application.StartupPath + "\\images\\" + ss[i]);
                pic = ss[i];
            }

            count++;
            if (count > r.Next(100, 150))
            {
                count          = 0;
                timer1.Enabled = false;
                string sql = "select sname,sno from Student where picture=N'" + pic + "'";
                query3(sql);
                addGrade ag = new addGrade();
                ag.Show();
            }
        }
Beispiel #2
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string sql = "select picture from Student where sname=N'" + comboBox1.SelectedItem.ToString() + "'";
            string s   = query1(sql);

            pictureBox1.Image = Image.FromFile(Application.StartupPath + "\\images\\" + s);
            string sql1 = "select sname,sno from Student where picture=N'" + s + "'";

            query3(sql1);

            addGrade ag = new addGrade();

            ag.Show();
        }