Beispiel #1
0
        /// <summary>
        /// 把学校信息转换成ListView上显示的数据结构
        /// </summary>
        /// <param name="provinceSchools"></param>
        public void ShowSchoolList(List <AMS.Model.AMS_ProvinceSchoolInfo> provinceSchools)
        {
            List <SchoolInfo> schoolInfoList = new List <SchoolInfo>();

            for (int i = 0; i < provinceSchools.Count; i++)
            {
                foreach (AMS.Model.AMS_School school in provinceSchools[i].Schools)
                {
                    SchoolInfo schoolInfo = new SchoolInfo();
                    schoolInfo.Province        = provinceSchools[i].ProvinceName;
                    schoolInfo.Id              = school.Id;
                    schoolInfo.Name            = school.Name;
                    schoolInfo.Number          = school.Number;
                    schoolInfo.InstallDate     = school.InstallDate;
                    schoolInfo.LinkMan         = school.LinkMan;
                    schoolInfo.CampusCount     = school.Campus.Count;
                    schoolInfo.InstallMan      = school.InstallMan;
                    schoolInfo.Isbook          = school.IsSeatBespeak;
                    schoolInfo.InterfaceInfo   = school.InterfaceInfo;
                    schoolInfo.CardInfo        = school.CardInfo;
                    schoolInfo.ExecuteProgress = school.ExecuteProgress;
                    schoolInfo.Address         = school.LinkAddress;
                    foreach (AMS.Model.AMS_Campus campus in school.Campus)
                    {
                        schoolInfo.DeviceCount += campus.Device.Count;
                    }
                    schoolInfoList.Add(schoolInfo);
                }
            }
            SchoolInfoList = schoolInfoList;
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
 /// <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)
     {
         //;
     }
 }