예제 #1
0
        /// <summary>
        /// 异地
        /// </summary>
        /// <param name="methodName"></param>
        /// <param name="baseParam"></param>
        /// <returns></returns>
        public string DifferentPlacesMedicalInsuranceMethod(string methodName, string baseParam)
        {
            string resultData = null;
            var    data       = WorkersMedicalInsurance.ConnectAppServer_cxjb("cpq2677", "888888");
            string strClass   = "BenDingActive.Service.SingleResidentMedicalInsuranceService";         // 命名空间+类名

            resultData = MethodExecute(strClass, methodName, baseParam);
            return(resultData);
        }
        /// <summary>
        /// 获取个人基础资料
        /// </summary>
        /// <param name="param"></param>

        public string GetUserInfo(string param)
        {
            var resultData = new ApiJsonResultDatas {
                Code = true
            };
            var data = new IniDto();

            try
            {
                var dataIni = WorkersMedicalInsurance.ConnectAppServer_cxjb("cpq2677", "888888");
                if (dataIni == 1)
                {
                    // var paramIni= JsonConvert.DeserializeObject<UserInfoParam>(param);
                    var xmlStr = XmlHelp.SaveXml(param);
                    if (xmlStr)
                    {
                        int result = WorkersMedicalInsurance.CallService_cxjb("CXJB001");
                        if (result == 1)
                        {
                            data = XmlHelp.DeSerializerModels(new UserInfoDto());
                            if (data.PO_FHZ == "1")
                            {
                                resultData.Data = JsonConvert.SerializeObject(data);
                            }
                            else
                            {
                                throw new Exception(data.PO_MSG);
                            }
                        }
                        else
                        {
                            throw new Exception("系统登录失败!!!");
                        }
                    }
                }
            }
            catch (Exception e)
            {
                resultData.Code    = false;
                resultData.Message = e.Message;
                Logs.LogWrite(new LogParam()
                {
                    Msg = e.Message,

                    Params     = Logs.ToJson(param),
                    ResultData = Logs.ToJson(data)
                });
            }

            return(JsonConvert.SerializeObject(resultData));
        }
예제 #3
0
 public static void  Connect()
 {
     WorkersMedicalInsurance.ConnectAppServer_cxjb("cpq2677", "888888");
 }