zyxt/Student/UpZhuoye.aspx.cs

(开头部分) 4KB

这里只显示每个文件的开头 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;

public partial class Student_UpZhuoye : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.Page.IsPostBack)
        {
            //判断是否登录
            if (Request.Cookies["Login"] == null || Request.Cookies["Login"].Value.ToString() != "Student")
            {
                Response.Write(MessageBox.ShowMessage("请选登录!", "../Login.aspx"));
            }
            DataBindDro();
        }
    }

    //.....................................................//

    private void DataBindDro()
    {
        //绑定课程信息
        StudentClass Stc = new StudentClass();
        DataSet ds = Stc.GetKecheng();
        DropDownList1.DataSource = ds.Tables["mytb"].DefaultView;
        DropDownList1.DataTextField = "Kc_Title";
        DropDownList1.DataValueField = "Kc_ID";
        DropDownList1.DataBind();

        //.............................................................//

        //绑定相应课程的作业

        int nID = Convert.ToInt32(DropDownList1.SelectedItem.Value.ToString());
        DataSet ds2 = Stc.GetZuoyeID(nID);
        DropDownList2.DataSource = ds2.Tables["mytb"].DefaultView;
        DropDownList2.DataTextField = "Zy_Title";
        DropDownList2.DataValueField = "Zy_ID";
        DropDownList2.DataBind();
    }

    protected void btnOk_Click(object sender, EventArgs e)
    {

    }
    protected void btnGet_Click(object sender, EventArgs e)
    {

    }
    protected void btnSub_Click(object sender, EventArgs e)
    {
后面还有 76 行代码,购买后查看完整代码

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

AI 解读 AI

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

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