Exemplo n.º 1
0
        public ActionResult <WithdrawRequestCreatePrepareVM> CreatePrepare()
        {
            try
            {
                var curUser       = accountUtil.GetCurrentUser(User);
                var talent        = TalentService.GetByUserID(curUser.ID);
                int talentBalance = TalentBalanceService.GetBalance(talent);

                WithdrawRequestCreatePrepareVM createPrepareVM = new WithdrawRequestCreatePrepareVM(
                    WithdrawRequestService.UserHasNotEnoughtMoneyForWithdrawal(talentBalance),
                    WithdrawRequestService.GetMinimalAmountInBalanceForWithdrawal(),
                    talentBalance,
                    WithdrawRequestStatusService.GetAsSelectList());

                return(createPrepareVM);
            }
            catch (Exception ex)
            {
                return(CustomBadRequest(ex));
            }
        }
Exemplo n.º 2
0
        public IActionResult Index()
        {
            ViewData["statuses"] = WithdrawRequestStatusService.GetAsSelectList();

            return(View());
        }