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

OA系统

开发平台:

C#

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  5. using System.Web;
  6. using System.Web.Security;
  7. using System.Web.UI;
  8. using System.Web.UI.WebControls;
  9. using System.Web.UI.WebControls.WebParts;
  10. using System.Web.UI.HtmlControls;
  11. namespace OThinker.H3.Portal
  12. {
  13.     public partial class WorkflowInfo : PortalPage
  14.     {
  15.         #region 参数
  16.         protected string WorkflowPackage
  17.         {
  18.             get
  19.             {
  20.                 return HttpUtility.UrlDecode(this.Request.QueryString[Param_WorkflowPackage]);
  21.             }
  22.         }
  23.         protected string WorkflowName
  24.         {
  25.             get
  26.             {
  27.                 return HttpUtility.UrlDecode(this.Request.QueryString[Param_WorkflowName]);
  28.             }
  29.         }
  30.         private int _WorkflowVersion = H3.WorkflowTemplate.WorkflowTemplate.NullWorkflowVersion;
  31.         protected int WorkflowVersion
  32.         {
  33.             get
  34.             {
  35.                 if (this._WorkflowVersion == H3.WorkflowTemplate.WorkflowTemplate.NullWorkflowVersion)
  36.                 {
  37.                     string strVersion = this.Request.QueryString[Param_WorkflowVersion];
  38.                     if (strVersion == null || strVersion == "")
  39.                     {
  40.                         this._WorkflowVersion = OThinker.H3.Server.Engine.WorkflowManager.GetWorkflowDefaultVersion(this.WorkflowPackage, this.WorkflowName);
  41.                     }
  42.                     else
  43.                     {
  44.                         this._WorkflowVersion = int.Parse(strVersion);
  45.                     }
  46.                 }
  47.                 return this._WorkflowVersion;
  48.             }
  49.         }
  50.         protected WorkflowTemplate.WorkflowTemplate Workflow
  51.         {
  52.             get
  53.             {
  54.                 return OThinker.H3.Server.Engine.WorkflowManager.GetWorkflow(
  55.                     this.WorkflowPackage,
  56.                     this.WorkflowName,
  57.                     this.WorkflowVersion);
  58.             }
  59.         }
  60.         #endregion
  61.         protected void Page_Load(object sender, EventArgs e)
  62.         {
  63.             if (!this.IsPostBack)
  64.             {
  65.                 if (this.Workflow == null)
  66.                 {
  67.                     this.NotifyMessage("流程模板不存在");
  68.                 }
  69.                 // 顺序表
  70.                 this.GridSteps.DataSource = this.Workflow.GetSerialTable();
  71.                 this.GridSteps.DataBind();
  72.                 // 流程图连接
  73.                 this.ChartFrame.Attributes.Add(
  74.                     "src",
  75.                     PageName_WorkflowChart + "?" +
  76.                     Param_WorkflowPackage + "=" + HttpUtility.UrlEncode(this.WorkflowPackage) + "&" +
  77.                     Param_WorkflowName + "=" + HttpUtility.UrlEncode(this.WorkflowName) + "&" +
  78.                     Param_WorkflowVersion + "=" + this.WorkflowVersion);
  79.             }
  80.         }
  81.         protected void btnStart_Click(object sender, EventArgs e)
  82.         {
  83.             // 跳转到发起页面上
  84.             this.Response.Redirect(
  85.                 PageName_StartInstance + "?" +
  86.                 Param_WorkflowPackage + "=" + HttpUtility.UrlEncode(this.WorkflowPackage) + "&" +
  87.                 Param_WorkflowName + "=" + HttpUtility.UrlEncode(this.WorkflowName) + "&" +
  88.                 Param_WorkflowVersion + "=" + this.WorkflowVersion);
  89.         }
  90.     }
  91. }