- using System;
- using System.Data;
- using System.Configuration;
- using System.Collections.Generic;
- 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_WorkView : System.Web.UI.Page
- {
- /// <summary>
- /// 流程模板
- /// </summary>
- Model.FlowBase MF = new Model.FlowBase();
- /// <summary>
- /// 流程业务
- /// </summary>
- BLL.FlowBase BF = new BLL.FlowBase();
- /// <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();
- /// <summary>
- /// 运行中的工作流模板
- /// </summary>
- Model.FlowRun MoFR = new Model.FlowRun();
- /// <summary>
- /// 运行中的工作流业务
- /// </summary>
- BLL.FlowRun BlFR = new BLL.FlowRun();
- /// <summary>
- /// 会签模板
- /// </summary>
- Model.FlowRunMark MFRMK = new Model.FlowRunMark();
- /// <summary>
- /// 会签业务
- /// </summary>
- BLL.FlowRunMark BFRMK = new BLL.FlowRunMark();
- /// <summary>
- /// 表单被选项
- /// </summary>
- public string BiaoDanSelect
- {
- get { return ViewState["LiuChengBiaoDanSelect"].ToString(); }
- set { ViewState["LiuChengBiaoDanSelect"] = value; }
- }
- /// <summary>
- /// 被选步骤项
- /// </summary>
- public string StepID
- {
- get { return ViewState["LiuChengStepID"].ToString(); }
- set { ViewState["LiuChengStepID"] = value; }
- }
- /// <summary>
- /// 流程ID
- /// </summary>
- public string LiuChengID
- {
- get { return ViewState["LiuChengID"].ToString(); }
- set { ViewState["LiuChengID"] = value; }
- }
- /// <summary>
- /// 运行ID
- /// </summary>
- public string RunID
- {
- get { return ViewState["RunID"].ToString(); }
- set { ViewState["RunID"] = value; }
- }
- protected void Page_Load(object sender, EventArgs e)
- {
- LoginLogic.MatchLoad("../", "Work_WorkView");
- if (!IsPostBack)
- {
- MyDataBind();
- //传过来的ID为流程
- if (Request.QueryString["id"] != null)
- {
- RunID = Request.QueryString["id"].ToString();
- //获取本运行工作流
- MoFR = BlFR.GetModel(int.Parse(RunID));
- //流程ID
- int BfInt = MoFR.LCID;
- MF = BF.GetModel(BfInt);//工作流
- BiaoDanSelect = MF.BDID.ToString();//表单ID
- StepID=MR.ID.ToString();//步骤ID号
- }
- }
- }
- /// <summary>
- /// 获取信息
- /// </summary>
- /// <param name="pidx">页号</param>
- public void MyDataBind()
- {
- string TiaoJian = "";
- if (Request.QueryString["id"] != null)
- {
- TiaoJian = "YXID=" + Request.QueryString["id"].ToString();
- }
- int RecordCount = BFRMK.GetCount(TiaoJian);
- List<Model.FlowRunMark> LRData = BFRMK.GetPageList(RecordCount, 1, "ID", true, TiaoJian);
- if (LRData.Count == 0)
- {
- Model.FlowRunMark MR = new Model.FlowRunMark();
- LRData.Add(MR);
- }
- GridView1.DataSource = LRData;
- GridView1.DataBind();
- }
- /// <summary>
- /// 获取顺序号
- /// </summary>
- /// <returns></returns>
- public string ShunXuHao()
- {
- string RtStr = "结束";
- int Bzid = int.Parse(Eval("BZID").ToString());
- if (Bzid != 0)
- {
- Model.FlowBaseStep MFBS = new BLL.FlowBaseStep().GetModel(Bzid);
- RtStr = MFBS.BZSXH.ToString();
- }
- return RtStr ;
- }
- /// <summary>
- /// 获取顺序号
- /// </summary>
- /// <returns></returns>
- public string MingCheng()
- {
- string RtStr = "";
- int Bzid = int.Parse(Eval("BZID").ToString());
- Model.FlowBaseStep MFBS = new BLL.FlowBaseStep().GetModel(Bzid);
- RtStr = MFBS.BZMC.ToString();
- return RtStr;
- }
- protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
- {
- for (int i = 0; i < GridView1.Rows.Count; i++)
- {
- //首先判断是否是数据行
- if (e.Row.RowType == DataControlRowType.DataRow)
- {
- //当鼠标停留时更改背景色
- e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#F0F0F0'");
- //当鼠标移开时还原背景色
- e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c");
- }
- }
- }
- }