Admin/Rubric_Edit.aspx.cs

(开头部分) 3KB

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

using System;
using System.Data;
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 System.Data.SqlClient;

public partial class Admin_Rubric_Edit : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //SqlConnection strcon = new SqlConnection("data source=(local);database=Experiment;user id=sa;pwd=;");
           // strcon.Open();
            SqlConnection conn = CMMgr.GetConnection();
            SqlDataAdapter sda = new SqlDataAdapter("select * from Exam_Ken order by KenID desc", conn);
            DataSet ds = new DataSet();
            sda.Fill(ds, "Exam_Ken");
            this.KenID.DataSource = ds;
            this.KenID.DataValueField = "KenID";
            this.KenID.DataTextField = "KenName";
            this.KenID.DataBind();
            
            //SqlConnection strcon2 = new SqlConnection("data source=(local);database=Experiment;user id=sa;pwd=;");
            //strcon2.Open();
            SqlConnection conn1 = CMMgr.GetConnection();

            SqlDataAdapter sda2 = new SqlDataAdapter("select * from Exam_Chapter", conn1);
            DataSet ds2 = new DataSet();
            sda2.Fill(ds2, "Exam_Chapter");
            this.ChapterID.DataSource = ds2;
            this.ChapterID.DataValueField = "ChapterID";
            this.ChapterID.DataTextField = "ChapterName";
            this.ChapterID.DataBind();
            this.initForm();
        }
    }
    #region 窗体内部函数

    /// <summary>
    /// 初始化页面信息
    /// </summary>
    private void initForm()
    {
        this.hidInfoID.Value = this.Request.QueryString["RubricID"] + "";
        if (this.hidInfoID.Value != "")
        {
            RubricMgr mgr = new RubricMgr();
            Rubric Rubric = mgr.GetRubric(this.hidInfoID.Value);
            if (Rubric != null)
            {
                this.KenID.Text = Rubric.C_Ken.KenName;
                this.ChapterID.Text = Rubric.C_Chapter.ChapterName;
                this.RubricClassName.Text = Rubric.RubricClassName;
后面还有 40 行代码,购买后查看完整代码

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

AI 解读 AI

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

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