OverWorkList.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 Work_OverWorkList : System.Web.UI.Page
- {
- /// <summary>
- /// 模板
- /// </summary>
- Model.FlowRunMark MR = new Model.FlowRunMark();
- /// <summary>
- /// 业务
- /// </summary>
- BLL.FlowRunMark BR = new BLL.FlowRunMark();
- /// <summary>
- /// 查询条件
- /// </summary>
- public string TiaoJian
- {
- get
- {
- if (ViewState["Work_WorkListTiaoJian"] == null)
- {
- return "";
- }
- else
- {
- return ViewState["Work_WorkListTiaoJian"].ToString();
- }
- }
- set { ViewState["Work_WorkListTiaoJian"] = value; }
- }
- protected void Page_Load(object sender, EventArgs e)
- {
- LoginLogic.MatchLoad("../", "Work_WorkList");
- if (!IsPostBack)
- {
- MyDataBind(1);
- }
- }
- 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 AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e)
- {
- MyDataBind(e.NewPageIndex);
- }
- /// <summary>
- /// 获取信息
- /// </summary>
- /// <param name="pidx">页号</param>
- public void MyDataBind(int pidx)
- {
- TiaoJian = " QSYJR='" + SessionInclude.SessionId + "'";
- AspNetPager1.RecordCount = BR.GetCount(TiaoJian);
- List<Model.FlowRunMark> LRData = BR.GetPageList(20, pidx, "ID", false, 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 CaoZuo()
- {
- string Id = Eval("YXID").ToString();
-
- string Rtstr = @"
- <!--固定流程有流程编辑器选项 -->
- <img align=""absMiddle"" border=""0"" src=""../images/query.gif"" /><a href=""WorkView.aspx?id=" + Id + @"""><span style=""color: #0000ff;
- text-decoration: underline"">查看办理情况</span>
- ";
- return Rtstr;
- }
- /// <summary>
- /// 流程
- /// </summary>
- /// <returns></returns>
- public string LiuCheng()
- {
- string Rtstr = "请假";
- string Id = Eval("LCID").ToString();
- Rtstr = EnumGet.GetFlowBaseName(int.Parse(Id));
- Rtstr = "<a href='WorkFlowView.aspx?lcid=" + Id + "' target='_blank'>" + Rtstr + "</a>";
- return Rtstr;
- }
- }