EnabledActivity.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>
- public partial class EnabledActivity : PortalPage
- {
- protected void Page_Load(object sender, System.EventArgs e)
- {
- if(!this.IsPostBack)
- {
- // 获得ID
- string instanceId = this.Request.QueryString[Param_InstanceId];
- System.Data.DataTable receiverTable = new DataTable();
- receiverTable.Columns.Add("Activity");
- receiverTable.Columns.Add("Receivers");
- OThinker.H3.Instance.InstanceContext entity = OThinker.H3.Server.Engine.InstanceManager.GetInstanceContext(instanceId);
- if(entity != null)
- {
- foreach(string activity in entity.EnabledActivities)
- {
- if(activity == null || activity == "")
- {
- continue;
- }
- string receivers = null;
- // 查找该任务对应的接收人
- string[] jobIds = OThinker.H3.Server.Engine.WorkItemManager.Query(
- activity,
- new string[] { instanceId },
- null,
- System.DateTime.MinValue,
- System.DateTime.MaxValue,
- OThinker.H3.WorkItem.WorkItemState.Unfinished);
- if(jobIds != null)
- {
- foreach (string jobId in jobIds)
- {
- OThinker.H3.WorkItem.WorkItem job = OThinker.H3.Server.Engine.WorkItemManager.GetWorkItem(jobId);
- string receiver = OThinker.H3.Server.Engine.Organization.GetFullName(job.Participant);
- receivers += receiver + "<BR>";
- }
- }
- receiverTable.Rows.Add(
- new object[]{
- activity,
- receivers});
- }
- }
- this.ReceiverGrid.DataSource = receiverTable;
- this.ReceiverGrid.DataBind();
- }
- }
- #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
- }
- }