RunFormContent.aspx.cs
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:4k
- 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;
- public partial class Work_RunFormContent : System.Web.UI.Page
- {
- /// <summary>
- /// 模型
- /// </summary>
- Model.FlowBaseStep MR = new Model.FlowBaseStep();
- /// <summary>
- /// 业务
- /// </summary>
- BLL.FlowBaseStep BR = new BLL.FlowBaseStep();
- /// <summary>
- /// 模板
- /// </summary>
- Model.FlowBaseFormContent MFBFC = new Model.FlowBaseFormContent();
- /// <summary>
- /// 业务
- /// </summary>
- BLL.FlowBaseFormContent BFBFC = new BLL.FlowBaseFormContent();
- public string ContentStr = "";
- /// <summary>
- /// 运行中的工作流模板
- /// </summary>
- Model.FlowRun MoFR = new Model.FlowRun();
- /// <summary>
- /// 运行中的工作流业务
- /// </summary>
- BLL.FlowRun BlFR = new BLL.FlowRun();
- protected void Page_Load(object sender, EventArgs e)
- {
- LoginLogic.MatchLoad("../", "Work_RunFormContent");
- object fmid = Request.QueryString["run_id"];
- object stepid = Request.QueryString["step_id"];
- if ((fmid != null) && (stepid!=null))
- {
- MoFR = BlFR.GetModel(int.Parse(fmid.ToString()));
- ContentStr = MoFR.BDNR.Replace("disabled","");
- FormCodeList(int.Parse(fmid.ToString()));
-
- int StepId = int.Parse(stepid.ToString());
- if (StepId != 0)
- {
- FormCodeList2(int.Parse(fmid.ToString()));
- MR = BR.GetModel(StepId);
- //标记可用
- string KYZDStr = MR.KYZD;
- string[] LIS = KYZDStr.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
- foreach (string LI in LIS)
- {
- ContentStr = ContentStr.Replace("title=" + LI + @" disabled=""disabled""", "title=" + LI);
- }
- ContentStr = ContentStr.Replace(@"""", @"""");
- }
- }
- }
- /// <summary>
- /// 全部变为不可用
- /// </summary>
- /// <param name="BDID"></param>
- public void FormCodeList2(int BDID)
- {
- MoFR = BlFR.GetModel(BDID);
- string strFormModel = MoFR.BDNR; ;
- string IndexStr = "title=";
- int IdexStart = 0;
- do
- {
- IdexStart = strFormModel.IndexOf(IndexStr, IdexStart);
- if (IdexStart != -1)
- {
- string ItemStr = RtContrlStr(IdexStart, strFormModel);
- IdexStart = IdexStart + 1;
- ContentStr = ContentStr.Replace("title=" + ItemStr, "title=" + ItemStr + @" disabled=""disabled""");
- }
- }
- while (IdexStart != -1);
- }
- /// <summary>
- /// 全部变为可用
- /// </summary>
- /// <param name="BDID"></param>
- public void FormCodeList(int BDID)
- {
- MoFR = BlFR.GetModel(BDID);
- string strFormModel = MoFR.BDNR;;
- string IndexStr = "title=";
- int IdexStart = 0;
- do
- {
- IdexStart = strFormModel.IndexOf(IndexStr, IdexStart);
- if (IdexStart != -1)
- {
- string ItemStr = RtContrlStr(IdexStart, strFormModel);
- IdexStart = IdexStart + 1;
- ContentStr = ContentStr.Replace("title=" + ItemStr + @" disabled=""disabled""", "title=" + ItemStr);
- }
- }
- while (IdexStart != -1);
- }
- public string RtContrlStr(int IdexStart, string Content)
- {
- string IndexStrEnd = " ";
- int StartP = Content.IndexOf(IndexStrEnd, IdexStart);
- int LengthStr = StartP - IdexStart;
- string RtStr = Content.Substring(IdexStart, LengthStr).Replace("title=", "");
- return RtStr;
- }
- }