MyWorkList.aspx.cs
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:5k
- 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_MyWorkList : System.Web.UI.Page
- {
- /// <summary>
- /// 模板
- /// </summary>
- Model.FlowRun MR = new Model.FlowRun();
- /// <summary>
- /// 业务
- /// </summary>
- BLL.FlowRun BR = new BLL.FlowRun();
- /// <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_MyWorkList");
- 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 = "FQR='"+SessionInclude.SessionId+"'";
- AspNetPager1.RecordCount = BR.GetCount(TiaoJian);
- List<Model.FlowRun> LRData = BR.GetPageList(20, pidx, "ID", false, TiaoJian);
- if (LRData.Count == 0)
- {
- Model.FlowRun MR = new Model.FlowRun();
- LRData.Add(MR);
- }
- GridView1.DataSource = LRData;
- GridView1.DataBind();
- }
- /// <summary>
- /// 操作
- /// </summary>
- /// <returns></returns>
- public string CaoZuo()
- {
- try
- {
- string Id = Eval("Id").ToString();
- string ToId = Eval("XBR").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> ";
- if (Eval("YXZT").ToString() == "运行中")
- {
- Rtstr += @"<a onclick=""javascript:return confirm('您确定是否销毁?')"" href=""WorkDestroy.aspx?id=" + Id + @""">
- <img align=""absMiddle"" border=""0"" height=""13"" src=""../images/arrow_down.gif"" width=""11"" /><span
- style=""color: #0000ff; text-decoration: underline""> 销毁 </span></a>
- <a o href=""../SMS/MySMSSendTo.aspx?id=" + Server.UrlEncode(ToId) + @""">
- <img align=""absMiddle"" border=""0"" height=""13"" src=""../images/arrow_down.gif"" width=""11"" /><span
- style=""color: #0000ff; text-decoration: underline""> 催办 </span></a>
- ";
- }
- else
- {
- Rtstr += @" ";
- }
- return Rtstr;
- }
- catch
- { return ""; }
- }
- /// <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;
- }
- }