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

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 QueryWorkItem.
  15. /// </summary>
  16.     public partial class QueryWorkItem : PortalPage
  17. {
  18. #region 参数
  19. private System.DateTime Query_From = System.DateTime.MinValue;
  20. private System.DateTime Query_To = System.DateTime.MaxValue;
  21.         private OThinker.H3.WorkItem.WorkItemState State;
  22.         private OThinker.Data.BoolMatchValue Elapsed = OThinker.Data.BoolMatchValue.Unspecified;
  23.         private OThinker.Data.BoolMatchValue Approval = OThinker.Data.BoolMatchValue.Unspecified;
  24.         private void ParseParams()
  25.         {
  26.             string strFrom = this.Request.QueryString[Param_From];
  27.             this.Query_From = System.DateTime.MinValue;
  28.             if (strFrom != null)
  29.             {
  30.                 this.Query_From = System.DateTime.Parse(strFrom);
  31.             }
  32.             string strTo = this.Request.QueryString[Param_To];
  33.             this.Query_To = System.DateTime.MaxValue;
  34.             if (strTo != null)
  35.             {
  36.                 this.Query_To = System.DateTime.Parse(strTo);
  37.             }
  38.             string strState = this.Request.QueryString[Param_State];
  39.             if (strState == null || strState == "")
  40.             {
  41.                 this.State = OThinker.H3.WorkItem.WorkItemState.Unspecified;
  42.             }
  43.             else
  44.             {
  45.                 this.State = OThinker.H3.WorkItem.WorkItemStateConvertor.ToState(strState);
  46.             }
  47.             string strElapsed = this.Request.QueryString[Param_Elapsed];
  48.             if (strElapsed == null || strElapsed == "")
  49.             {
  50.                 this.Elapsed = OThinker.Data.BoolMatchValue.Unspecified;
  51.             }
  52.             else
  53.             {
  54.                 this.Elapsed = (OThinker.Data.BoolMatchValue)Enum.Parse(typeof(OThinker.Data.BoolMatchValue), strElapsed);
  55.             }
  56.             string strApproval = this.Request.QueryString[Param_Approval];
  57.             if (strApproval == null || strApproval == "")
  58.             {
  59.                 this.Approval = OThinker.Data.BoolMatchValue.Unspecified;
  60.             }
  61.             else
  62.             {
  63.                 this.Approval = (OThinker.Data.BoolMatchValue)Enum.Parse(typeof(OThinker.Data.BoolMatchValue), strApproval);
  64.             }
  65.         }
  66. #endregion
  67. protected void Page_Load(object sender, System.EventArgs e)
  68. {
  69. if(!this.IsPostBack)
  70. {
  71.                 // 验证是否具有管理员权限
  72.                 if (!this.UserValidator.ValidateViewReport())
  73.                 {
  74.                     this.NotifyMessage(LackOfAuth);
  75.                 }
  76. }
  77.             // 解析参数
  78.             this.ParseParams();
  79.             DataTable table = Query.QueryWorkItem(
  80.                     null,
  81.                     null,
  82.                     OThinker.H3.WorkflowTemplate.WorkflowTemplate.NullWorkflowVersion,
  83.                     null,
  84.                     null,
  85.                     null,
  86.                     this.Query_From,
  87.                     this.Query_To,
  88.                     this.State,
  89.                     OThinker.H3.Instance.PriorityType.Unspecified, 
  90.                     null, 
  91.                     null, 
  92.                     this.Approval, 
  93.                     this.Elapsed);
  94. this.WorkItemGrid.BindDataGrid(table);
  95. }
  96. #region Web Form Designer generated code
  97. override protected void OnInit(EventArgs e)
  98. {
  99. //
  100. // CODEGEN: This call is required by the ASP.NET Web Form Designer.
  101. //
  102. InitializeComponent();
  103. base.OnInit(e);
  104. }
  105. /// <summary>
  106. /// Required method for Designer support - do not modify
  107. /// the contents of this method with the code editor.
  108. /// </summary>
  109. private void InitializeComponent()
  110. {    
  111. }
  112. #endregion
  113. }
  114. }