main.aspx.cs.svn-base

来自「大学英语学习系统」· SVN-BASE 代码 · 共 73 行

SVN-BASE
73
字号
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 SystemManage_Main : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["USERSTYLE"] == "STUDENT")
        {
            String StrUserName = Session["USERNAME"].ToString();
            LabTname.Text = StrUserName + ",你好!";
        }
        else
        {
            Dialog("对不起,你没有权限访问这个页面!");
            Response.Redirect("~/SystemManage/Login.aspx");
        }
    }
    private void Dialog(String Str)
    {
        Response.Write(@"<script type='text/JavaScript'>");
        Response.Write(@"alert('" + Str + "');");
        //Response.Write(@"window.location='./list_logingroup.aspx';");
        Response.Write(@"</script>");
    }
    protected void LnkbtnLogin_Click(object sender, EventArgs e)
    {
        Response.Write(@"<script type='text/JavaScript'>");
        Response.Write(@"window.location='./Login.aspx';");
        Response.Write(@"</script>");
    }
    protected void LnkbtnReg_Click(object sender, EventArgs e)
    {
        Response.Write(@"<script type='text/JavaScript'>");
        Response.Write(@"window.location='./Register.aspx';");
        Response.Write(@"</script>");
    }
    protected void LnkbtnExit_Click(object sender, EventArgs e)
    {
        Response.Write("<script language:javascript>javascript:window.close();</script>"); 
    }
    protected void LnkbtnStudentInfo_Click(object sender, EventArgs e)
    {
        Response.Write(@"<script type='text/JavaScript'>");
        Response.Write(@"window.location='./StudentInfo.aspx';");
        Response.Write(@"</script>");
    }
    protected void LnkGeneralEx_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/Student/GeneralEx/GeneralEx.aspx");
    }
    protected void LnkExercise_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/Student/UnitEx/MonExercise.aspx");
    }
    protected void LnkColTest_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/Student/ColTest/ColTest.aspx");
    }
    protected void LnkQueryGrade_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/Student/Check_Grade/CheckGrade.aspx");
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?