public ActionResult TransferValue(decimal value, int numberAccount, int typeTransfer, int numberBankAccount) { try { if (numberAccount == numberBankAccount) { return(View()); } bool sucess = _bankAccountApp.Transfer(value, numberAccount, typeTransfer, User.Identity.Name, numberBankAccount); if (sucess) { return(RedirectToAction("Account", "BankAccount")); } else { ViewBag.Status = "Erro ao transferir, o valor requerido excede o saldo"; return(View()); } } catch (Exception ex) { return(View()); } }
public ActionResult TransferValue(decimal value, int numberAccount, int typeTransfer, int numberBankAccount) { try { if (numberAccount == numberBankAccount) { return(View()); } bool sucess = _bankAccountApp.Transfer(value, numberAccount, typeTransfer, User.Identity.Name, numberBankAccount); if (sucess) { return(RedirectToAction("Index", "BankAccount")); } else { return(View()); } } catch (Exception ex) { return(View()); } }