studentinfopage.aspx.cs

来自「学生综合评估管理系统多角色登陆控制」· CS 代码 · 共 67 行

CS
67
字号
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_StudentInfo : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session.Contents["User"] != null)
        {
            this.lbDisplayWelcomInfo.Text = Session.Contents["User"] + "同学:欢迎你的到来!";
            //this.lbDisplayTime.Text = System.DateTime.Now.ToString();
        }
       /* else
        {
            Response.Redirect("~/index.aspx");
        }
       */
    }
    protected void MenuStudent_MenuItemClick(object sender, MenuEventArgs e)
    {
        if (MenuStudent.SelectedItem.Value == "PersonInfo")
        {
            this.panelPersonInfo.Visible = true;
            this.panelEvaInfo.Visible = false;
            this.panelEncouragementInfo.Visible = false;
            this.panelFirstPage.Visible = false;
        }
        if (MenuStudent.SelectedItem.Value == "EvaInfo")
        {
            panelPersonInfo.Visible = false;
            panelEvaInfo.Visible = true;
            panelEncouragementInfo.Visible = false;
            panelFirstPage.Visible = false;
        }
        if (MenuStudent.SelectedItem.Value == "EncouragementInfo")
        {
            panelPersonInfo.Visible = false;
            panelEvaInfo.Visible = false;
            panelEncouragementInfo.Visible = true;
            panelFirstPage.Visible = false;
        }
        if (MenuStudent.SelectedItem.Value == "FirstPage")
        {
            panelPersonInfo.Visible = false;
            panelEvaInfo.Visible = false;
            panelEncouragementInfo.Visible = false;
            panelFirstPage.Visible = true;
        }
        if (MenuStudent.SelectedItem.Value == "Leave")
        {
            //注销用户代码
            Response.Write("<Script language=JavaScript>confirm('你确定要退出吗?')</Script>");
            Response.Redirect("~/index.aspx");
            //Session.Add("User", null);

        }
    }
}

⌨️ 快捷键说明

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