示例#1
0
        /// <summary>
        /// 通过文件导入基站信息
        /// </summary>
        /// <param name="filePath"></param>
        /// <param name="devBlls"></param>
        /// <param name="topoTree"></param>
        /// <returns></returns>
        public static bool ImportLocationDeviceFromFile(string filePath, ArchorBll archorBll, AreaBll topoTree)
        {
            if (!File.Exists(filePath) || archorBll == null || topoTree == null)
            {
                return(false);
            }
            LocationDeviceList initInfo = XmlSerializeHelper.LoadFromFile <LocationDeviceList>(filePath);

            foreach (var devArea in initInfo.DepList)
            {
                Area topo = topoTree.FindByName(devArea.Name);
                if (topo == null)
                {
                    continue;
                }
                AddLocationDev(devArea.DevList, archorBll, topo);
            }
            return(true);
        }