public ActionResult Edit(string id) { sp_AccountSelect_Result model = new sp_AccountSelect_Result(); var accountData = AccountBusinessLogic.getInstance().getAccountById(id); model.AccountId = accountData.AccountId; model.AccountName = accountData.AccountName; model.AccountNo = accountData.AccountNo; return(View(model)); }
public ActionResult Edit(sp_AccountSelect_Result model) { if (AccountBusinessLogic.getInstance().UpdateAccount(model) == -1) { TempData["Success"] = "Account was successfully updated"; } else { TempData["Error"] = "Account was unsuccessfully updated"; } return(RedirectToAction("Index")); }
public int UpdateAccount(sp_AccountSelect_Result model) { return(_db.sp_AccountUpdate(model.AccountId, model.AccountNo, model.AccountName, SessionManager.userId())); }