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

OA系统

开发平台:

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. namespace OThinker.H3.Portal
  12. {
  13.     public partial class WorkItemDetail : OThinker.H3.Portal.PortalPage
  14.     {
  15.         private OThinker.H3.WorkItem.WorkItem _WorkItem;
  16.         protected OThinker.H3.WorkItem.WorkItem WorkItem
  17.         {
  18.             get
  19.             {
  20.                 if (this._WorkItem == null)
  21.                 {
  22.                     string itemId = this.Request.QueryString[Param_WorkItemID];
  23.                     this._WorkItem = OThinker.H3.Server.Engine.WorkItemManager.GetWorkItem(itemId);
  24.                 }
  25.                 return this._WorkItem;
  26.             }
  27.         }
  28.         protected void Page_Load(object sender, EventArgs e)
  29.         {
  30.             if (!this.IsPostBack)
  31.             {
  32.                 if (this.WorkItem == null)
  33.                 {
  34.                     this.NotifyMessage("该工作项不存在或者已经取消");
  35.                 }
  36.                 // 获得工作项对应的URL
  37.                 string url;
  38.                 if (this.WorkItem.State == OThinker.H3.WorkItem.WorkItemState.Finished)
  39.                 {
  40.                     url = GetViewSheetUrl(this.WorkItem);
  41.                 }
  42.                 else
  43.                 {
  44.                     url = GetWorkSheetUrl(this.WorkItem);
  45.                 }
  46.                 this.Response.Redirect(url);
  47.             }
  48.         }
  49.     }
  50. }