using System.Collections.Generic;

namespace Stat.Html
{
    public class News
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="s">条数</param>
        /// <returns></returns>
        public static string Get(IList<Stat.Model.News> list)
        {
            System.Text.StringBuilder tep = new System.Text.StringBuilder();
            if (list.Count > 0)
            {
                for (int i = 0; i < list.Count; i++)
                {
                    tep.Append("<li><a href=\"/News.aspx?id=" + list[i].ID + "\" >" + list[i].title + " " + list[i].AddTime.ToShortDateString() + "</a></li>");
                }
            }
            return tep.ToString();
        }
    }
}
