ExaminationUI/student/Paper.aspx.cs

(完整代码) 1KB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ExaminationModels;
using ExaminationBLL;
using System.Data;

public partial class student_Paper : System.Web.UI.Page
{
    public static DataTable Dtb = new DataTable();
    /// <summary>
    /// 根据试卷ID获得图片
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string sjid = Request["SjID"];  //获得传过来的试卷ID
            if (sjid != null)
            {
                int Sjid = int.Parse(sjid);
                DataTable dtable = TbImagesManager.GetImagesBySjid(Sjid);
                if (dtable != null)
                {
                    Dtb = dtable;
                    for (int i = 0; i < dtable.Rows.Count; i++)
                    {
                        string str = "../admin/TestPaper/images/";

                        Image img = new Image();
                        img.ImageUrl = str+dtable.Rows[i]["Tpian"];
                        PanImg.Controls.Add(img);
                    }
                }
            }

        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读 AI

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。