Beispiel #1
0
        //“添加判断”按钮
        private void 添加ToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            AltJud ju = new AltJud();

            ju.Show();
            this.Hide();//隐藏本窗体
        }
Beispiel #2
0
        //实现右键修改选中判断题的功能
        private void toolStripMenuItem2_Click(object sender, EventArgs e)
        {
            int             MMid = Convert.ToInt32(dataGridView2.SelectedCells[0].Value); //获取选择试题的ID值
            string          sql  = "select * from TestInfo where ID=" + MMid + "";
            OleDbConnection con  = DataClass.DBCon();

            con.Open();
            OleDbCommand    com = new OleDbCommand(sql, con);
            OleDbDataReader re  = com.ExecuteReader();

            re.Read();
            //传递选择题数据
            ComVal.TeID = MMid;
            ComVal.seTi = re[2].ToString();
            ComVal.seR  = re[3].ToString();
            re.Close();
            con.Close();
            //选择题窗体出现
            AltJud se = new AltJud();

            se.Show();
            this.Hide();    //隐藏本窗体
        }