WorkflowInfo.aspx.cs
资源名称:H3_OA.rar [点击查看]
上传用户:li2971742
上传日期:2021-11-18
资源大小:39096k
文件大小:3k
源码类别:
OA系统
开发平台:
C#
- using System;
- using System.Data;
- using System.Configuration;
- using System.Collections;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- namespace OThinker.H3.Portal
- {
- public partial class WorkflowInfo : PortalPage
- {
- #region 参数
- protected string WorkflowPackage
- {
- get
- {
- return HttpUtility.UrlDecode(this.Request.QueryString[Param_WorkflowPackage]);
- }
- }
- protected string WorkflowName
- {
- get
- {
- return HttpUtility.UrlDecode(this.Request.QueryString[Param_WorkflowName]);
- }
- }
- private int _WorkflowVersion = H3.WorkflowTemplate.WorkflowTemplate.NullWorkflowVersion;
- protected int WorkflowVersion
- {
- get
- {
- if (this._WorkflowVersion == H3.WorkflowTemplate.WorkflowTemplate.NullWorkflowVersion)
- {
- string strVersion = this.Request.QueryString[Param_WorkflowVersion];
- if (strVersion == null || strVersion == "")
- {
- this._WorkflowVersion = OThinker.H3.Server.Engine.WorkflowManager.GetWorkflowDefaultVersion(this.WorkflowPackage, this.WorkflowName);
- }
- else
- {
- this._WorkflowVersion = int.Parse(strVersion);
- }
- }
- return this._WorkflowVersion;
- }
- }
- protected WorkflowTemplate.WorkflowTemplate Workflow
- {
- get
- {
- return OThinker.H3.Server.Engine.WorkflowManager.GetWorkflow(
- this.WorkflowPackage,
- this.WorkflowName,
- this.WorkflowVersion);
- }
- }
- #endregion
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!this.IsPostBack)
- {
- if (this.Workflow == null)
- {
- this.NotifyMessage("流程模板不存在");
- }
- // 顺序表
- this.GridSteps.DataSource = this.Workflow.GetSerialTable();
- this.GridSteps.DataBind();
- // 流程图连接
- this.ChartFrame.Attributes.Add(
- "src",
- PageName_WorkflowChart + "?" +
- Param_WorkflowPackage + "=" + HttpUtility.UrlEncode(this.WorkflowPackage) + "&" +
- Param_WorkflowName + "=" + HttpUtility.UrlEncode(this.WorkflowName) + "&" +
- Param_WorkflowVersion + "=" + this.WorkflowVersion);
- }
- }
- protected void btnStart_Click(object sender, EventArgs e)
- {
- // 跳转到发起页面上
- this.Response.Redirect(
- PageName_StartInstance + "?" +
- Param_WorkflowPackage + "=" + HttpUtility.UrlEncode(this.WorkflowPackage) + "&" +
- Param_WorkflowName + "=" + HttpUtility.UrlEncode(this.WorkflowName) + "&" +
- Param_WorkflowVersion + "=" + this.WorkflowVersion);
- }
- }
- }