public ActionResult ChangePassword(int id) { var adminAccountPassword = AdminAccountService.Find(id); if (adminAccountPassword == null) { return(RedirectToAction("Index")); } var adminChangePasswordModels = new AdminChangePassworModels { Id = adminAccountPassword.ID, UserName = adminAccountPassword.UserName }; return(View("ChangePassword", adminChangePasswordModels)); }
public ActionResult Edit(int id) { var adminEdit = AdminAccountService.Find(id); if (adminEdit == null) { return(Redirect("Index")); } var model = new AdminModels { Id = adminEdit.ID, UserName = adminEdit.UserName, Email = adminEdit.Email, FullName = adminEdit.FullName, Role = adminEdit.Role ?? 0, Status = adminEdit.Status ?? false, Type = adminEdit.Type ?? 0, AvatarUrl = adminEdit.Avatar }; ViewBag.ListRole = RoleService.GetAll(); ViewBag.ListAccountType = DataHelper.ListEnumType <AccountType>(); return(View("Edit", model)); }