WorkFlowSelectTable.aspx.cs
上传用户:tiancihang
上传日期:2014-03-12
资源大小:21387k
文件大小:3k
源码类别:

.net编程

开发平台:

C#

  1. using System;
  2. using System.Data;
  3. using System.Configuration;
  4. using System.Collections;
  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. using com.etong.DAL.FC;
  12. public partial class Workflow_WorkFlowSelectTable : System.Web.UI.Page
  13. {
  14.     protected void Page_Load(object sender, EventArgs e)
  15.     {
  16.         Response.Buffer = true;
  17.         Response.ExpiresAbsolute = System.DateTime.Now;
  18.         Response.Expires = 0;
  19.         Response.CacheControl = "no-cache";
  20.         if (!IsPostBack)
  21.         {
  22.             DataView dv = new DataView();
  23.             if (Request.QueryString["StrN"] == "E")
  24.             {
  25.                 EtongFlyChouWF EFlyWF = new EtongFlyChouWF();
  26.                 dv = EFlyWF.GetWFDataTable("1");
  27.                 lbTable.DataTextField = "showName";
  28.                 lbTable.DataValueField = "dtID";
  29.             }
  30.             else
  31.             {
  32.                 int iWFID,iMode;
  33.                 try
  34.                 {
  35.                     iWFID = Convert.ToInt32(Request.QueryString["StrM"]);
  36.                 }
  37.                 catch
  38.                 {
  39.                     iWFID = -1;
  40.                     this.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('系统提示:接口参数错误!');window.close();", true);
  41.                     return;
  42.                 }
  43.                 try
  44.                 {
  45.                     iMode = Convert.ToInt32(Request.QueryString["strT"]);
  46.                 }
  47.                 catch
  48.                 {
  49.                     iMode = -1;
  50.                     this.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('系统提示:接口参数错误!');window.close();", true);
  51.                     return;
  52.                 }
  53.                 EtongFlyChouWF EFlyWF = new EtongFlyChouWF();
  54.                 dv = EFlyWF.GetParentAcivity(iWFID,iMode);
  55.                 lbTable.DataTextField = "ActName";
  56.                 lbTable.DataValueField = "ActivityID";
  57.             }
  58.             lbTable.DataSource = dv;
  59.             lbTable.DataBind();
  60.             if (Request.QueryString["StrN"] == "E")
  61.             {
  62.             }
  63.             else
  64.             {
  65.                 if (lbTable.Items.Count < 1)
  66.                 {
  67.                     ListItem Lst = new ListItem();
  68.                     Lst.Text = "起始";
  69.                     Lst.Value = "-1";
  70.                     lbTable.Items.Add(Lst);
  71.                 }
  72.             }
  73.         }
  74.     }
  75.     protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
  76.     {
  77.         string RetSelectValue="";
  78.         RetSelectValue = txt_RoleID.Value + "|" + TB_UserRole.Value;
  79.         this.ClientScript.RegisterStartupScript(this.GetType(), "", "window.returnValue='" + RetSelectValue + "';window.close();", true);
  80.     }
  81. }