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

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 UrgeInstance.
  15. /// </summary>
  16.     public partial class UrgeInstance : PortalPage
  17. {
  18. protected void Page_Load(object sender, System.EventArgs e)
  19. {
  20. }
  21. #region Web Form Designer generated code
  22. override protected void OnInit(EventArgs e)
  23. {
  24. //
  25. // CODEGEN: This call is required by the ASP.NET Web Form Designer.
  26. //
  27. InitializeComponent();
  28. base.OnInit(e);
  29. }
  30. /// <summary>
  31. /// Required method for Designer support - do not modify
  32. /// the contents of this method with the code editor.
  33. /// </summary>
  34. private void InitializeComponent()
  35. {    
  36. }
  37. #endregion
  38.         private void AddChildren(string InstanceId, System.Collections.Generic.List<string> Instances)
  39.         {
  40.             if (InstanceId != null && InstanceId != "" && InstanceId != Instance.InstanceContext.UnspecifiedID)
  41.             {
  42.                 string[] children = OThinker.H3.Server.Engine.InstanceManager.Query(null, null, InstanceId, OThinker.H3.Instance.InstanceState.Unfinished, null, null, WorkflowTemplate.WorkflowTemplate.NullWorkflowVersion, System.DateTime.MinValue, System.DateTime.MaxValue, null);
  43.                 if (children != null && children.Length != 0)
  44.                 {
  45.                     foreach (string child in children)
  46.                     {
  47.                         if (child != null && child != "" && child != Instance.InstanceContext.UnspecifiedID)
  48.                         {
  49.                             Instances.Add(child);
  50.                             this.AddChildren(child, Instances);
  51.                         }
  52.                     }
  53.                 }
  54.             }
  55.         }
  56. protected void btnUrge_Click(object sender, System.EventArgs e)
  57. {
  58. string instanceId = this.Request.QueryString[Param_InstanceId];
  59.             System.Collections.Generic.List<string> instances = new System.Collections.Generic.List<string>();
  60.             instances.Add(instanceId);
  61.             this.AddChildren(instanceId, instances);
  62.             // 催办
  63.             foreach (string instance in instances)
  64.             {
  65.                 OThinker.H3.Server.Engine.WorkItemManager.Urge(instance, this.UserValidator.UserFullName + ": " + this.txtUrgency.Text);
  66.             }
  67. // Notify Finished
  68. this.NotifyMessage("催办成功");
  69. }
  70. }
  71. }