Ejemplo n.º 1
0
        public void BindNews()
        {
            pnlNewsTop.Visible  = false;
            pnlNewsList.Visible = false;

            List <New> lst = TNHelper.GetTopNews(DisplayItem);

            if (lst != null && lst.Count > 0)
            {
                if (!IsNewsList)
                {
                    rptNews.DataSource = lst;
                    rptNews.DataBind();
                    pnlNewsTop.Visible = true;
                }
                else
                {
                    rptNewsList.DataSource = lst;
                    rptNewsList.DataBind();
                    pnlNewsList.Visible = true;
                }
            }
            else
            {
                litMsg.Visible = true;
            }
        }