public List <NewsListOM> GetNewsList(int?newsSetionId, int pageSize, int pageIndex) { var list = new NewsDAC().GetNewsList(newsSetionId, pageSize, pageIndex); return(list.Select(t => new NewsListOM { Id = t.Id, CNTitle = t.CNTitle, ENTitle = t.ENTitle, CNContent = t.CNContent, ENContent = t.ENContent, CNSource = t.CNSource, ENSource = t.ENSource, CNKeyword1 = t.CNKeyword1, CNKeyword2 = t.CNKeyword2, ENKeyword1 = t.ENKeyword1, ENKeyword2 = t.ENKeyword2, CNCoverPictureUrl = t.CNCoverPictureUrl, ENCoverPictureUrl = t.ENCoverPictureUrl, CreateTime = t.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"), Status = (int)t.Status, NewsSetionId = t.NewsSetionId, CNPageView = t.CNPageView, ENPageView = t.ENPageView, CNPublisher = t.CNPublisher == null ? "" : t.CNPublisher, ENPublisher = t.ENPublisher == null ? "" : t.ENPublisher, CNIntro = t.CNIntro == null ? "" : t.CNIntro, ENIntro = t.ENIntro == null ? "" : t.ENIntro }).ToList()); }
public List <NewsSectionOM> GetAllSectionList(int pageSize, int pageIndex) { var list = new NewsDAC().GetAllSectionList(pageSize, pageIndex); return(list.Select(t => new NewsSectionOM { Id = t.Id, CNName = t.CNName, ENName = t.ENName, CreateTime = t.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"), Sort = t.Sort }).ToList()); }