public ActionResult ViewUser(string userCode) { SysUserDAO userDAO = new SysUserDAO(this.mapper); SysUserViewModels model = new SysUserViewModels(); model = userDAO.getUserView(userCode, model); return View(model); }
public ActionResult SaveAccess(SysUserViewModels model) { MstIndexTypeUserDAO indexTypeUserDAO = new MstIndexTypeUserDAO(this.mapper); SysUserModels userSession = (SysUserModels) Session["UserSession"]; if (indexTypeUserDAO.SaveIndexTypeUser(model, userSession.userCode, Constants.TransactionType.Bank)) { return RedirectToAction("ViewUser", "User", new { userCode = model.userCode }); } else { SysUserDAO userDAO = new SysUserDAO(this.mapper); model = userDAO.getUserView(model.userCode, model); return View("ViewUser", model); } }