Пример #1
0
        public ParameterData ReadParameter(string parName, string parTag)
        {
            SQL sql = CreateSQL("读取参数配置", "select 参数ID,参数名称,参数标记,参数取值 from 影像参数信息 where 参数名称=:参数名称 and 参数标记=:参数标记");

            sql.AddParameter("参数名称", parName);
            sql.AddParameter("参数标记", parTag);

            DataTable dtPar = sql.ExecuteSql();

            if (dtPar == null || dtPar.Rows.Count <= 0)
            {
                return(null);
            }

            ParameterData parData = new ParameterData();

            parData.BindRowData(dtPar.Rows[0]);

            return(parData);
        }
Пример #2
0
        /// <summary>
        /// 获取规则信息
        /// </summary>
        /// <param name="departmentId"></param>
        /// <returns></returns>
        public JNoRuleInfo GetNoRuleInfo(string departmentId)
        {
            DataTable parInfo = _pm.GetParameterInfo(NoRuleParName, departmentId);

            if (parInfo == null || parInfo.Rows.Count <= 0)
            {
                return(null);
            }

            ParameterData parData = new ParameterData();

            parData.BindRowData(parInfo.Rows[0]);

            JNoRuleInfo noRule = JsonHelper.DeserializeObject <JNoRuleInfo>(parData.参数取值);

            if (noRule == null)
            {
                return(null);
            }

            return(noRule);
        }