示例#1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //判断session
        if (this.Session["hyuid"] != null)
        {
            if (this.Session["hyuid"].ToString() == "")
            {
                this.Response.Redirect("../../login.aspx");
            }
        }
        else
        {
            this.Response.Redirect("../../login.aspx");
        }
        if (!this.IsPostBack)
        {
            //得到人员
            Hyoa_user hyoaUser = new Hyoa_user();
            this.ddl_user.DataSource = hyoaUser.GetusersOrderbydeptsortandusersort();
            this.ddl_user.DataTextField = "hy_username";
            this.ddl_user.DataValueField = "hy_userid";
            this.ddl_user.DataBind();
            this.ddl_user.Items.Insert(0, new ListItem("--请选择--", ""));
            //得到部门
            Hyoa_dept hyoaDept = new Hyoa_dept();
            this.ddl_dept.DataSource = hyoaDept.Getdepts();
            this.ddl_dept.DataTextField = "hy_deptname";
            this.ddl_dept.DataValueField = "hy_deptid";
            this.ddl_dept.DataBind();
            this.ddl_dept.Items.Insert(0, new ListItem("--请选择--", ""));

            //得到选择的人员
            if (this.Request.QueryString["userid"] != null)
                if (this.Request.QueryString["userid"].ToString() != "")
                    this.ddl_user.SelectedValue = this.Request.QueryString["userid"].ToString();
            //得到选择的部门
            if (this.Request.QueryString["deptid"] != null)
                if (this.Request.QueryString["deptid"].ToString() != "")
                    this.ddl_dept.SelectedValue = this.Request.QueryString["deptid"].ToString();
            //得到开始时间
            if (this.Request.QueryString["operateTime_s"] != null)
                if (this.Request.QueryString["operateTime_s"].ToString() != "")
                    this.operateTime_s.Value = this.Request.QueryString["operateTime_s"].ToString();
            //得到结束时间
            if (this.Request.QueryString["operateTime_e"] != null)
                if (this.Request.QueryString["operateTime_e"].ToString() != "")
                    this.operateTime_e.Value = this.Request.QueryString["operateTime_e"].ToString();
        }
        //数据绑定
        if (!(this.ddl_user.SelectedValue.ToString() == "" && this.ddl_dept.SelectedValue.ToString() == "" && this.operateTime_s.Value == "" && this.operateTime_e.Value == ""))
        {
            RptBind();
        }
    }
示例#2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //判断session
     if (this.Session["hyuid"] != null)
     {
         if (this.Session["hyuid"].ToString() == "")
         {
             this.Response.Redirect("../../login.aspx");
         }
     }
     else
     {
         this.Response.Redirect("../../login.aspx");
     }
     if (!this.IsPostBack)
     {
         //得到人员
         Hyoa_dept hyoaDept = new Hyoa_dept();
         this.ddl_dept.DataSource = hyoaDept.Getdepts();
         this.ddl_dept.DataTextField = "hy_deptname";
         this.ddl_dept.DataValueField = "hy_deptid";
         this.ddl_dept.DataBind();
         this.ddl_dept.Items.Insert(0, new ListItem("--请选择--", ""));
         //得到选择的人员
         if (this.Request.QueryString["txtdept"] != null)
             if (this.Request.QueryString["txtdept"].ToString() != "")
                 this.ddl_dept.SelectedValue = this.Request.QueryString["txtdept"].ToString();
         //得到开始时间
         if (this.Request.QueryString["operateTime_s"] != null)
             if (this.Request.QueryString["operateTime_e"].ToString() != "")
                 this.operateTime_s.Value = this.Request.QueryString["operateTime_s"].ToString();
         //得到结束时间
         if (this.Request.QueryString["operateTime_e"] != null)
             if (this.Request.QueryString["operateTime_e"].ToString() != "")
                 this.operateTime_e.Value = this.Request.QueryString["operateTime_e"].ToString();
         //统计类型
         if (this.Request.QueryString["type"] != null)
             if (this.Request.QueryString["type"].ToString() != "")
                 this.rd_type.Text = this.Request.QueryString["type"].ToString();
     }
     getData();
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     //判断session
     if (this.Session["hyuid"] != null)
     {
         if (this.Session["hyuid"].ToString() == "")
         {
             this.Response.Redirect("../../login.aspx");
         }
     }
     else
     {
         this.Response.Redirect("../../login.aspx");
     }
     if (!this.IsPostBack)
     {
         //得到人员
         Hyoa_dept hyoaDept = new Hyoa_dept();
         this.ddl_dept.DataSource = hyoaDept.Getdepts();
         this.ddl_dept.DataTextField = "hy_deptname";
         this.ddl_dept.DataValueField = "hy_deptid";
         this.ddl_dept.DataBind();
         this.ddl_dept.Items.Insert(0, new ListItem("--请选择--", ""));
         //得到表单
         Hyoa_tableconfig hyoaTableconfig = new Hyoa_tableconfig();
         string sqlSelect = " SELECT ID, hy_name FROM hyt_tableconfig WHERE (hy_ifflowdoc = '是') ";
         DAO db = new DAO();
         this.ddl_table.DataSource = db.GetDataTable(sqlSelect);
         this.ddl_table.DataTextField = "hy_name";
         this.ddl_table.DataValueField = "ID";
         this.ddl_table.DataBind();
         this.ddl_table.Items.Insert(0, new ListItem("--请选择--", ""));
         //得到用户ID
         if (this.Request.QueryString["txtdeptid"] != null)
             if (this.Request.QueryString["txtdeptid"].ToString() != "")
                 this.ddl_dept.SelectedValue = this.Request.QueryString["txtdeptid"].ToString();
         //得到表单ID
         if (this.Request.QueryString["txttableid"] != null)
             if (this.Request.QueryString["txttableid"].ToString() != "")
                 this.ddl_table.SelectedValue = this.Request.QueryString["txttableid"].ToString();
         //开始时间
         if (this.Request.QueryString["operateTime_s"] != null)
             if (this.Request.QueryString["operateTime_s"].ToString() != "")
                 this.operateTime_s.Value = this.Request.QueryString["operateTime_s"].ToString();
         //结束时间
         if (this.Request.QueryString["operateTime_e"] != null)
             if (this.Request.QueryString["operateTime_e"].ToString() != "")
                 this.operateTime_e.Value = this.Request.QueryString["operateTime_e"].ToString();
         //关键字
         if (this.Request.QueryString["txtKeyWord"] != null)
             if (this.Request.QueryString["txtKeyWord"].ToString() != "")
                 this.txtKeyWord.Value = this.Request.QueryString["txtKeyWord"].ToString();
         //是否结束
         if (this.Request.QueryString["txtFlow"] != null)
             if (this.Request.QueryString["txtFlow"].ToString() != "")
                 this.ddl_flow.SelectedValue = this.Request.QueryString["txtFlow"].ToString();
     }
     //每页数量
     pageSize = GetPageSize(10);
     RptBind();
 }