public async Task <IActionResult> EditUserModal(string userId) { //string id = User.GetUserId(); HotelUser user = await _userManager.FindByIdAsync(userId); if (user == null) { return(NotFound()); } //ViewData["UserGroupId"] = new SelectList(_companyuser_repo.GetUserGroups(User.GetCompanyID()).Result, "Id", "Name", user.UserGroupId); //ViewData["UserSubGroupId"] = new SelectList(_companyuser_repo.GetUserSubGroups(User.GetCompanyID()).Result, "Id", "Name", user.UserSubGroupId); //ViewData["UserType"] = EnumHelper<UserTypeEnum>.GetSelectListWithIntegerValues(user.UserTypeEn,_localizer).ToList() ; var model = _companyuser_repo.GetUpdateUserModel(user); model.AutoLoginUrl = Url.Action("AutoLogon", "Account", new { token = model.AutoLoginToken, username = model.UserName }, Request.Scheme); //return PartialView(model); return(PartialView("EditUserModal", model)); }