void GetData() { UList.Clear(); pufdList.Clear(); pufList.Clear(); strList.Clear(); pufDic.Clear(); pufdDic.Clear(); UList = ub.selectPUsersBll("selectPUsersNotSystemAdimin"); pufList = puf.selectPUsers_FunctionBll("selectPUsers_Function"); pufdList = pufd.selectPUsers_Function_DetailedBll("selectPUsers_Function_Detailed"); strList = ub.selectDistinctPUsersBll("selectDistinctPUsers"); strList.Add("其他"); foreach (Users item in UList) { List <PUsers_Function> list = new List <PUsers_Function>(); List <PUsers_Function_Detailed> list1 = new List <PUsers_Function_Detailed>(); foreach (PUsers_Function pufl in pufList) { if (item.UserName == pufl.UserName) { list.Add(pufl); } } pufDic.Add(item.UserName, list); foreach (PUsers_Function_Detailed pufdl in pufdList) { if (item.UserName == pufdl.UserName) { list1.Add(pufdl); } } pufdDic.Add(item.UserName, list1); } }