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 = mvcControllerClassRepository.GetList(e => idList.Contains(e.Id)).ToList();
                if (delete != null && delete.Count > 0)
                {
                    res = Delete(delete, operUser);
                }
            }
            return(res);
        }
        public iPow.Infrastructure.Crosscutting.Authorize.Dto.MvcControllerDto GetControllerSingDto(int id)
        {
            var res = controllerRepository.GetList(e => e.Id == id).Select(e => new iPow.Infrastructure.Crosscutting.Authorize.Dto.MvcControllerDto()
            {
                Id = e.Id,
                AssemblyFullName = e.AssemblyFullName,
                Name             = e.Name,
                Remark           = e.Remark,
                AddTime          = e.AddTime,
                IpAddress        = e.IpAddress,
                State            = e.State,
                SortNum          = e.SortNum,
                ClassName        = controllerClassRepository.GetList(d => d.Id == e.ClassId).FirstOrDefault() != null ?
                                   controllerClassRepository.GetList(d => d.Id == e.ClassId).FirstOrDefault().Name : "暂无分类",
            }).FirstOrDefault();

            return(res);
        }
        public bool Delete(List <int> userIdList)
        {
            var data = controllerClassRepository.GetList(e => userIdList.Contains(e.Id));

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

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