Exemple #1
0
        public ActionResult ApplyCash(ApplyCashModel model)
        {
            var customer    = _customerService.GetCustomerId(model.CustomerId);
            var commissions = customer.GetCustomerAttributeValue <decimal>(CustomerAttributeNames.Commission);
            var entity      = model.MapTo <ApplyCash>();

            entity.CreationTime = DateTime.Now;
            entity.CustomerId   = this.CustomerId;
            entity.Allowance    = commissions - model.Amount;

            _applyCashService.InsertApplyCash(entity);

            return(RedirectToAction("ResultNotity", "Common", new { contextValue = "您的提现申请已经申请完毕,请等待", url = "/Customer/Center" }));
        }
Exemple #2
0
        //[CustomerAntiForgery]
        public ActionResult ApplyCash()
        {
            var customer   = _customerService.GetCustomerId(this.CustomerId);
            var commission = customer.GetCustomerAttributeValue <decimal>(CustomerAttributeNames.Commission);

            if (commission <= 0)
            {
                return(RedirectToAction("Center"));
            }

            var model = new ApplyCashModel
            {
                Allowance  = commission,
                CustomerId = this.CustomerId,
                Audit      = (int)AuditStatus.None,
            };

            return(View(model));
        }