private void ShowProvinceSchools(NodeEntry selectedNode) { CampusInfoDetail.Visibility = System.Windows.Visibility.Collapsed; SchoolInfoDetail.Visibility = System.Windows.Visibility.Collapsed; this.SchoolInfo.Visibility = System.Windows.Visibility.Visible; List <AMS_ProvinceSchoolInfo> selectedProvince = new List <AMS_ProvinceSchoolInfo>(); foreach (AMS_ProvinceSchoolInfo psi in ModelSchoolList) { if (psi.ID == selectedNode.Id) { selectedProvince.Add(psi); break; } } SchoolInfo.ShowSchoolList(modelSchoolList); }
/// <summary> /// 获取所有学校信息,并转换为树结构显示在ui上 /// </summary> public void GetSchoolList() { try { modelSchoolList = AMS.ServiceProxy.SchoolMainWindow.GetSchoolList();//获取学校信息 //SchoolNodeList = schoolModelListToNodeList(modelSchoolList);//转换为List if (SchoolNodeList != null) { SchoolNodeList = RefriashschoolModelListToNodeList(modelSchoolList, SchoolNodeList); } else { SchoolNodeList = schoolModelListToNodeList(modelSchoolList); } SchoolInfo.ShowSchoolList(modelSchoolList); } catch (Exception ex) { //; } }