/// <summary>
 /// 查询用户配置信息
 /// </summary>
 /// <returns></returns>
 public ConfigInfo GetUserCfg()
 {
     string strSql = "select content,updatetime from userconfig";
     DataTable dt = _idbRead.ExecuteDataTable(strSql);
     ConfigInfo cfg = new ConfigInfo();
     if (dt != null && dt.Rows.Count > 0)
     {
         cfg.SN = string.Empty;
         cfg.Content = (string)dt.Rows[0][0];
         cfg.Time = SystemHelper.GetTimeByUtcTicks((long)dt.Rows[0][1]);
     }
     return cfg;
 }
        private void UpdateBrightnessSyncData(string id, ConfigInfo smartLightConfigInfo)
        {
            var smartLightConfig = CommandTextParser.GetDeJsonSerialization<SmartLightConfigInfo>(smartLightConfigInfo.Content);
            var brightnessConfig = new BrightnessConfig(smartLightConfig);
            var brightnessJson = CommandTextParser.GetJsonSerialization<BrightnessConfig>(brightnessConfig);

            _fLogService.Debug(string.Format("<-{0}->:ThreadID={1}", "UpdateBrightnessSyncData", System.Threading.Thread.GetDomainID().ToString()));
            ClientDispatcher.Instance.UpdateSyncData(
                        id,
                        new SyncData() { SyncType = SyncType.BrightnessRuleConfig, SyncParam = SyncFlag.Synchronized, SyncContent = brightnessJson, Datestamp = SystemHelper.GetUtcTicksByDateTime(smartLightConfigInfo.Time).ToString() });
        }
 /// <summary>
 /// 查询点检配置信息
 /// </summary>
 /// <returns></returns>
 public List<ConfigInfo> GetPointDetectCfg(string ledSN)
 {
     List<ConfigInfo> configInfoList = new List<ConfigInfo>();
     ConfigInfo cfg;
     string strSql = "select sn,content,updatetime from pointdetectconfig";
     if (ledSN != string.Empty) strSql += " where sn=" + "'" + ledSN + "'" + ";";
     else strSql += ";";
     DataTable dt = _idbRead.ExecuteDataTable(strSql);
     if (dt == null || dt.Rows.Count == 0) return configInfoList;
     for (int i = 0; i < dt.Rows.Count; i++)
     {
         cfg = new ConfigInfo();
         cfg.SN = (string)dt.Rows[i][0];
         cfg.Content = (string)dt.Rows[i][1];
         cfg.Time = SystemHelper.GetTimeByUtcTicks((long)dt.Rows[i][2]);
         configInfoList.Add(cfg);
     }
     return configInfoList;
 }