《计算机网络》课程通用题库管理系统设计与实现(20)_毕业论文

毕业论文移动版

毕业论文 > 计算机论文 >

《计算机网络》课程通用题库管理系统设计与实现(20)


                MessageBox.Show("试卷未保存,请先报存试卷信息.");
        }
        private void btn保存_Click(object sender, EventArgs e)
        {
            DataTable dt = BL_数据管理.Save试卷(ID_试卷, textBox1.Text, ID_用户, textBox3.Text, textBox4.Text, textBox6.Text, textBox8.Text, textBox10.Text);
            if (dt.Rows.Count > 0)
            {
                ID_试卷 = Convert.ToInt32(dt.Rows[0]["ID"].ToString());
                MessageBox.Show("报存成功");
            }
            else
                MessageBox.Show("报存失败");
        }
        private void btn生成试卷_Click(object sender, EventArgs e)
        {
            if (dt_试卷信息 == null || dt_试卷信息.Rows.Count <= 0)
                MessageBox.Show("试卷未保存,不能生成");
            else
            {
                dt_试题 = BL_数据管理.Get_试卷试题详细信息(ID_试卷);
                if (dt_试题.Rows.Count > 0)
                {
                    ASD();
                }
                else
                {
                    MessageBox.Show("您并未分配任何试题");
                }}}
        DataTable dt_试题;
        private void ASD()
        {
                       FolderBrowserDialog folderBrowserDialog1 = new FolderBrowserDialog();
            if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
            {
                Object Nothing = System.Reflection.Missing.Value;
                DateTime time = DateTime.Now;
                object filename = folderBrowserDialog1.SelectedPath + "//试卷_" + time.Year + "_" + time.Month + "_" + time.Day + " " + time.Hour + "_" + time.Minute + "_" + time.Second + ".doc";                (责任编辑:qin)