WorkFlowStepSetting.aspx.cs
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:3k
- 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 WorkFlow_WorkFlowStepSetting : System.Web.UI.Page
- {
- /// <summary>
- /// 模板
- /// </summary>
- Model.FlowBaseStep MR = new Model.FlowBaseStep();
- /// <summary>
- /// 业务
- /// </summary>
- BLL.FlowBaseStep BR = new BLL.FlowBaseStep();
- public string lcflidStr = "";
- public string lcidStr = "";
- public string bdidStr = "";
- protected void Page_Load(object sender, EventArgs e)
- {
- LoginLogic.MatchLoad("../", "WorkFlow_WorkFlowStepSetting");
- if (!IsPostBack)
- {
- object lcflid = Request.QueryString["lcflid"];//流程分类ID
- object lcid = Request.QueryString["lcid"];//流程ID
- object bdid = Request.QueryString["bdid"];//表单ID
- if ((lcflid != null) && (lcid != null) && (bdid != null))
- {
- lcflidStr = lcflid.ToString();
- lcidStr = lcid.ToString();
- bdidStr = bdid.ToString();
- }
- MyDataBind();
- }
- }
- /// <summary>
- /// 获取信息
- /// </summary>
- /// <param name="pidx">页号</param>
- public void MyDataBind()
- {
- string TiaoJian = "";
- if (Request.QueryString["lcid"] != null)
- {
- TiaoJian = "LCID=" + Request.QueryString["lcid"].ToString();
- }
- int RecordCount = BR.GetCount(TiaoJian);
- if(RecordCount>0)
- {
- List<Model.FlowBaseStep> LRData = BR.GetPageList(RecordCount, 1, "BZSXH", true, TiaoJian);
- if (LRData.Count == 0)
- {
- Model.FlowBaseStep MR = new Model.FlowBaseStep();
- LRData.Add(MR);
- }
- GridView1.DataSource = LRData;
- GridView1.DataBind();
- }
- }
- protected void Button1_Click(object sender, EventArgs e)
- {
- Response.Redirect("WorkFlowStepAdd.aspx?lcflid=" + Request.QueryString["lcflid"].ToString() + "&lcid=" + Request.QueryString["lcid"].ToString() + "&bdid=" + Request.QueryString["bdid"].ToString());
- }
- 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");
- }
- }
- }
- protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
- {
- string ID = GridView1.Rows[e.RowIndex].Cells[0].Text.ToString().Trim();
- BR.Delete(int.Parse(ID));
- MessageBox.Show("删除成功!");
- MyDataBind();
- }
- }