Пример #1
0
        public ActionResult AddUserToRole()
        {
            List <RoleUser> list = RequestArgs <List <RoleUser> >();

            if (list == null)
            {
                return(RespondResult(false, "参数无效。"));
            }
            using (List <RoleUser> .Enumerator enumerator = list.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    enumerator.Current.Domain = UserContext.Domain.Id;
                }
            }
            _settingsManager.AddUserToRole(list);
            return(RespondResult());
        }