예제 #1
0
        private void SectionBind()
        {
            BLL.Section bll = new BLL.Section();

            List <Model.SectionView> list = bll.GetListByOrder(0);

            this.ddlSection.Items.Clear();
            this.ddlSection.Items.Add(new ListItem("请选择部门...", ""));
            foreach (var m in list)
            {
                string Id         = m.Id.ToString();
                int    ClassLayer = m.LevelNum;
                string Title      = m.Name;

                if (ClassLayer == 1)
                {
                    this.ddlSection.Items.Add(new ListItem(Title, Id));
                }
                else
                {
                    Title = "├ " + Title;
                    Title = Utils.StringOfChar(ClassLayer - 1, " ") + Title;
                    this.ddlSection.Items.Add(new ListItem(Title, Id));
                }
            }
        }
예제 #2
0
        //数据绑定
        private void RptBind()
        {
            BLL.Section B_Sect            = new BLL.Section();
            List <Model.SectionView> list = B_Sect.GetListByOrder(0);

            rptList.DataSource = list;
            rptList.DataBind();
        }