/////Detail public static string BuildContentItem(NewsInfo oItem) { #if !DEBUG var oData = CacheController.GetNews(oItem.pk_Id); if (oData != null) { return(oData.ToString()); } #endif StringBuilder sb = new StringBuilder(); sb = new StringBuilder(); sb.AppendFormat("<h3 class=\"colorxah\" style=\"padding:5px 0 0 7px;\">{0}</h3>", oItem.fk_CategoryName); sb.Append("<hr />"); sb.AppendFormat("<p style=\"font-weight: bold;font-size:14pt;line-height: 20px; padding-left:5px; padding-bottom: 10px; padding-Right: 10px; text-align:justify\" >{0}</p>", oItem.s_Title); if (oItem.s_Image.Trim() != "") { //sb.AppendFormat("<script>DrawImgSize('{0}');</script>",UntilityFunction.GetPathImg(oItem.s_Image)); //sb.AppendFormat("<img style=\"width:400px; display:block; margin:10px auto;\" src=\"{0}\" />", UntilityFunction.GetPathImg(oItem.s_Image)); sb.AppendFormat("<div style=\"float:left\"><img alt=\"\" style=\"display:block;width:105px; padding:0px 10px 0px 10px;\" src=\"{0}\" /></div>", UntilityFunction.GetPathImgThumb(oItem.s_Image)); } sb.AppendFormat("<p style=\"font-weight:bold; line-height: 15px; padding-left: 10px; padding-Right: 10px; text-align:justify\">{0}</p>", oItem.s_Description); sb.AppendFormat("<div style=\"clear:both\"></div>"); sb.AppendFormat("<div style=\"padding: 10px; width: 680px;\"><div id=\"DivContent\">{0}</div></div>", oItem.s_Content); string s = sb.ToString(); #if !DEBUG CacheController.GetNews(oItem.pk_Id, s); #endif return(s); }
public static string BuildContentItem(NewsInfo oItem) { var oData = CacheController.GetNews(oItem.pk_Id); if (oData != null) { return(oData.ToString()); } StringBuilder sb = new StringBuilder(); sb = new StringBuilder(); sb.AppendFormat("<p style=\"font-size: 14pt; color:#666; margin-bottom:10px;\">{0}</p>", oItem.s_Title); sb.Append("<br>"); sb.AppendFormat("<p style=\"text-align:justify\">{0}</p>", oItem.s_Content); string s = sb.ToString(); CacheController.GetNews(oItem.pk_Id, s); return(s); }
public static string BuildNewNoiBat(NewsInfo entity) { #if !DEBUG var oData = CacheController.GetNews(entity.pk_Id); if (oData != null) { return(oData.ToString()); } #endif var sb = new StringBuilder(); sb.AppendFormat("<img class=\"anhnoibat\" width=\"320\" src=\"{0}\" alt=\"\" title=\"{1}\"/>", UntilityFunction.GetPathImg(entity.s_Image), entity.s_Title); sb.AppendFormat("<a href=\"/Tin-Tuc/{0}/{1}.html\">{2}</a>", entity.pk_Id, UnicodeUtility.UrlRewriting(entity.s_Title), entity.s_Title); sb.AppendFormat("<strong>{0}</strong>", entity.s_Description); //sb.AppendFormat("<td><a href=\"{0}\"><img border=\"0\" src=\"{1}\"></a></td>", o.s_Homepage, o.s_Logo); string s = sb.ToString(); #if !DEBUG CacheController.GetNews(entity.pk_Id, s); #endif return(s); }