示例#1
0
        private void 退出ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AdminDenglu1 admindenglu = new AdminDenglu1();

            admindenglu.Show();
            this.Hide();//结束程序
        }
示例#2
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (comboBox1.Text == "学生")
            {
                StuDenglu1 studenglu = new StuDenglu1();
                studenglu.Show();
                this.Hide();
            }

            if (comboBox1.Text == "老师")
            {
                TeaDenglu1 teadenglu = new TeaDenglu1();
                teadenglu.Show();
                this.Hide();
            }

            if (comboBox1.Text == "管理员")
            {
                AdminDenglu1 admindenglu = new AdminDenglu1();
                admindenglu.Show();
                this.Hide();
            }


            timer1.Stop();
        }
示例#3
0
        private void button2_Click(object sender, EventArgs e)
        {
            textBox1.Text  = null;
            textBox2.Text  = null;
            comboBox1.Text = null;
            AdminDenglu1 admindenglu = new AdminDenglu1();

            admindenglu.Show();
            this.Hide();
        }
示例#4
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == null || textBox2.Text == null || comboBox1.Text == null)
            {
                MessageBox.Show("输入不完整,请重新输入", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            string sql = "insert into YH values('" + textBox1.Text + "','" + textBox2.Text + "','" + comboBox1.Text + "')";
            Dao1   dao = new Dao1();
            int    i   = dao.Execute(sql);

            if (i > 0)
            {
                MessageBox.Show("添加成功!");
                this.Hide();
                AdminDenglu1 admindenglu = new AdminDenglu1();
                admindenglu.Show();
            }
        }