Exemple #1
0
        /// <summary>
        /// 产品可投保区域
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public ProductDestinationResp ProductInsuredArea(ProductInsuredAreaReq model)
        {
            try
            {
                string methodName = "productInsuredArea";
                model.customkey = 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);
                ProductDestinationResp outModel = new ProductDestinationResp();
                outModel = SerializerHelper.FromJsonTo <ProductDestinationResp>(retrunStr);
                if (outModel.respstat != "0000")
                {
                    ReceivedLog(model.transNo, "ProductInsuredArea", outModel.respmsg);
                }
                return(outModel);
            }
            catch (Exception ex)
            {
                ExceptionLogBLL.WriteExceptionLogToDB(ex.ToString());

                return(null);
            }
        }
Exemple #2
0
        /// <summary>
        /// 获取产品可投保区域省市区
        /// </summary>
        static public Object GetRegion()
        {
            string result = string.Empty;

            try
            {
                #region 获取列表

                BaoxianDataBLL        baoxianDataBLL = new BaoxianDataBLL();
                ProductInsuredAreaReq model          = new ProductInsuredAreaReq();
                model.transNo  = DNTRequest.GetString("transNo");
                model.caseCode = DNTRequest.GetString("caseCode");
                model.areaCode = DNTRequest.GetString("areaCode");
                ProductDestinationResp res = baoxianDataBLL.ProductInsuredArea(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);
        }