Exemplo n.º 1
0
        /// <summary>
        /// 获取某个字典
        /// </summary>
        /// <param name="req"></param>
        /// <returns></returns>
        public string GetDicts(string req)
        {
            try
            {
                reqdata = this.AnaRequestData(req);
                QueryItemCollection[] objs = json.Deserialize <QueryItemCollection[]>(reqdata.reqdata);

                string DOMAINNAMEIDEN = string.Empty;
                string dicttype       = string.Empty;

                for (int i = 0; i < objs.Length; i++)
                {
                    if (objs[i].queryItemKey.ToUpper() == "DOMAINNAMEIDEN".ToUpper())
                    {
                        DOMAINNAMEIDEN = objs[i].queryItemValue;
                    }
                    if (objs[i].queryItemKey.ToUpper() == "dicttype".ToUpper())
                    {
                        dicttype = objs[i].queryItemValue;
                    }
                }

                List <Xxx.Entities.SSY_BIZ_DICT> objResult = this._comSomebiz.GetDicts(DOMAINNAMEIDEN, BizCommon.GetDictType(dicttype), base.envirObj.distManagerParam);

                if (UtilitysForT <Xxx.Entities.SSY_BIZ_DICT> .ListHasData(objResult))
                {
                    resdata = this.MakeResponseData("1", string.Empty, json.Serialize(objResult), string.Empty);
                }
                else
                {
                    resdata = this.MakeResponseData("0", this.GetI18nLangItem("noFindData", this.i18nCommonCurrLang), string.Empty, string.Empty);
                }
            }
            catch (Exception ex)
            {
                resdata = this.MakeResponseData("0", this.GetI18nLangItem("findDataErr", this.i18nCommonCurrLang) + ex.Message, string.Empty, string.Empty);
            }

            return(json.Serialize(resdata));
        }