Exemplo n.º 1
0
        public ActionResult Deposit(Account acc)
        {
            string returnUrl = Url.Content("~/Customer/Index");

            try
            {
                bool successful = _accountBl.AddDeposit(acc.Balance, acc.AccountNum);

                if (successful)
                {
                    return(LocalRedirect(returnUrl));
                }
                else
                {
                    returnUrl = Url.Content("~/Account/Error");
                    return(LocalRedirect(returnUrl));
                }
            }
            catch
            {
                return(LocalRedirect(returnUrl));
            }
        }