private void InitDevMonitorNode()
        {
            //导入设备监控节点
            Log.Info("导入设备监控节点");
            string basePath = AppDomain.CurrentDomain.BaseDirectory;

            Log.Info("BaseDirectory:" + basePath);
            string filePath = basePath + "Data\\EDOS.xls";

            DevInfoHelper.ImportDevMonitorNodeFromFile <DevMonitorNode>(new FileInfo(filePath));
        }
Exemple #2
0
        /// <summary>
        /// 导入设备监控节点
        /// </summary>
        private void InitDevMonitorNode()
        {
            Log.Info(LogTags.DbInit, "导入设备监控节点");
            string basePath = AppDomain.CurrentDomain.BaseDirectory;

            Log.Info(LogTags.DbInit, "BaseDirectory:" + basePath);
            //string filePath = basePath + "Data\\KKS\\EDOS.xls";
            string filePath = basePath + "Data\\KKS\\" + DbModel.AppSetting.ParkName + "\\EDOS_New.xls";

            DevInfoHelper.ImportDevMonitorNodeFromFile <DevMonitorNode>(new FileInfo(filePath), false);
        }
Exemple #3
0
        /// <summary>
        /// 将分析出来保存的测点信息(EDOS_New.xls)保存到数据库中
        /// </summary>
        public static void SaveMonitorPoint()
        {
            try
            {
                DateTime start = DateTime.Now;

                Log.Info(LogTags.KKS, "导入设备监控节点");
                string basePath = AppDomain.CurrentDomain.BaseDirectory;
                Log.Info(LogTags.KKS, "BaseDirectory:" + basePath);
                //string filePath = basePath + "Data\\KKS\\EDOS.xls";
                string filePath = basePath + "Data\\KKS\\EDOS_New.xls";
                DevInfoHelper.ImportDevMonitorNodeFromFile <DbModel.Location.AreaAndDev.DevMonitorNode>(
                    new FileInfo(filePath), true);

                TimeSpan time = DateTime.Now - start;
                Log.Info(LogTags.KKS, string.Format("【3】【SaveMonitorPoint】完成 用时:{0}", time));
            }
            catch (Exception ex)
            {
                Log.Error(LogTags.KKS, "导入测点失败:" + ex.Message);
            }
        }