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

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 WorkFlow_WorkFlowManager : System.Web.UI.Page
  12. {
  13.     /// <summary>
  14.     /// 模板 
  15.     /// </summary>
  16.     Model.FlowBase MR = new Model.FlowBase();
  17.     /// <summary>
  18.     /// 业务
  19.     /// </summary>
  20.     BLL.FlowBase BR = new BLL.FlowBase();
  21.     protected void Page_Load(object sender, EventArgs e)
  22.     {
  23.         LoginLogic.MatchLoad("../", "WorkFlow_WorkFlowManager");
  24.         if (!IsPostBack)
  25.         {
  26.             MyDataBind();
  27.         }
  28.     }
  29.     protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
  30.     {
  31.         for (int i = 0; i < GridView1.Rows.Count; i++)
  32.         {
  33.             //首先判断是否是数据行
  34.             if (e.Row.RowType == DataControlRowType.DataRow)
  35.             {
  36.                 //当鼠标停留时更改背景色
  37.                 e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#F0F0F0'");
  38.                 //当鼠标移开时还原背景色
  39.                 e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c");
  40.             }
  41.         }
  42.     }
  43.     /// <summary>
  44.     /// 获取信息
  45.     /// </summary>
  46.     /// <param name="pidx">页号</param>
  47.     public void MyDataBind()
  48.     {
  49.         List<Model.FlowBase> LRData = BR.GetList();
  50.         if (LRData.Count == 0)
  51.         {
  52.             Model.FlowBase MR = new Model.FlowBase();
  53.             LRData.Add(MR);
  54.         }
  55.         GridView1.DataSource = LRData;
  56.         GridView1.DataBind();
  57.     }
  58.     /// <summary>
  59.     /// 操作
  60.     /// </summary>
  61.     /// <returns></returns>
  62.     public string CaoZuo()
  63.     {
  64.         string Id = Eval("Id").ToString();
  65.         string BDID = Eval("BDID").ToString();
  66.         string LCFL = Eval("LCFL").ToString();
  67.         string Rtstr = @"         <a href=""WorkFlowEdit.aspx?id=" + Id + @""">
  68.                                 <img align=""absMiddle"" border=""0"" height=""18"" src=""../images/edit.gif"" width=""18"" /><span
  69.                                     style=""color: #0000ff; text-decoration: underline""> 基本属性</span></a> &nbsp;
  70.                             <!--固定流程有流程编辑器选项 -->
  71.                             <a href=""WorkFlowStepSetting.aspx?lcflid=" + LCFL + "&lcid=" + Id + "&bdid=" + BDID + @""">
  72.                                 <img align=""absMiddle"" border=""0"" height=""13"" src=""../images/arrow_down.gif"" width=""11"" /><span
  73.                                     style=""color: #0000ff; text-decoration: underline""> 流程设计器 &nbsp; </span></a>
  74.                           ";
  75.         //<img align=""absMiddle"" border=""0"" src=""../images/query.gif"" /><a href=""#""><span style=""color: #0000ff;
  76.         //                                    text-decoration: underline"">删除</span>
  77.         return Rtstr;
  78.     }
  79.     /// <summary>
  80.     /// 流程
  81.     /// </summary>
  82.     /// <returns></returns>
  83.     public string LiuCheng()
  84.     {
  85.         string Rtstr = "人事";
  86.         string Id = Eval("LCFL").ToString();
  87.         Rtstr = EnumGet.GetFlowBaseTypeName(int.Parse(Id));
  88.         return Rtstr;
  89.     }
  90.     /// <summary>
  91.     /// 表单
  92.     /// </summary>
  93.     /// <returns></returns>
  94.     public string BiaoDan()
  95.     {
  96.         string Rtstr = "请假";
  97.         string Id = Eval("BDID").ToString();
  98.    
  99.         Rtstr = EnumGet.GetFlowBaseFormName(int.Parse(Id));
  100.         Rtstr = "<a href='WebBrowserFlowForm.aspx?id=" + Id + "' target='_blank'>" + Rtstr + "</a>&nbsp;&nbsp;";
  101.         return Rtstr;
  102.     }
  103. }