コード例 #1
0
        public async Task <ApiResult> VerifyLegalPerson(string uniscid, string FRZJH)
        {
            ApiResult     apiresult = new ApiResult();
            LoginResponse loginRes  = new LoginResponse();

            try
            {
                loginRes = await DataAccess.DataBase.FsApiReader.Login(_login);

                if (loginRes.success)
                {
                    var legalRes = await DataAccess.DataBase.FsApiReader.VerifyLegalMsg(new VerifyLegalRequest(loginRes, uniscid, FRZJH));

                    if (legalRes.success)
                    {
                        apiresult.AddMsg(true, null, null);
                    }
                    else
                    {
                        apiresult.AddMsg(false, "VerifyLegalPerson验证数据错误:" + legalRes.message, null);
                    }
                }
                else
                {
                    apiresult.AddMsg(false, "VerifyLegalPerson登陆错误:" + loginRes.message, null);
                }
            }
            catch (Exception ex)
            {
                apiresult.AddMsg(false, "VerifyLegalPerson未知错误:" + ex.ToString(), null);
            }
            return(apiresult);
        }
コード例 #2
0
        public async Task <ApiResult> GetByZch(string zch)
        {
            ApiResult     apiresult = new ApiResult();
            LoginResponse loginRes  = new LoginResponse();

            try
            {
                loginRes = await DataAccess.DataBase.GzApiReader.Login(_login);

                if (loginRes.ack_code.Equals("SUCCESS"))
                {
                    var legalRes = await DataAccess.DataBase.GzApiReader.GetLegal(new GetLegalRequest(loginRes, zch, null));

                    if (legalRes.ack_code.Equals("SUCCESS"))
                    {
                        apiresult.AddMsgSingle(true, null, legalRes.data);
                    }
                    else
                    {
                        apiresult.AddMsgSingle(false, new ErrorMsg("GetLegalPerson错误", "获取数据错误"), null);
                        apiresult.AddMsg(false, legalRes.errors, null);
                    }
                }
                else
                {
                    apiresult.AddMsgSingle(false, new ErrorMsg("GetLegalPerson错误", "登陆错误"), null);
                    apiresult.AddMsg(false, loginRes.errors, null);
                }
            }
            catch (Exception ex)
            {
                apiresult.AddMsgSingle(false, new ErrorMsg("GetLegalPerson未知错误", ex.ToString()), null);
            }
            return(apiresult);
        }