示例#1
0
        private void button2_Click(object sender, EventArgs e)        //添加学生信息按钮
        {
            condstr = "";
            this.STbj_Load(sender, e);            //重载数据

            TempData.flag = 1;                    //TempData.flag为全局变量,传递给editstudent1窗体,临时数据存储
            Form myform = new STbj1();

            myform.ShowDialog();                        //调用窗口
            this.STbj_Load(sender, e);
        }
示例#2
0
        private void button4_Click(object sender, EventArgs e) //修改确认按钮
        {
            TempData.flag = 2;                                 //TempData.flag为全局变量,传递给editstudent1窗体
            if (TempData.no != "")
            {
                Form myform = new STbj1();
                myform.ShowDialog();                        //采用有模式方式调用
                this.STbj_Load(sender, e);
                dataGridView1.Refresh();
            }
            else
            {
                MessageBox.Show("先选择要修改的选题记录", "错误提示");
            }

            condstr = "";
            this.STbj_Load(sender, e);            //重载数据
        }