コード例 #1
0
ファイル: InvestController.cs プロジェクト: yonglehou/ace-1
        public async Task<ActionResult> Create(InvestViewModel vm)
        {
            var action = new InvestmentCreateRequest(_sequenceService.Next(SequenceID.ACE_Investment, 1), vm.AccountId, vm.ProjectId, vm.Amount);

            var response = await ActionBus.SendAsyncWithRetry<InvestmentActionBase, InvestmentCreateRequest>(action, 3);
            TempData["ActionResponse"] = response;
            return RedirectToAction("Index", new { id = action.InvestmentId });
        }
コード例 #2
0
        public async Task <ActionResult> Create(InvestViewModel vm)
        {
            var action = new InvestmentCreateRequest(_sequenceService.Next(SequenceID.ACE_Investment, 1), vm.AccountId, vm.ProjectId, vm.Amount);

            var response = await ActionBus.SendAsyncWithRetry <InvestmentActionBase, InvestmentCreateRequest>(action, 3);

            TempData["ActionResponse"] = response;
            return(RedirectToAction("Index", new { id = action.InvestmentId }));
        }
コード例 #3
0
ファイル: InvestController.cs プロジェクト: yonglehou/ace-1
        public ActionResult Create(InvestViewModel vm)
        {
            var action = new InvestmentCreateRequest(_sequenceService.Next(SequenceID.ACE_Investment, 1), vm.AccountId, vm.ProjectId, vm.Amount);

            try
            {
                ActionStation.Invoke<InvestmentCreateRequest>(action);
            }
            catch (BusinessException ex)
            {
                TempData["ActionResponse"] = ex.Message;
            }
            return RedirectToAction("Index", new { id = action.InvestmentId });
        }
コード例 #4
0
ファイル: InvestController.cs プロジェクト: sskset/ace
        public ActionResult Create(InvestViewModel vm)
        {
            var action = new InvestmentCreateRequest(_sequenceService.Next(SequenceID.ACE_Investment, 1), vm.AccountId, vm.ProjectId, vm.Amount);

            try
            {
                ActionStation.Invoke <InvestmentCreateRequest>(action);
            }
            catch (BusinessException ex)
            {
                TempData["ActionResponse"] = ex.Message;
            }
            return(RedirectToAction("Index", new { id = action.InvestmentId }));
        }
コード例 #5
0
ファイル: InvestController.cs プロジェクト: yonglehou/ace-1
        public async Task<ActionResult> Create(InvestViewModel vm)
        {
            var action = new InvestmentCreateRequest
            {
                InvestmentId = _sequenceService.Next(SequenceID.ACE_Investment, 1),
                AccountId = vm.AccountId,
                ProjectId = vm.ProjectId,
                Amount = vm.Amount
            };

            var response = await ServiceLocator.ActionBus.SendAsync(action);
            //var response = ServiceLocator.ActionBus.Send(action);
            TempData["ActionResponse"] = response;
            return RedirectToAction("Index", new { id = action.InvestmentId });
        }
コード例 #6
0
ファイル: InvestController.cs プロジェクト: sskset/ace
        public async Task <ActionResult> Create(InvestViewModel vm)
        {
            var action = new InvestmentCreateRequest
            {
                InvestmentId = _sequenceService.Next(SequenceID.ACE_Investment, 1),
                AccountId    = vm.AccountId,
                ProjectId    = vm.ProjectId,
                Amount       = vm.Amount
            };

            var response = await ServiceLocator.ActionBus.SendAsync(action);

            //var response = ServiceLocator.ActionBus.Send(action);
            TempData["ActionResponse"] = response;
            return(RedirectToAction("Index", new { id = action.InvestmentId }));
        }