MyDeptInstance.aspx.cs
资源名称:H3_OA.rar [点击查看]
上传用户:li2971742
上传日期:2021-11-18
资源大小:39096k
文件大小:2k
源码类别:
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 MyDeptInstance : PortalPage
- {
- protected void Page_Load(object sender, System.EventArgs e)
- {
- if(!this.IsPostBack)
- {
- // 获得登陆用户所在的组织
- string[] groups = this.UserValidator.MemberOfs;
- foreach(string group in groups)
- {
- this.Query(group);
- }
- }
- }
- // 查找该部门没有完成的流程
- private void Query(string Department)
- {
- string[] colleages = OThinker.H3.Server.Engine.Organization.GetChildren(Department, OThinker.Organization.UnitType.User, false);
- Label deptLabel = new Label();
- deptLabel.Text = "部门/组:" + OThinker.H3.Server.Engine.Organization.GetFullName(Department) + "<HR>";
- this.InstancePanel.Controls.Add(deptLabel);
- InstanceGridView grid = new InstanceGridView();
- System.Data.DataTable table = Portal.Query.QueryInstance(
- null,
- colleages,
- null,
- OThinker.H3.Instance.InstanceContext.UnspecifiedID,
- OThinker.H3.Instance.InstanceState.Unfinished,
- null,
- null,
- OThinker.H3.WorkflowTemplate.WorkflowTemplate.NullWorkflowVersion,
- System.DateTime.MinValue,
- System.DateTime.MaxValue,
- null,
- OThinker.H3.Instance.PriorityType.Unspecified,
- OThinker.Data.BoolMatchValue.Unspecified,
- OThinker.Data.BoolMatchValue.Unspecified);
- grid.AllowPaging = false;
- grid.BindDataGrid(table);
- this.InstancePanel.Controls.Add(grid);
- Label spaceLabel = new Label();
- spaceLabel.Text = "<BR>";
- this.InstancePanel.Controls.Add(spaceLabel);
- }
- #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
- }
- }