⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_paperdetail.aspx.cs

📁 在线考试系统完整版源码(C#&Access) 该考试系统为一同学毕业设计
💻 CS
字号:
using System;
using System.Data;
using System.Data.OleDb;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using ExamBLL.Auto_Generated_Code;
using ExamDAL.Auto_Generated_Code;
using ExamModel.Auto_Generated_Code;

public partial class Admin_PapwerDetail : System.Web.UI.Page
{
    Paper paper = new Paper();
    int paperId;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            try
            {
                paperId = Convert.ToInt32(Request.QueryString["PaperId"]);
            }
            catch
            {
                paperId = -1;
 
            }
            paper = PaperManager.GetPaperById(paperId);
            Label1.Text = paper.PaperName.ToString();  
            InitData();
        }
      
    }

    public void InitData()
    {

        DataSet ds1 = PaperDetailManager.GetAllPaperDetailByPaperId(paper.PaperId, "单选题");
        GridView1.DataSource = ds1;
        GridView1.DataBind();
      ((Label)GridView1.HeaderRow.FindControl("Label5")).Text = ((Label)GridView1.Rows[0].FindControl("Label31")).Text;
       



        DataSet ds2 = PaperDetailManager.GetAllPaperDetailByPaperId(paper.PaperId, "多选题");
        GridView2.DataSource = ds2;
        GridView2.DataBind();
       ((Label)GridView2.HeaderRow.FindControl("Label10")).Text = ((Label)GridView2.Rows[0].FindControl("Label32")).Text;
      

        DataSet ds3 = PaperDetailManager.GetAllPaperDetailByPaperId(paper.PaperId, "判断题");
        GridView3.DataSource = ds3;
        GridView3.DataBind();
        ((Label)GridView3.HeaderRow.FindControl("Label11")).Text = ((Label)GridView3.Rows[0].FindControl("Label33")).Text;
       

        DataSet ds4 = PaperDetailManager.GetAllPaperDetailByPaperId(paper.PaperId, "填空题");
        GridView4.DataSource = ds4;
        GridView4.DataBind();
      ((Label)GridView4.HeaderRow.FindControl("Label12")).Text = ((Label)GridView4.Rows[0].FindControl("Label34")).Text;
       

        DataSet ds5 = PaperDetailManager.GetAllPaperDetailByPaperId(paper.PaperId, "简答题");
        GridView5.DataSource = ds5;
        GridView5.DataBind();
       ((Label)GridView5.HeaderRow.FindControl("Label13")).Text = ((Label)GridView5.Rows[0].FindControl("Label35")).Text;
        
          
    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -