public ActionResult WithdrawalAmount(SavingsTransactionEntity s, SavingsAccountEntities e) { if (Convert.ToInt32(s.Amount) <= 1) { ViewData["status"] = "Amount Invalid"; return(View()); } else { int res = ob.WithdrawalAmount(s, s.AccountId); if (res == 0) { ViewData["status"] = "INVALID ACCOUNT NUMBER"; return(View()); } else if (res == -1) { ViewData["status"] = "INSUFFICIENT AMOUNT "; return(View()); } else { ViewData["status"] = "WITHDRAWAL SUCCESSFULL"; return(View()); } } return(View()); }
public ActionResult DepositAmount(SavingsTransactionEntity s, SavingsAccountEntities e) { if (ModelState.IsValid) { if (Convert.ToInt32(s.Amount) <= 1000) { ViewData["status"] = "Amount cannot be less than 1000"; return(View()); } else { int res = ob.DepositAmount(s, s.AccountId); if (res > 0) { ViewData["status"] = "DEPOSIT SUCCESSFULL"; return(View()); } else { ViewData["status"] = "ENTER VALID ACCOUNTID"; return(View()); } } return(View()); } else { return(View()); } }