top.aspx_old.cs
上传用户:xrffrp
上传日期:2022-03-25
资源大小:22155k
文件大小:1k
源码类别:

OA系统

开发平台:

ASP/ASPX

  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. public partial class web_top : System.Web.UI.Page
  12. {
  13.     protected void Page_Load(object sender, EventArgs e)
  14.     {
  15.         
  16.         if (!IsPostBack)
  17.         {
  18.             if (Application["TITLE"] != null)
  19.             {
  20.                 LblTitle.Text = Application["TITLE"].ToString();
  21.                 BtnReLogin.Text = "登出";
  22.                 BtnReLogin.OnClientClick = "return confirm('確定要登出嗎?')";
  23.                 HlWhere.Text = "大家在哪裡";
  24.                 if(Session["user"]!=null)
  25.                 {
  26.                     User user = (User)Session["user"];
  27.                     LblInfo.Text = "當前用戶: "+user.Emp_no+" "+user.Emp_name+user.Position;
  28.                 }
  29.             }
  30.         }
  31.     }
  32.     protected void BtnReLogin_Click(object sender, EventArgs e)
  33.     {
  34.         Session.RemoveAll();
  35.         Response.Write("<script language='javascript'>window.parent.location.href='login.aspx'</script>");
  36.     }
  37. }