Пример #1
0
        public string GetDataValue(string regName, string key)
        {
            AtawDebug.AssertArgumentNullOrEmpty(regName, "亲,请求选择器数据源的注册名不可以为空哦", this);
            AtawDebug.AssertArgumentNullOrEmpty(regName, "亲,请求的值不可以为空哦", this);
            var    dt   = GetCodeTableInstance(regName);
            string _res = dt[key].CODE_TEXT;

            return(ReturnJson(_res));
        }
Пример #2
0
        public string FillData(string regName)
        {
            AtawDebug.AssertArgumentNullOrEmpty(regName, "亲,请求选择器数据源的注册名不可以为空哦", this);
            // regName = regName ?? "";
            var dt  = GetCodeTableInstance(regName);
            var res = dt.FillData(null);

            return(ReturnJson(res == null ? new List <CodeDataModel>() : res.ToList()));
        }
Пример #3
0
        public string GetDataValueList(string regName, string key)
        {
            AtawDebug.AssertArgumentNullOrEmpty(regName, "亲,请求选择器数据源的注册名不可以为空哦", this);
            AtawDebug.AssertArgumentNullOrEmpty(regName, "亲,请求的值不可以为空哦", this);
            var dt = GetCodeTableInstance(regName);
            Dictionary <string, string> dict = new Dictionary <string, string>();

            string[] keys = key.Split(',');

            keys.ToList().ForEach((a) => {
                var _bean = dt[a];
                if (_bean != null)
                {
                    dict.Add(_bean.CODE_VALUE, _bean.CODE_TEXT);
                }
                // dict.Add();
            });

            return(ReturnJson(dict));
        }