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

.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.BusinessRule.Zwf;
  12. public partial class Workflow_FG : System.Web.UI.Page
  13. {
  14.     protected void Page_Load(object sender, EventArgs e)
  15.     {
  16.         if (!IsPostBack)
  17.         {
  18.             int OpID = -1;
  19.             try
  20.             {
  21.                 OpID = Convert.ToInt16(Request.QueryString["OpID"].ToString().Trim());
  22.                 if (OpID == 7)
  23.                 {
  24.                     LB_title.Text = " 请选择分管领导";
  25.                     Page.Title = "请选择分管领导";
  26.                 }
  27.                 if (OpID == 4)
  28.                 {
  29.                     LB_title.Text = " 请选择职能审核领导";
  30.                     Page.Title = "请选择职能审核领导";
  31.                 }
  32.             }
  33.             catch (Exception ex)
  34.             {
  35.                 this.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + ex.Message.Replace("'", "").Replace("rn", "").Replace("n", "") + "');</script>");
  36.                 return;
  37.             }
  38.            EtongZwf etongzwf = new EtongZwf();
  39.            DataView dv = etongzwf.GetEmpLD(OpID);
  40.            int rows = dv.Count;
  41.            for (int i = 0; i < rows; i++)
  42.            {
  43.                TreeNode tnode = new TreeNode();
  44.                tnode.Text = dv[i]["EmpName"].ToString();
  45.                tnode.Value = dv[i]["UserID"].ToString();
  46.                FGLDTree.Nodes.Add(tnode);
  47.            }
  48.         }
  49.     }
  50.  
  51.     protected void FGLDTree_SelectedNodeChanged(object sender, EventArgs e)
  52.     {
  53.         string EmId = FGLDTree.SelectedValue;
  54.         ClientScript.RegisterStartupScript(this.GetType(), "", "<script>window.returnValue='" + EmId + "';window.close();</script>");
  55.     }
  56. }