UrgeInstance.aspx.cs
资源名称:H3_OA.rar [点击查看]
上传用户:li2971742
上传日期:2021-11-18
资源大小:39096k
文件大小:3k
源码类别:
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 UrgeInstance.
- /// </summary>
- public partial class UrgeInstance : PortalPage
- {
- protected void Page_Load(object sender, System.EventArgs e)
- {
- }
- #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
- private void AddChildren(string InstanceId, System.Collections.Generic.List<string> Instances)
- {
- if (InstanceId != null && InstanceId != "" && InstanceId != Instance.InstanceContext.UnspecifiedID)
- {
- 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);
- if (children != null && children.Length != 0)
- {
- foreach (string child in children)
- {
- if (child != null && child != "" && child != Instance.InstanceContext.UnspecifiedID)
- {
- Instances.Add(child);
- this.AddChildren(child, Instances);
- }
- }
- }
- }
- }
- protected void btnUrge_Click(object sender, System.EventArgs e)
- {
- string instanceId = this.Request.QueryString[Param_InstanceId];
- System.Collections.Generic.List<string> instances = new System.Collections.Generic.List<string>();
- instances.Add(instanceId);
- this.AddChildren(instanceId, instances);
- // 催办
- foreach (string instance in instances)
- {
- OThinker.H3.Server.Engine.WorkItemManager.Urge(instance, this.UserValidator.UserFullName + ": " + this.txtUrgency.Text);
- }
- // Notify Finished
- this.NotifyMessage("催办成功");
- }
- }
- }