예제 #1
0
파일: News.cs 프로젝트: mvtcode/g9webs
        //List news
        public static string Build_TinNoibat(NewsInfo oItem)
        {
            var sb = new StringBuilder();

            if (oItem != null)
            {
                sb.AppendFormat("<a href=\"/tin-tuc/{0}/{1}.html\"><img width=\"400\" height=\"220\" src=\"{2}\" title=\"{3}\" /></a>", oItem.pk_Id,
                                UnicodeUtility.UrlRewriting(oItem.s_Title),
                                UntilityFunction.GetPathImg(oItem.s_Image), oItem.s_Title);
                sb.AppendFormat("<h2><a href=\"/tin-tuc/{0}/{1}.html\">{2}</a></h2>", oItem.pk_Id,
                                UnicodeUtility.UrlRewriting(oItem.s_Title), oItem.s_Title);
                sb.AppendFormat("<p>{0}</p>", ConvertUtility.SetShortTile(oItem.s_Description, 120));
            }
            return(sb.ToString());
        }