Example #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("--空--", ""));
            }
        }
Example #2
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            UserInfo us = Session["user"] as UserInfo;

            ControlTemplate.SetPager(hm.SearchApproveCountByUser(us.UserID, txtSearchTitle.Text, txtSearchStar.Text, txtSearchEnd.Text, rblStatus.SelectedValue), gdvinfo.PageSize);
            Bind(sender, e);
        }
Example #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         UserInfo us = Session["user"] as UserInfo;
         ViewState["sortExpression"] = "ApproveID";
         ViewState["sortDirection"]  = "ASC";
         ControlTemplate.SetPager(hm.SearchApproveCountByManage(us.DeptID.ToString()), gdvinfo.PageSize);
         Bind(sender, e);
     }
 }
Example #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         UserInfo us = Session["user"] as UserInfo;
         ViewState["sortExpression"] = "ApproveID";
         ViewState["sortDirection"]  = "ASC";
         txtApplyName.Text           = LabEditName.Text = LabViewName.Text = us.UserName;
         editId.Value = us.UserID;
         ControlTemplate.SetPager(hm.SearchApproveCountByUser(us.UserID), gdvinfo.PageSize);
         Bind(sender, e);
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         UserInfo User = Session["User"] as UserInfo;
         ControlTemplate.SetPager(UserMa.SearchPeopleInManage(User.UserID.ToString(), 999, 1).Rows.Count, gdvView.PageSize);
         Bind();
         for (int i = DateTime.Now.Year - 3; i <= DateTime.Now.Year + 3; i++)
         {
             DropDownListYear.Items.Add(i.ToString());
         }
         DropDownListYear.SelectedValue  = DateTime.Now.Year.ToString();
         DropDownListMonth.SelectedValue = DateTime.Now.Month.ToString();
         gdvView.DataBind();
     }
 }
Example #6
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();
 }
Example #7
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            string dept = "";

            foreach (CheckBox c in PanelCheckList.Controls)
            {
                if (c.Checked == true)
                {
                    dept += "'" + c.Text.Substring(13) + "',";
                }
            }
            if (dept != "")
            {
                dept = dept.Remove(dept.Count() - 1);
            }
            else
            {
                dept = "";
            }

            ControlTemplate.SetPager(Convert.ToInt32(Math.Ceiling(um.SearchPeopleCount(TxtSearchID.Text, TxtSearchName.Text, dept) / 10.0)), gdvinfo.PageSize);
            Bind();
        }
Example #8
0
 protected void btnSearch_Click(object sender, EventArgs e)
 {
     ControlTemplate.SetPager(Convert.ToInt32(Math.Ceiling(dm.SearchManage(TxtSearchID.Text, drpManage.SelectedValue, gdvinfo.PageSize).Rows.Count / 10.0)), gdvinfo.PageSize);
     Bind();
 }