WorkFlowView.aspx.cs
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:2k
源码类别:

OA系统

开发平台:

C#

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections.Generic;
  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. public partial class Work_WorkFlowView : System.Web.UI.Page
  12. {
  13.     /// <summary>
  14.     /// 模板
  15.     /// </summary>
  16.     Model.FlowBaseStep MR = new Model.FlowBaseStep();
  17.     /// <summary>
  18.     /// 业务
  19.     /// </summary>
  20.     BLL.FlowBaseStep BR = new BLL.FlowBaseStep();
  21.     public string lcidStr = "";
  22.     protected void Page_Load(object sender, EventArgs e)
  23.     {
  24.         LoginLogic.MatchLoad("../", "Work_WorkFlowView");
  25.         if (!IsPostBack)
  26.         {
  27.             MyDataBind();
  28.         }
  29.     }
  30.     /// <summary>
  31.     /// 获取信息
  32.     /// </summary>
  33.     /// <param name="pidx">页号</param>
  34.     public void MyDataBind()
  35.     {
  36.         string TiaoJian ="";
  37.         if (Request.QueryString["lcid"] != null)
  38.         {
  39.             TiaoJian = "LCID=" + Request.QueryString["lcid"].ToString();
  40.         }
  41.         int RecordCount = BR.GetCount(TiaoJian);
  42.         List<Model.FlowBaseStep> LRData = BR.GetPageList(RecordCount, 1, "BZSXH", true, TiaoJian);
  43.         if (LRData.Count == 0)
  44.         {
  45.             Model.FlowBaseStep MR = new Model.FlowBaseStep();
  46.             LRData.Add(MR);
  47.         }
  48.         GridView1.DataSource = LRData;
  49.         GridView1.DataBind();
  50.     }
  51.     protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
  52.     {
  53.         for (int i = 0; i < GridView1.Rows.Count; i++)
  54.         {
  55.             //首先判断是否是数据行
  56.             if (e.Row.RowType == DataControlRowType.DataRow)
  57.             {
  58.                 //当鼠标停留时更改背景色
  59.                 e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#F0F0F0'");
  60.                 //当鼠标移开时还原背景色
  61.                 e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c");
  62.             }
  63.         }
  64.     }
  65. }