Top.aspx.cs
上传用户:tiancihang
上传日期:2014-03-12
资源大小:21387k
文件大小:1k
源码类别:

.net编程

开发平台:

C#

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11. using com.etong.Inform;
  12. public partial class Top : System.Web.UI.Page
  13. {
  14.     protected void Page_Load(object sender, EventArgs e)
  15.     {
  16.         CheckUserInfo checkuserinfo=(CheckUserInfo)Session["checkuserinfo"];
  17.         //if (checkuserinfo.EmpName =="崔罗罗")
  18.         if (checkuserinfo == null)
  19.         {
  20.             ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('系统提示:您尚未登录或您登录已超时,请重新登录!');top.location.href='login.aspx'</script>");
  21.             return;
  22.         }
  23.         if (checkuserinfo.EmpName == null || checkuserinfo.EmpName == "admin")
  24.             Header1_lblName.InnerText = "admin";
  25.         else
  26.             Header1_lblName.InnerText = checkuserinfo.EmpName + " / " + checkuserinfo.OrgName;
  27.         HL_Out.Attributes.Add("onclick", "return window.confirm('确定要注销吗?');");
  28.     }
  29. }