示例#1
0
        /// <summary>
        /// 查询往来单位分类
        /// </summary>
        /// <returns></returns>
        public string QueryPartnerClass()
        {
            var request  = new PartnerClassQueryRequest();
            var parmsDic = new Dictionary <string, object>();
            var parms    = new BaseQueryEntity()
            {
                param = new Param {
                }
            };

            parmsDic.Add("_args", JsonConvert.SerializeObject(parms));
            request.SetPostParameters(parmsDic);
            var result = _Client.Excute <JArray>(request);

            if (result != null)
            {
                var entity = JsonConvert.DeserializeObject <List <PartnerClassQueryEntity> >(result.ToString());
                if (entity != null && entity.FirstOrDefault() != null)
                {
                    return(entity.FirstOrDefault().Code);
                }
                else
                {
                    return("");
                }
            }
            else
            {
                return("");
            }
        }
示例#2
0
        public List <CommonQueryResult> QueryAllPartnerClass()
        {
            var request  = new PartnerClassQueryRequest();
            var parmsDic = new Dictionary <string, object>();
            var parms    = new BaseQueryEntity()
            {
                param = new Param {
                }
            };

            parmsDic.Add("_args", JsonConvert.SerializeObject(parms));
            request.SetPostParameters(parmsDic);
            var result = _Client.Excute <JArray>(request);
            var list   = new List <CommonQueryResult>();

            if (result != null)
            {
                list = JsonConvert.DeserializeObject <List <CommonQueryResult> >(result.ToString());
            }
            return(list);
        }