123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- public partial class MyMenu : System.Web.UI.Page
- {
- LYS.UserData1 myud = new LYS.UserData1();
- string username = "";
- string usertype = "";
- string userdemp = "";
- string WorkNumber = "";
- protected void Page_Load(object sender, EventArgs e)
- {
- //类别:院管理员、系管理员、督导员、教师
- if (Session["UserName"] != null)
- {
- username = Session["UserName"].ToString();
- usertype = Session["UserType"].ToString();
- userdemp = Session["UserDemp"].ToString();
- WorkNumber = Session["WorkNumber"].ToString();
- }
- else if (myud.ReadCookies("UserName").Trim().Length > 0)
- {
- username = myud.ReadCookies("UserName").Trim();
- usertype = myud.ReadCookies("UserType").Trim();
- userdemp = myud.ReadCookies("UserDemp").Trim();
- WorkNumber = myud.ReadCookies("WorkNumber").Trim();
- }
- else
- {
- Response.Redirect("LoginNew.aspx");
- }
- Literal2.Text = "欢迎您:" + username + "(工号:" + WorkNumber + ")";
- Literal3.Text = usertype + "." + userdemp;
- Literal1.Text = myud.Prod_menu(usertype).ToString();
- }
- }
|