UserError.aspx.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using SimpleExam.App_Code;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace SimpleExam
{
    public partial class UserError : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["username"] == null)
                {
                    Response.Redirect("UserLogin.aspx");
                }
                string sql;
                sql = "select * from cuotijilu where username='" + Session["username"].ToString().Trim() + "' order by id desc";
                getdata(sql);
                //new Class1().hsgcaozuojilu(Session["username"].ToString().Trim(), "查询管理员", "allusers");

            }
        }

        private void getdata(string sql)
        {
            DataSet result = new DataSet();
            result = new Class1().hsggetdata(sql);
            if (result != null)
            {
                if (result.Tables[0].Rows.Count > 0)
                {
                    Repeater1.DataSource = result.Tables[0];
                    Repeater1.DataBind();
                }
                else
                {
                    Repeater1.DataSource = null;
                    Repeater1.DataBind();
                }
            }
        }

        public string getContent(string id, string lx) 
        {
            if (lx == "判断题")
            {
                return new Class1().hsggetdata("select timu from panduanti where ID = " + id).Tables[0].Rows[0]["timu"].ToString();
            }
            else if (lx == "选择题")
            {
                return new Class1().hsggetdata("select timu from xuanzeti where ID = " + id).Tables[0].Rows[0]["timu"].ToString();
            }
            else 
            {
后面还有 16 行代码,购买后查看完整代码

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

AI 解读 AI

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

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