Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ControlTemplate.SetPager(Convert.ToInt32((Math.Ceiling(dm.GetAllDepart().Rows.Count / 10.0))), gdvinfo.PageSize);
                Bind();
                drpManage.DataSource     = um.SearchManage();
                drpManage.DataValueField = "UserName";
                drpManage.DataTextField  = "UserName";
                drpManage.DataBind();
                drpManage.Items.Insert(0, new ListItem("请选择主管名称", ""));

                drpdename.DataSource     = um.SearchManage();
                drpdename.DataValueField = "UserId";
                drpdename.DataTextField  = "UserName";
                drpdename.DataBind();
                drpdename.Items.Insert(0, new ListItem("--空--", ""));

                drpdenameedit.DataSource     = um.SearchManage();
                drpdenameedit.DataValueField = "UserId";
                drpdenameedit.DataTextField  = "UserName";
                drpdenameedit.DataBind();
                drpdenameedit.Items.Insert(0, new ListItem("--空--", ""));
            }
        }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         ControlTemplate.SetPager(Convert.ToInt32(Math.Ceiling(um.SearchPeopleCount() / 10.0)), gdvinfo.PageSize);
         Bind();
         //添加 职位 下拉框
         drponame.DataSource     = pm.GetAllDepart();
         drponame.DataValueField = "DeptID";
         drponame.DataTextField  = "DeptName";
         drponame.DataBind();
         drponame.Items.Insert(0, new ListItem("--请选择--", ""));
         //修改 职位 下拉框
         drponameedit.DataSource     = pm.GetAllDepart();
         drponameedit.DataValueField = "DeptID";
         drponameedit.DataTextField  = "DeptName";
         drponameedit.DataBind();
         drponameedit.Items.Insert(0, new ListItem("--请选择--", ""));
     }
     CheckBoxNew();
 }