Beispiel #1
0
        public bool Delete(IList <int> idList, iPow.Infrastructure.Data.DataSys.Sys_AdminUser operUser)
        {
            var res = false;

            if (idList != null && idList.Count > 0)
            {
                var delete = mvcControllerRepository.GetList(e => idList.Contains(e.Id)).ToList();
                if (delete != null && delete.Count > 0)
                {
                    res = Delete(delete, operUser);
                }
            }
            return(res);
        }
Beispiel #2
0
        public IQueryable <iPow.Infrastructure.Crosscutting.Authorize.Dto.MvcControllerActionDto> GetActionDtoList()
        {
            var res = actionRepository.GetList().Select(e => new iPow.Infrastructure.Crosscutting.Authorize.Dto.MvcControllerActionDto()
            {
                Id             = e.Id,
                Name           = e.Name,
                Remark         = e.Remark,
                AddTime        = e.AddTime,
                IpAddress      = e.IpAddress,
                State          = e.State,
                SortNum        = e.SortNum,
                ControllerName = controllerRepository.GetList(d => d.Id == e.ControllerId).FirstOrDefault() != null ?
                                 controllerRepository.GetList(d => d.Id == e.ControllerId).FirstOrDefault().Name : "暂无分类",
            }).AsQueryable();

            return(res);
        }
Beispiel #3
0
        public bool Delete(List <int> userIdList)
        {
            var data = controllerRepository.GetList(e => userIdList.Contains(e.Id));

            foreach (var item in data)
            {
                controllerRepository.Delete(item);
            }
            var res = false;

            try
            {
                controllerRepository.Uow.Commit();
                res = true;
            }
            catch (Exception ex)
            {
            }
            return(res);
        }