FormContent.aspx.cs
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:3k
- 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_FormContent : 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 = "";
- protected void Page_Load(object sender, EventArgs e)
- {
- LoginLogic.MatchLoad("../", "Work_FormContent");
- object fmid = Request.QueryString["form_id"];
- object stepid = Request.QueryString["step_id"];
- if ((fmid != null) && (stepid!=null))
- {
-
- MFBFC = BFBFC.GetModel(int.Parse(fmid.ToString()));
-
- ContentStr = MFBFC.BDNR;
- FormCodeList(int.Parse(fmid.ToString()));
- MR = BR.GetModel(int.Parse(stepid.ToString()));
- //标记可用
- 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 FormCodeList(int BDID)
- {
- MFBFC = BFBFC.GetModel(BDID);
- string strFormModel = MFBFC.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);
- }
- 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;
- }
- }