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

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_FormDesignManager : System.Web.UI.Page
  12. {
  13.     /// <summary>
  14.     /// 模板 
  15.     /// </summary>
  16.     Model.FlowBaseFormContent MR = new Model.FlowBaseFormContent();
  17.     /// <summary>
  18.     /// 业务
  19.     /// </summary>
  20.     BLL.FlowBaseFormContent BR = new BLL.FlowBaseFormContent();
  21.     protected void Page_Load(object sender, EventArgs e)
  22.     {
  23.         LoginLogic.MatchLoad("../", "WorkFlow_FormDesignManager");
  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.     /// <returns></returns>
  47.     public string GuiDingShiJian()
  48.     {
  49.         string Rtstr = "人事";
  50.       
  51.              string Id = Eval("LCLX").ToString();
  52.         Rtstr = EnumGet.GetFlowBaseTypeName(int.Parse(Id));
  53.         return Rtstr;
  54.     }
  55.     /// <summary>
  56.     /// 操作
  57.     /// </summary>
  58.     /// <returns></returns>
  59.     public string CaoZuo()
  60.     {
  61.         string Id = Eval("Id").ToString();
  62.         string Rtstr = "<a href='FormDesignEdit.aspx?id=" + Id + "'>编辑表单名称</a>&nbsp;&nbsp;";
  63.         Rtstr += "<a href='Design/FormDesigner.aspx?id=" + Id + "' target='_blank'>表单智能设计器</a>&nbsp;&nbsp;";
  64.         Rtstr += "<a href='WebBrowserFlowForm.aspx?id=" + Id + "' target='_blank'>预览</a>&nbsp;&nbsp;";
  65.         return Rtstr;
  66.     }
  67.     /// <summary>
  68.     /// 获取信息
  69.     /// </summary>
  70.     /// <param name="pidx">页号</param>
  71.     public void MyDataBind()
  72.     {
  73.         List<Model.FlowBaseFormContent> LRData = BR.GetList();
  74.         if (LRData.Count == 0)
  75.         {
  76.             Model.FlowBaseFormContent MR = new Model.FlowBaseFormContent();
  77.             LRData.Add(MR);
  78.         }
  79.         GridView1.DataSource = LRData;
  80.         GridView1.DataBind();
  81.     }
  82. }