public BaseObject DeleteNews(int id) { using (NewsLogic logic = new NewsLogic()) { return(logic.DeleteNews(id)); } }
public BaseObject InsertNews(News news) { using (NewsLogic logic = new NewsLogic()) { return(logic.InsertNews(news)); } }
public BaseObject UpdateNews(News news) { using (NewsLogic logic = new NewsLogic()) { return(logic.UpdateNews(news)); } }
public News GetNewsByID(int id) { using (NewsLogic logic = new NewsLogic()) { return(logic.GetNewsByID(id)); } }
public List <News> GetNewsList(GetReportDataParams param, out int totalCount) { using (NewsLogic logic = new NewsLogic()) { return(logic.GetNewsList(param, out totalCount)); } }
public ActionResult Home() { var model = ModelLogic.CreateMasterModel() as MasterModel <Home>; model.Content.LatestNewsItem = NewsLogic.GetLatestNewsitem(); return(CurrentTemplate(model)); }
public ActionResult Newsoverview() { var model = ModelLogic.CreateMasterModel() as MasterModel <Newsoverview>; var newsItems = NewsLogic.GetNewsitems(CurrentPage); var pager = Umbraco.GetPager(5, newsItems.Count()); //Only put the paged items in the list. model.Content.NewsItems = newsItems.Skip((pager.CurrentPage - 1) * pager.ItemsPerPage).Take(pager.ItemsPerPage).ToList(); model.Content.Pager = pager; return(CurrentTemplate(model)); }
public NewsController(ILogger <NewsController> logger, NewsLogic newsLogic) : base(logger) { this._newsLogic = newsLogic; }