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

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 QueryCaseByID.
  15. /// </summary>
  16.     public partial class QueryInstanceByID : PortalPage
  17. {
  18. protected void Page_Load(object sender, System.EventArgs e)
  19. {
  20.             if (!this.IsPostBack)
  21.             {
  22.                 // 验证是否具有管理员权限
  23.                 if (!this.UserValidator.ValidateViewReport())
  24.                 {
  25.                     this.NotifyMessage(LackOfAuth);
  26.                 }
  27.             }
  28. }
  29. #region Web Form Designer generated code
  30. override protected void OnInit(EventArgs e)
  31. {
  32. //
  33. // CODEGEN: This call is required by the ASP.NET Web Form Designer.
  34. //
  35. InitializeComponent();
  36. base.OnInit(e);
  37. }
  38. /// <summary>
  39. /// Required method for Designer support - do not modify
  40. /// the contents of this method with the code editor.
  41. /// </summary>
  42. private void InitializeComponent()
  43. {    
  44. this.btnQuery.Click += new System.Web.UI.ImageClickEventHandler(this.btnQuery_Click);
  45. }
  46. #endregion
  47. protected void lnkQuery_Click(object sender, System.EventArgs e)
  48. {
  49. this.Query();
  50. }
  51. private void btnQuery_Click(object sender, System.Web.UI.ImageClickEventArgs e)
  52. {
  53. this.Query();
  54. }
  55. private void Query()
  56. {
  57.             string instanceId = this.txtInstanceID.Text;
  58. // 查找该流程
  59.             System.Data.DataTable table = Portal.Query.QueryInstance(
  60.                 new string[] { instanceId }, 
  61. null, 
  62. null, 
  63. H3.Instance.InstanceContext.UnspecifiedID, 
  64. Instance.InstanceState.Unspecified, 
  65. null, 
  66. null, 
  67. WorkflowTemplate.WorkflowTemplate.NullWorkflowVersion, 
  68. System.DateTime.MinValue, 
  69. System.DateTime.MaxValue, 
  70.                 null,
  71.                 OThinker.H3.Instance.PriorityType.Unspecified, 
  72.                 OThinker.Data.BoolMatchValue.Unspecified, 
  73.                 OThinker.Data.BoolMatchValue.Unspecified);
  74. // 绑定
  75. this.InstanceGridView.BindDataGrid(table);
  76. }
  77. }
  78. }