public AddPolicyCustomerRelationResponseViewModel AddPolicyCustomerRelation(
            AddPolicyCustomerRelationRequestViewModel request)
        {
            bool flag =
                _addPolicyCustomerRelationServiceBll.AddPolicyCustomerRelation(new CorpPolicyConfigCustomerModel()
            {
                CidList  = request.CidList,
                PolicyId = request.PolicyId
            });

            return(new AddPolicyCustomerRelationResponseViewModel()
            {
                IsSuccessed = flag
            });
        }
Example #2
0
        public async Task <ResponseBaseViewModel <AddPolicyCustomerRelationResponseViewModel> > AddPolicyCustomerRelation(
            [FromBody] AddPolicyCustomerRelationRequestViewModel request)
        {
            request.Cid = this.GetCid();
            AddPolicyCustomerRelationResponseViewModel viewModel = new AddPolicyCustomerRelationResponseViewModel();

            await new TaskFactory().StartNew(() =>
            {
                viewModel = _addPolicyCustomerRelationApplication.AddPolicyCustomerRelation(request);
            });

            ResponseBaseViewModel <AddPolicyCustomerRelationResponseViewModel> v = new ResponseBaseViewModel
                                                                                   <AddPolicyCustomerRelationResponseViewModel>
            {
                Flag = new ResponseCodeViewModel()
                {
                    Code = 0, MojoryToken = this.GetToken()
                },
                Data = viewModel
            };

            return(v);
        }