Directory.aspx.cs
上传用户:li2971742
上传日期:2021-11-18
资源大小:39096k
文件大小:3k
源码类别:

OA系统

开发平台:

C#

  1. using System;
  2. using System.Collections;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Web;
  7. using System.Web.SessionState;
  8. using System.Web.UI;
  9. using System.Web.UI.WebControls;
  10. using System.Web.UI.HtmlControls;
  11. namespace OThinker.H3.Portal
  12. {
  13. /// <summary>
  14. /// Summary description for Directory.
  15. /// </summary>
  16. public partial class Directory : PortalPage
  17. {
  18. protected void Page_Load(object sender, System.EventArgs e)
  19. {
  20.             if (!this.IsPostBack)
  21.             {
  22.                 this.lblHello.Text = this.UserValidator.UserName;
  23.                 this.lnkProfile.NavigateUrl = PageName_EditUser + "?" + Param_ID + "=" + this.UserValidator.UserID + "&" + Param_Mode + "=" + EditUserType.Profile;
  24.                 this.lnkProfile.Target = "main";
  25.                 this.lnkSetPassword.NavigateUrl = PageName_SetPassword + "?" + Param_ID + "=" + this.UserValidator.UserID;
  26.                 this.lnkSetPassword.Target = "main";
  27.                 this.PanelAdmin.Visible = false;
  28.                 this.PanelOffice.Visible = false;
  29.                 this.PanelSearch.Visible = false;
  30.                 this.PanelStat.Visible = false;
  31.                 this.PanelWorkflow.Visible = false;
  32.                 string curDir = this.Request.QueryString["dir"];
  33.                 if (curDir == null)
  34.                 {
  35.                     this.PanelOffice.Visible = true;
  36.                 }
  37.                 else if (curDir == "admin")
  38.                 {
  39.                     this.PanelAdmin.Visible = true;
  40.                 }
  41.                 else if (curDir == "office")
  42.                 {
  43.                     this.PanelOffice.Visible = true;
  44.                     // 获得未读的消息的数量
  45.                     int unreadCount = OThinker.H3.Server.Engine.Notifier.CountUnread(this.UserValidator.UserID);
  46.                     if (unreadCount == 0)
  47.                     {
  48.                         this.linkMyNotification.Text = "我的消息";
  49.                     }
  50.                     else
  51.                     {
  52.                         this.linkMyNotification.Text = "我的消息(" + unreadCount + ")";
  53.                     }
  54.                 }
  55.                 else if (curDir == "search")
  56.                 {
  57.                     this.PanelSearch.Visible = true;
  58.                 }
  59.                 else if (curDir == "stat")
  60.                 {
  61.                     this.PanelStat.Visible = true;
  62.                 }
  63.                 else if (curDir == "workflow")
  64.                 {
  65.                     this.PanelWorkflow.Visible = true;
  66.                 }
  67.                 this.lnkQueryByData.NavigateUrl = PageName_QueryInstanceByData + "?" + Param_UserID + "=" + this.UserValidator.UserID;
  68.                 this.lnkQueryByData.Target = "main";
  69.             }
  70. }
  71. #region Web Form Designer generated code
  72. override protected void OnInit(EventArgs e)
  73. {
  74. //
  75. // CODEGEN: This call is required by the ASP.NET Web Form Designer.
  76. //
  77. InitializeComponent();
  78. base.OnInit(e);
  79. }
  80. /// <summary>
  81. /// Required method for Designer support - do not modify
  82. /// the contents of this method with the code editor.
  83. /// </summary>
  84. private void InitializeComponent()
  85. {    
  86. }
  87. #endregion
  88. }
  89. }