Ejemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)        //添加确认
        {
            condstr = "";
            this.TMbj_Load(sender, e);            //重载数据

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

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

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