Пример #1
0
 private void BindNewsRelative()
 {
     var newsBo = new NewsBO();
     List<Entities.News> news = newsBo.GetNewsByType(0);
     var htmlNews = new StringBuilder();
     foreach (Entities.News newse in news.OrderByDescending(t => t.CreatedOn))
     {
         htmlNews.Append("<li><span>");
         htmlNews.AppendFormat("<a href='/tin-tuc/2/{0}'>{1}</a>", newse.Id, newse.Title);
         htmlNews.Append("</li></span>");
     }
     ltNewRelative.Text = htmlNews.ToString();
 }
 private List<Entities.News> GetNews()
 {
     var newsBo = new NewsBO();
     List<Entities.News> res = newsBo.GetNewsByType(1);
     return res;
 }