/// <summary>
        /// 获取字典内容信息(单行string版本)
        /// </summary>
        /// <returns></returns>
        public string GetDictContentInfoOneOutput(string sDicName)
        {
            JDictionary dict = GetDictionary(sDicName);

            if (dict == null)
            {
                return("");
            }

            return(dict.ToString());
        }
Example #2
0
        public DictManageData(DataRow r)
        {
            _bindRow = r;

            if (_DictInfoRow == null)
            {
                _DictInfoRow = new BizRow();

                _DictInfoRow.OnJsonConvert += ConvertJson;
            }

            if (r != null)
            {
                _DictInfoRow.RowConvert(r, this, true);
            }
            else
            {
                字典 = new JDictionary();
            }
        }
        /// <summary>
        /// 获取字典项目
        /// </summary>
        /// <param name="dictionaryName"></param>
        /// <param name="itemName"></param>
        /// <returns></returns>
        public JDictionaryItem GetDictionaryItemInfo(string dictionaryName, string itemName)
        {
            JDictionary dict = GetDictionary(dictionaryName);

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

            if (dict.项目内容.Count <= 0)
            {
                return(null);
            }

            int dictIndex = (dict.项目内容 as List <JDictionaryItem>).FindIndex(T => T.项目名称 == itemName);

            if (dictIndex < 0)
            {
                return(null);
            }

            return(dict.项目内容[dictIndex]);
        }
 protected override void InitJsonInstance()
 {
     字典信息 = new JDictionary();
 }