MyDeptInstance.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. /// 查看本部门未完成的流程实例
  15. /// </summary>
  16.     public partial class MyDeptInstance : PortalPage
  17. {
  18. protected void Page_Load(object sender, System.EventArgs e)
  19. {
  20. if(!this.IsPostBack)
  21. {
  22. // 获得登陆用户所在的组织
  23. string[] groups = this.UserValidator.MemberOfs;
  24. foreach(string group in groups)
  25. {
  26. this.Query(group);
  27. }
  28. }
  29. }
  30. // 查找该部门没有完成的流程
  31. private void Query(string Department)
  32. {
  33. string[] colleages = OThinker.H3.Server.Engine.Organization.GetChildren(Department, OThinker.Organization.UnitType.User, false);
  34. Label deptLabel = new Label();
  35. deptLabel.Text = "部门/组:" + OThinker.H3.Server.Engine.Organization.GetFullName(Department) + "<HR>";
  36. this.InstancePanel.Controls.Add(deptLabel);
  37.             InstanceGridView grid = new InstanceGridView();
  38.             System.Data.DataTable table = Portal.Query.QueryInstance(
  39. null, 
  40. colleages, 
  41. null, 
  42. OThinker.H3.Instance.InstanceContext.UnspecifiedID, 
  43. OThinker.H3.Instance.InstanceState.Unfinished, 
  44. null, 
  45. null,
  46.                 OThinker.H3.WorkflowTemplate.WorkflowTemplate.NullWorkflowVersion, 
  47. System.DateTime.MinValue, 
  48. System.DateTime.MaxValue,
  49.                 null,
  50.                 OThinker.H3.Instance.PriorityType.Unspecified, 
  51.                 OThinker.Data.BoolMatchValue.Unspecified,
  52.                 OThinker.Data.BoolMatchValue.Unspecified);
  53.             grid.AllowPaging = false;
  54. grid.BindDataGrid(table);
  55. this.InstancePanel.Controls.Add(grid);
  56. Label spaceLabel = new Label();
  57. spaceLabel.Text = "<BR>";
  58. this.InstancePanel.Controls.Add(spaceLabel);
  59. }
  60. #region Web Form Designer generated code
  61. override protected void OnInit(EventArgs e)
  62. {
  63. //
  64. // CODEGEN: This call is required by the ASP.NET Web Form Designer.
  65. //
  66. InitializeComponent();
  67. base.OnInit(e);
  68. }
  69. /// <summary>
  70. /// Required method for Designer support - do not modify
  71. /// the contents of this method with the code editor.
  72. /// </summary>
  73. private void InitializeComponent()
  74. {    
  75. }
  76. #endregion
  77. }
  78. }