Exemplo n.º 1
0
        /// <summary>
        /// Gets the comm list.
        /// </summary>
        /// <param name="artId">The art id.</param>
        /// <returns></returns>
        public IQueryable <iPow.Domain.Dto.Sys_ArticleCommDto> GetArticleCommListByArtId(int?artId, int pageIndex, int take, ref int total)
        {
            IQueryable <iPow.Infrastructure.Data.DataSys.Sys_ArticleComm> ac = null;
            var temp = articleCommRepository.GetList(e => e.ArticleID == artId).OrderByDescending(e => e.AddTime);

            total = temp.Count();
            ac    = temp.Skip(((pageIndex - 1) > 0 ? (pageIndex - 1) : 0) * take).Take(take).AsQueryable();
            return(ac.ToDto().AsQueryable());
        }
Exemplo n.º 2
0
        public bool DeleteTrue(IList <int> idList, iPow.Infrastructure.Data.DataSys.Sys_AdminUser operUser)
        {
            var res = false;

            if (idList != null && idList.Count > 0)
            {
                var delete = articleCommRepository.GetList(e => idList.Contains(e.CommID)).ToList();
                if (delete != null && delete.Count > 0)
                {
                    res = DeleteTrue(delete, operUser);
                }
            }
            return(res);
        }