QueryWorkItem.aspx.cs
资源名称:H3_OA.rar [点击查看]
上传用户:li2971742
上传日期:2021-11-18
资源大小:39096k
文件大小:4k
源码类别:
OA系统
开发平台:
C#
- using System;
- using System.Collections;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Web;
- using System.Web.SessionState;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.HtmlControls;
- namespace OThinker.H3.Portal
- {
- /// <summary>
- /// Summary description for QueryWorkItem.
- /// </summary>
- public partial class QueryWorkItem : PortalPage
- {
- #region 参数
- private System.DateTime Query_From = System.DateTime.MinValue;
- private System.DateTime Query_To = System.DateTime.MaxValue;
- private OThinker.H3.WorkItem.WorkItemState State;
- private OThinker.Data.BoolMatchValue Elapsed = OThinker.Data.BoolMatchValue.Unspecified;
- private OThinker.Data.BoolMatchValue Approval = OThinker.Data.BoolMatchValue.Unspecified;
- private void ParseParams()
- {
- string strFrom = this.Request.QueryString[Param_From];
- this.Query_From = System.DateTime.MinValue;
- if (strFrom != null)
- {
- this.Query_From = System.DateTime.Parse(strFrom);
- }
- string strTo = this.Request.QueryString[Param_To];
- this.Query_To = System.DateTime.MaxValue;
- if (strTo != null)
- {
- this.Query_To = System.DateTime.Parse(strTo);
- }
- string strState = this.Request.QueryString[Param_State];
- if (strState == null || strState == "")
- {
- this.State = OThinker.H3.WorkItem.WorkItemState.Unspecified;
- }
- else
- {
- this.State = OThinker.H3.WorkItem.WorkItemStateConvertor.ToState(strState);
- }
- string strElapsed = this.Request.QueryString[Param_Elapsed];
- if (strElapsed == null || strElapsed == "")
- {
- this.Elapsed = OThinker.Data.BoolMatchValue.Unspecified;
- }
- else
- {
- this.Elapsed = (OThinker.Data.BoolMatchValue)Enum.Parse(typeof(OThinker.Data.BoolMatchValue), strElapsed);
- }
- string strApproval = this.Request.QueryString[Param_Approval];
- if (strApproval == null || strApproval == "")
- {
- this.Approval = OThinker.Data.BoolMatchValue.Unspecified;
- }
- else
- {
- this.Approval = (OThinker.Data.BoolMatchValue)Enum.Parse(typeof(OThinker.Data.BoolMatchValue), strApproval);
- }
- }
- #endregion
- protected void Page_Load(object sender, System.EventArgs e)
- {
- if(!this.IsPostBack)
- {
- // 验证是否具有管理员权限
- if (!this.UserValidator.ValidateViewReport())
- {
- this.NotifyMessage(LackOfAuth);
- }
- }
- // 解析参数
- this.ParseParams();
- DataTable table = Query.QueryWorkItem(
- null,
- null,
- OThinker.H3.WorkflowTemplate.WorkflowTemplate.NullWorkflowVersion,
- null,
- null,
- null,
- this.Query_From,
- this.Query_To,
- this.State,
- OThinker.H3.Instance.PriorityType.Unspecified,
- null,
- null,
- this.Approval,
- this.Elapsed);
- this.WorkItemGrid.BindDataGrid(table);
- }
- #region Web Form Designer generated code
- override protected void OnInit(EventArgs e)
- {
- //
- // CODEGEN: This call is required by the ASP.NET Web Form Designer.
- //
- InitializeComponent();
- base.OnInit(e);
- }
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- }
- #endregion
- }
- }