protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["type"] == null || Session["type"].ToString() != "16")
        {
            Response.Redirect("../error_login.aspx");
        }
        sysTableAdapter st      = new sysTableAdapter();
        DataTable       dt      = st.GetSwitch();
        string          kaiguan = dt.Rows[0]["学生选课开关"].ToString();

        if (kaiguan == "1")
        {
            Response.Redirect("../error_switch_student.aspx");
        }
    }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["type"] == null || Session["type"].ToString() != "0")
        {
            Response.Redirect("../error_login.aspx");
        }
        if (!IsPostBack)
        {
            gvCourse.Visible    = false;
            gvCourse.DataSource = objCourseInfo;
            gvCourse.DataBind();
            this.ddlTCID.Items.Insert(0, "--请选择--");
        }
        sysTableAdapter st      = new sysTableAdapter();
        DataTable       dt      = st.GetSwitch();
        string          kaiguan = dt.Rows[0]["教师打分开关"].ToString();

        if (kaiguan == "1")
        {
            Response.Redirect("../error_switch_teacher.aspx");
        }
    }