Ejemplo n.º 1
0
        /// <summary>
        /// 产品财产所在地
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>

        public ProductPropertyAreaResp GetProductPropertyArea(ProductPropertyAreaReq model)
        {
            try
            {
                string methodName = "getProductPropertyArea";
                model.customkey = Customkey;//costomKey!=Customkey ?
                string strJson   = SerializerHelper.ToJson(model);
                string sign      = UtilityHelper.Utils.MD5(VI + strJson);
                string url       = URLBaseMoFang + methodName + ".html?sign=" + sign;
                string retrunStr = UtilityHelper.HttpService.GetHttpWebResponseByRestSharp(url, strJson);
                ProductPropertyAreaResp outModel = new ProductPropertyAreaResp();
                outModel = SerializerHelper.FromJsonTo <ProductPropertyAreaResp>(retrunStr);
                if (outModel.respstat != "0000")
                {
                    ReceivedLog(model.transNo, "GetProductPropertyArea", outModel.respmsg);
                }
                return(outModel);
            }
            catch (Exception ex)
            {
                ExceptionLogBLL.WriteExceptionLogToDB(ex.ToString());

                return(null);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取产品财产所在地
        /// </summary>
        static public Object GetProductPropertyArea()
        {
            string result = string.Empty;

            try
            {
                #region 获取列表

                BaoxianDataBLL         baoxianDataBLL = new BaoxianDataBLL();
                ProductPropertyAreaReq model          = new ProductPropertyAreaReq();
                model.transNo  = DNTRequest.GetString("transNo");
                model.caseCode = DNTRequest.GetString("caseCode");
                model.areaCode = DNTRequest.GetString("areaCode");
                ProductPropertyAreaResp res = baoxianDataBLL.GetProductPropertyArea(model);

                object obj = new
                {
                    result = true,
                    msg    = "",
                    data   = res.areas,
                };
                result = Newtonsoft.Json.JsonConvert.SerializeObject(obj);

                #endregion
            }
            catch (Exception ex)
            {
                result = DNTRequest.GetResultJson(false, "操作异常,请稍候再试", null);
                Log.WriteLog(" " + ex);
            }
            return(result);
        }