示例#1
0
        public IActionResult Create(SDHCCUserPass model, IEnumerable <string> selectRoles)
        {
            var user = model.ConvertPassToUser();

            users.CreateUser(user);
            if (!String.IsNullOrEmpty(user.Id))
            {
                users.UpdateUserRole(user, selectRoles);
            }
            else
            {
                return(View(model));
            }
            return(RedirectToAction("Detail", "User", new { @area = "Admin", @id = user.Id }));
        }