public static List <SelectControlData> GetTestData()
        {
            List <SelectControlData> list = new List <SelectControlData>();
            SelectControlData        item = new SelectControlData {
                id       = 1,
                pId      = 0,
                name     = "开发部",
                userlist = GetTest(1)
            };

            list.Add(item);
            SelectControlData data2 = new SelectControlData {
                id       = 2,
                pId      = 1,
                name     = "开发1部",
                userlist = GetTest(2)
            };

            list.Add(data2);
            SelectControlData data3 = new SelectControlData {
                id       = 3,
                pId      = 0,
                name     = "人事部",
                userlist = GetTest(3)
            };

            list.Add(data3);
            return(list);
        }
        public static void AddDepUser(SelectControlData item, List <SelectControlData> allDep, List <NameValues> userList)
        {
            IEnumerable <NameValues> collection = from p in userList
                                                  where p.DepID == item.id
                                                  select p;

            if (collection != null)
            {
                item.userlist.AddRange(collection);
            }
        }