protected void Page_Load(object sender, EventArgs e) { if (TopicClass.HasValue && TopicArea.HasValue) { ToppicTag = TopicArea.Value != EyouSoft.Model.CommunityStructure.TopicAreas.旅行社 ? Enum.GetName(typeof(EyouSoft.Model.CommunityStructure.TopicAreas), (int)TopicArea) : "旅行社新闻"; } else if (TopicClass.HasValue) { ToppicTag = Enum.GetName(typeof(EyouSoft.Model.CommunityStructure.TopicClass), (int)TopicClass); } if (IsShowMore) { lbMore.Text = string.Format("<a href=\"/SupplierInfo/{0}?TypeId={1}&AreaId={2}\">更多>></a>", (int)TopicClass == 1 ? "ArticleList.aspx" : "SchoolIntroductionList.aspx", TopicClass.HasValue ? (int)TopicClass.Value : -1, TopicArea.HasValue ? (int)TopicArea.Value : -1); } EyouSoft.IBLL.CommunityStructure.IInfoArticle IBll = EyouSoft.BLL.CommunityStructure.InfoArticle.CreateInstance(); IList <EyouSoft.Model.CommunityStructure.InfoArticle> list = IBll.GetTopNumList(TopNumber, TopicClass, TopicArea, null, string.Empty); if (list != null && list.Count > 0) { rpMain.DataSource = list; rpMain.DataBind(); } if (IsMarginTop) { MainTB.Style.Add("margin-top", "10px"); } }
/// <summary> /// 初始化页面 /// </summary> private void InitPageData() { EyouSoft.IBLL.CommunityStructure.IInfoArticle ibll = EyouSoft.BLL.CommunityStructure.InfoArticle.CreateInstance(); EyouSoft.Model.CommunityStructure.InfoArticle model = ibll.GetModel(ArticleId); if (model == null) { Utils.ShowError("未能找到您要查看的资讯!", "InfoArticle"); } TopicClassId = (int)model.TopicClassId; TopicAreasId = (int)model.AreaId; this.Page.Title = model.ArticleTitle; System.Text.StringBuilder strA = new System.Text.StringBuilder(); if (TopicClassId == 1) { strA.AppendFormat("<a href=\"/SupplierInfo/InfoArticle.aspx\">{0}</a>", Enum.GetName(typeof(EyouSoft.Model.CommunityStructure.TopicClass), TopicClassId)); } else if (TopicClassId > 0) { strA.AppendFormat("<a href=\"/SupplierInfo/SchoolIntroduction.aspx\">{0}</a>", Enum.GetName(typeof(EyouSoft.Model.CommunityStructure.TopicClass), TopicClassId)); } ltrTopicClass.Text = strA.ToString(); //小类别要判断 if (TopicAreasId > 0) { if (TopicAreasIds.Contains(TopicAreasId)) { ltrTopIcArea.Text = string.Format(" > <a href=\"/SupplierInfo/ArticleList.aspx?TypeId={0}&AreaId={1}\">{2}</a>", TopicClassId, TopicAreasId, Enum.GetName(typeof(EyouSoft.Model.CommunityStructure.TopicAreas), TopicAreasId)); } else { ltrTopIcArea.Text = string.Format(" > <a href=\"/SupplierInfo/SchoolIntroductionList.aspx?TypeId={0}&AreaId={1}\">{2}</a>", TopicClassId, TopicAreasId, Enum.GetName(typeof(EyouSoft.Model.CommunityStructure.TopicAreas), TopicAreasId)); } } if (string.IsNullOrEmpty(model.TitleColor)) { ltrTitle.Text = model.ArticleTitle; } else { ltrTitle.Text = string.Format("<font color=\"{0}\">", model.TitleColor) + model.ArticleTitle + "</font>"; } ltrTime.Text = model.IssueTime.ToString("yyyy年MM月dd日 hh:mm"); if (!string.IsNullOrEmpty(model.Source)) { ltrSource.Text = "来源:" + model.Source; } if (model.IsImage) { ltrImg.Text = string.Format("<img src=\"{0}\" alt=\"{1}\" width=\"600\" height=\"400\" />", Domain.FileSystem + model.ImgPath, model.ArticleTitle); } ltrInfo.Text = model.ArticleText; ltrTags.Text = string.IsNullOrEmpty(model.ArticleTag) ? string.Empty : model.ArticleTag.Replace(",", " "); ltrEditOR.Text = Utils.GetText(model.Editor, 6); if (model.PrevInfo != null) { ltrPrev.Text = string.Format("上一篇:<a href=\"/SupplierInfo/{0}?Id={1}\">{2}</a>", model.PrevInfo.TopicClassId == EyouSoft.Model.CommunityStructure.TopicClass.行业资讯 ? "ArticleInfo.aspx" : "SchoolIntroductionInfo.aspx", model.PrevInfo.ID, Utils.GetText(model.PrevInfo.ArticleTitle, 20)); } if (model.NextInfo != null) { ltrNext.Text = string.Format("下一篇:<a href=\"/SupplierInfo/{0}?Id={1}\">{2}</a>", model.NextInfo.TopicClassId == EyouSoft.Model.CommunityStructure.TopicClass.行业资讯 ? "ArticleInfo.aspx" : "SchoolIntroductionInfo.aspx", model.NextInfo.ID, Utils.GetText(model.NextInfo.ArticleTitle, 20)); } //绑定相关文章列表 rptRelatedArticle.DataSource = ibll.GetTopNumTagList(8, (EyouSoft.Model.CommunityStructure.TopicClass)TopicClassId, (EyouSoft.Model.CommunityStructure.TopicAreas)TopicAreasId, ArticleId); rptRelatedArticle.DataBind(); //绑定最新图文资讯 rptArticle.DataSource = ibll.GetTopNumPicList(5, null, null, true, null); rptArticle.DataBind(); ibll = null; model = null; }
protected void Page_Load(object sender, EventArgs e) { Supplier site = (Supplier)this.Master; if (site != null) { site.MenuIndex = 2; } if (!IsPostBack) { #region 景点新闻 Viewpoint.TopNumber = 7; Viewpoint.TopicArea = EyouSoft.Model.CommunityStructure.TopicAreas.景区新闻; Viewpoint.TopicClass = EyouSoft.Model.CommunityStructure.TopicClass.行业资讯; #endregion #region 旅行社新闻 Travel.TopNumber = 7; Travel.TopicArea = EyouSoft.Model.CommunityStructure.TopicAreas.旅行社; Travel.TopicClass = EyouSoft.Model.CommunityStructure.TopicClass.行业资讯; #endregion #region 酒店新闻 Hotel.TopicArea = EyouSoft.Model.CommunityStructure.TopicAreas.酒店新闻; Hotel.TopNumber = 7; Hotel.TopicClass = EyouSoft.Model.CommunityStructure.TopicClass.行业资讯; #endregion #region 政策解读 Policy.TopicArea = EyouSoft.Model.CommunityStructure.TopicAreas.政策解读; Policy.TopNumber = 8; Policy.TopicClass = EyouSoft.Model.CommunityStructure.TopicClass.行业资讯; #endregion #region 成功故事 Success.TopicArea = EyouSoft.Model.CommunityStructure.TopicAreas.成功故事; Success.TopNumber = 10; Success.TopicClass = EyouSoft.Model.CommunityStructure.TopicClass.行业资讯; #endregion #region 绑定新闻,资讯列表 EyouSoft.IBLL.CommunityStructure.IInfoArticle IBll = EyouSoft.BLL.CommunityStructure.InfoArticle.CreateInstance(); EyouSoft.Model.CommunityStructure.InfoArticle model = null; IList <EyouSoft.Model.CommunityStructure.InfoArticle> list = null; #region 绑定新闻 model = new EyouSoft.Model.CommunityStructure.InfoArticle(); model = IBll.GetHeadInfo(EyouSoft.Model.CommunityStructure.TopicClass.行业资讯, EyouSoft.Model.CommunityStructure.TopicAreas.新闻资讯); if (model != null) { lbNews.Text = string.Format("<a href='/SupplierInfo/ArticleInfo.aspx?Id={0}' title=\"{2}\">{1}</a>", model.ID, model.TitleColor.Length == 0 ? Utils.GetText(model.ArticleTitle, 22) : string.Format("<font color='{0}'>{1}</font>", model.TitleColor, Utils.GetText(model.ArticleTitle, 22)), model.ArticleTitle); lbNewsContent.Text = Utils.GetText(StringValidate.LoseHtml(model.ArticleText), 75, true); ltnews.Text = string.Format("<a href=\"/SupplierInfo/ArticleInfo.aspx?Id={0}\"><span class=\"ff0000\">阅读全文>></span></a>", model.ID); } model = null; list = new List <EyouSoft.Model.CommunityStructure.InfoArticle>(); list = IBll.GetTopNumList(12, EyouSoft.Model.CommunityStructure.TopicClass.行业资讯, EyouSoft.Model.CommunityStructure.TopicAreas.新闻资讯, null, string.Empty); rpNews.DataSource = list; rpNews.DataBind(); list = null; #endregion #region 绑定资讯 model = new EyouSoft.Model.CommunityStructure.InfoArticle(); model = IBll.GetHeadInfo(EyouSoft.Model.CommunityStructure.TopicClass.行业资讯, EyouSoft.Model.CommunityStructure.TopicAreas.行业动态); if (model != null) { lbInfo.Text = string.Format("<a href='/SupplierInfo/ArticleInfo.aspx?Id={0}' title=\"{2}\">{1}</a>", model.ID, model.TitleColor.Length == 0 ? Utils.GetText(model.ArticleTitle, 22) : string.Format("<font color='{0}'>{1}</font>", model.TitleColor, Utils.GetText(model.ArticleTitle, 22)), model.ArticleTitle); lbinfoContent.Text = Utils.GetText(StringValidate.LoseHtml(model.ArticleText), 70, true); ltinfo.Text = string.Format("<a href=\"/SupplierInfo/ArticleInfo.aspx?Id={0}\"><span class=\"ff0000\">阅读全文>></span></a>", model.ID); } model = null; list = new List <EyouSoft.Model.CommunityStructure.InfoArticle>(); list = IBll.GetTopNumList(13, EyouSoft.Model.CommunityStructure.TopicClass.行业资讯, EyouSoft.Model.CommunityStructure.TopicAreas.行业动态, null, string.Empty); rpInfo.DataSource = list; rpInfo.DataBind(); list = null; #endregion IBll = null; #endregion #region 最新行业资讯 CommonTopic1.PartType = UserPublicCenter.SupplierInfo.UserControl.CommonTopicControl.PartTypes.资讯; CommonTopic1.TopicType = UserPublicCenter.SupplierInfo.UserControl.CommonTopicControl.TopicTypes.软文广告列表; CommonTopic1.TopicClass = EyouSoft.Model.CommunityStructure.TopicClass.行业资讯; //CommonTopic1.TopicArea = EyouSoft.Model.CommunityStructure.TopicAreas.行业动态; #endregion #region 业之星访谈 CommonTopic2.PartType = UserPublicCenter.SupplierInfo.UserControl.CommonTopicControl.PartTypes.业之星访谈; CommonTopic2.TopicType = UserPublicCenter.SupplierInfo.UserControl.CommonTopicControl.TopicTypes.图文广告列表; CommonTopic2.TopicArea = EyouSoft.Model.CommunityStructure.TopicAreas.业之星; CommonTopic2.TopicClass = EyouSoft.Model.CommunityStructure.TopicClass.行业资讯; CommonTopic2.CurrCityId = CityId; //CommonTopic2.TopicClass = null; //CommonTopic2.TopicArea = null; #endregion #region 业学堂 CommonTopic3.PartType = UserPublicCenter.SupplierInfo.UserControl.CommonTopicControl.PartTypes.业学堂; CommonTopic3.TopicType = UserPublicCenter.SupplierInfo.UserControl.CommonTopicControl.TopicTypes.软文广告列表; #endregion #region 图片新闻 CommonTopic4.PartType = UserPublicCenter.SupplierInfo.UserControl.CommonTopicControl.PartTypes.资讯; CommonTopic4.TopicType = UserPublicCenter.SupplierInfo.UserControl.CommonTopicControl.TopicTypes.图文广告列表; CommonTopic4.TopicClass = EyouSoft.Model.CommunityStructure.TopicClass.行业资讯; #endregion #region 旗帜广告 System.Collections.Generic.IList <EyouSoft.Model.AdvStructure.AdvInfo> AdvListBanner = EyouSoft.BLL.AdvStructure.Adv.CreateInstance().GetAdvs(CityId, EyouSoft.Model.AdvStructure.AdvPosition.供求信息频道行业资讯旗帜广告); if (AdvListBanner != null && AdvListBanner.Count > 0) { ltrAdv.Text = string.Format("<a target=\"_blank\" title=\"{3}\" href=\"{0}\"><img src=\"{1}\" alt=\"{2}\" width=\"250\" height=\"85\"></a>", AdvListBanner[0].RedirectURL, Domain.FileSystem + AdvListBanner[0].ImgPath, AdvListBanner[0].Title, AdvListBanner[0].Title); } if (AdvListBanner != null) { AdvListBanner.Clear(); } AdvListBanner = null; #endregion } }
protected void BindImgInfo(int CityID) { EyouSoft.IBLL.AdvStructure.IAdv iBll = EyouSoft.BLL.AdvStructure.Adv.CreateInstance(); IList <EyouSoft.Model.AdvStructure.AdvInfo> AdvListBanner = null; //供求信息频道文章及列表右侧11 AdvListBanner = iBll.GetAdvs(CityID, EyouSoft.Model.AdvStructure.AdvPosition.供求信息频道文章及列表右侧1); if (AdvListBanner != null && AdvListBanner.Count > 0) { if (Utils.EmptyLinkCode == AdvListBanner[0].RedirectURL) { imgUrl1 = string.Format("<image src='{0}' width='250' height='170'>", Domain.FileSystem + AdvListBanner[0].ImgPath); } else { imgUrl1 = string.Format("<a href='{0}' target='_blank'><image src='{1}' width='250' height='170'></a>", AdvListBanner[0].RedirectURL, Domain.FileSystem + AdvListBanner[0].ImgPath); } } //供求信息频道文章及列表右侧12 AdvListBanner = iBll.GetAdvs(CityID, EyouSoft.Model.AdvStructure.AdvPosition.供求信息频道文章及列表右侧2); if (AdvListBanner != null && AdvListBanner.Count > 0) { if (Utils.EmptyLinkCode == AdvListBanner[0].RedirectURL) { imgUrl2 = string.Format("<image src='{0}' width='250' height='170'>", Domain.FileSystem + AdvListBanner[0].ImgPath); } else { imgUrl2 = string.Format("<a href='{0}' target='_blank'><image src='{1}' width='250' height='170'></a>", AdvListBanner[0].RedirectURL, Domain.FileSystem + AdvListBanner[0].ImgPath); } } //本周最具人气企业推荐 AdvListBanner = iBll.GetAdvs(CityID, EyouSoft.Model.AdvStructure.AdvPosition.供求信息频道最具人气企业推荐); if (AdvListBanner != null && AdvListBanner.Count > 0) { this.dal_PicAdvList.DataSource = AdvListBanner; this.dal_PicAdvList.DataBind(); } //释放资源 AdvListBanner = null; iBll = null; //行业资讯 //本周新闻排行 EyouSoft.IBLL.CommunityStructure.IInfoArticle aBll = EyouSoft.BLL.CommunityStructure.InfoArticle.CreateInstance(); IList <EyouSoft.Model.CommunityStructure.InfoArticle> aModelList = null; aModelList = aBll.GetTopNumCurrWeekList(8, EyouSoft.Model.CommunityStructure.TopicClass.行业资讯, null, false); if (aModelList != null && aModelList.Count > 0) { this.rpt_NewsTopList.DataSource = aModelList; this.rpt_NewsTopList.DataBind(); } //最新新闻咨询 aModelList = aBll.GetTopNumList(8, EyouSoft.Model.CommunityStructure.TopicClass.行业资讯, null, false, ""); if (aModelList != null && aModelList.Count > 0) { this.rpt_NewNewsInfo.DataSource = aModelList; this.rpt_NewNewsInfo.DataBind(); } //同业学堂 aModelList = aBll.GetTopNumList(8, null, EyouSoft.Model.CommunityStructure.TopicAreas.新手计调, false, ""); if (aModelList != null && aModelList.Count > 0) { this.rep_NewEnjoyStudy.DataSource = aModelList; this.rep_NewEnjoyStudy.DataBind(); } aModelList = aBll.GetTopNumList(8, null, EyouSoft.Model.CommunityStructure.TopicAreas.带团经验分享, false, ""); if (aModelList != null && aModelList.Count > 0) { this.rep_TourEnjoy.DataSource = aModelList; this.rep_TourEnjoy.DataBind(); } aModelList = aBll.GetTopNumList(8, null, EyouSoft.Model.CommunityStructure.TopicAreas.景区案例分析, false, ""); if (aModelList != null && aModelList.Count > 0) { this.rep_AnLiFenXi.DataSource = aModelList; this.rep_AnLiFenXi.DataBind(); } }
/// <summary> /// 绑定软文资讯 /// </summary> private void BindSoftManList() { StringBuilder strInfoHtml = new StringBuilder(); EyouSoft.IBLL.CommunityStructure.IInfoArticle InfoBll = EyouSoft.BLL.CommunityStructure.InfoArticle.CreateInstance(); IList <EyouSoft.Model.CommunityStructure.InfoArticle> list = InfoBll.GetTopNumList(TopNumber, TopicClass, TopicArea, null, string.Empty); switch (PartType) { #region 资讯 case PartTypes.资讯: if (list != null && list.Count > 0) { strInfoHtml.Append("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"); strInfoHtml.Append("<tr>"); strInfoHtml.Append("<td class=\"xuetang\"><ul>"); foreach (EyouSoft.Model.CommunityStructure.InfoArticle model in list) { strInfoHtml.AppendFormat("<li>·<a href=\"{0}\" title=\"{2}\">{1}</a></li>", TopicClass == EyouSoft.Model.CommunityStructure.TopicClass.行业资讯 ? EyouSoft.Common.URLREWRITE.SupplierInfo.ArticleInfo(model.ID) : EyouSoft.Common.URLREWRITE.SupplierInfo.SchoolInfo(model.ID), Utils.GetText(model.ArticleTitle, 18), model.ArticleTitle); } strInfoHtml.Append("</ul></td></tr></table>"); } break; #endregion #region 业学堂 case PartTypes.业学堂: List <EyouSoft.Model.CommunityStructure.TopicClass> TopicList = new List <EyouSoft.Model.CommunityStructure.TopicClass>(); TopicList.Add(EyouSoft.Model.CommunityStructure.TopicClass.案例分析); TopicList.Add(EyouSoft.Model.CommunityStructure.TopicClass.导游之家); TopicList.Add(EyouSoft.Model.CommunityStructure.TopicClass.计调指南); TopicList.Add(EyouSoft.Model.CommunityStructure.TopicClass.经验交流); list = InfoBll.GetTopNumListByTopicList(TopNumber, TopicList, null); if (list != null && list.Count > 0) { int i = 0; strInfoHtml.Append("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"padding-top:6px;\">"); strInfoHtml.Append("<tr>"); StringBuilder strInfo = new StringBuilder(); foreach (EyouSoft.Model.CommunityStructure.InfoArticle model in list) { i++; strInfo.Append("<li>·<a href=\"" + EyouSoft.Common.URLREWRITE.SupplierInfo.SchoolInfo(model.ID) + "\" title=\"" + model.ArticleTitle + "\">" + Utils.GetText(model.ArticleTitle, 8) + "</a></li>"); if (i % 6 == 0 || i == list.Count) { strInfoHtml.AppendFormat("<td width=\"50%\" valign=\"top\" class=\"xuetang\"><ul>{0}</ul></td>", strInfo.ToString()); strInfo.Remove(0, strInfo.Length); } } strInfoHtml.Append("</tr></table>"); } break; #endregion #region 宾访谈下资讯 case PartTypes.宾访谈下资讯: if (list != null && list.Count > 0) { strInfoHtml.Append("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"padding-top:6px;\">"); strInfoHtml.Append("<tr>"); strInfoHtml.Append("<td class=\"xuetang\"><ul>"); foreach (EyouSoft.Model.CommunityStructure.InfoArticle model in list) { strInfoHtml.AppendFormat("<li>·<a href=\"/SupplierInfo/ArticleInfo.aspx?Id={0}\" title=\"{2}\">{1}</a></li>", model.ID, Utils.GetText(model.ArticleTitle, 15), model.ArticleTitle); } strInfoHtml.Append("</ul></td></tr></table>"); } break; #endregion } mainDiv.Controls.Add(new LiteralControl(string.Format(SoftManHtmlFormat, PartType == PartTypes.宾访谈下资讯 ? " class=\"margin10\" style=\"border:1px solid #ccc; text-align:left\"" : "", PartCss, PartText, TextCss.Length > 0 ? " class=" + TextCss : "", strInfoHtml.ToString(), PartType == PartTypes.宾访谈下资讯 ? " " : ""))); }
/// <summary> /// 绑定图文列表 /// </summary> private void BindPicList() { StringBuilder strInfoHtml = new StringBuilder(); IList <EyouSoft.Model.CommunityStructure.InfoArticle> list = null; EyouSoft.IBLL.CommunityStructure.IInfoArticle InfoBll = EyouSoft.BLL.CommunityStructure.InfoArticle.CreateInstance(); switch (PartType) { #region 资讯 case PartTypes.资讯: list = InfoBll.GetTopNumPicList(TopNumber, EyouSoft.Model.CommunityStructure.TopicClass.行业资讯, null, true, null); if (list != null && list.Count > 0) { foreach (EyouSoft.Model.CommunityStructure.InfoArticle model in list) { strInfoHtml.Append("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border-bottom:1px dashed #ccc;\">"); strInfoHtml.Append("<tr>"); strInfoHtml.AppendFormat("<td width=\"48%\" height=\"108\"><img src=\"{0}\" width=\"120\" height=\"90\" /></td>", FileServerUrl + model.ImgThumb); strInfoHtml.AppendFormat("<td width=\"52%\" valign=\"top\"><strong><a href=\"/SupplierInfo/{0}?Id={1}\" class=\"heise\" title=\"{3}\">{2}</a></strong><br /><span class=\"huise\">{3}</span><a href=\"/SupplierInfo/{0}?Id={1}\"><span class=\"ff0000\">[详细]</span></a></td>", model.TopicClassId == EyouSoft.Model.CommunityStructure.TopicClass.行业资讯 ? "ArticleInfo.aspx" : "SchoolIntroductionInfo.aspx", model.ID, Utils.GetText(model.ArticleTitle, 7), model.ArticleTitle, Utils.GetText(model.ArticleText, 30)); strInfoHtml.Append("</tr>"); strInfoHtml.Append("</table>"); } } list = null; InfoBll = null; break; #endregion #region 顾问团队 case PartTypes.顾问团队: EyouSoft.IBLL.CommunityStructure.ICommunityAdvisor IAdvisorBll = EyouSoft.BLL.CommunityStructure.CommunityAdvisor.CreateInstance(); IList <EyouSoft.Model.CommunityStructure.CommunityAdvisor> AdvList = IAdvisorBll.GetCommunityAdvisorList(TopNumber, true); if (AdvList != null && AdvList.Count > 0) { foreach (EyouSoft.Model.CommunityStructure.CommunityAdvisor model in AdvList) { strInfoHtml.Append("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border-bottom:1px dashed #ccc; margin-top:5px; padding-bottom:2px;\">"); strInfoHtml.Append("<tr>"); strInfoHtml.AppendFormat("<td width=\"27%\"><img src=\"{0}\" width=\"59\" height=\"60\" /></td>", FileServerUrl + model.ImgPath); strInfoHtml.AppendFormat("<td width=\"73%\" valign=\"top\" align=\"left\"><strong>{0}</strong><br />", model.ContactName); strInfoHtml.AppendFormat("<div style=\"color:#585858;\" title=\"{1}\">{0}</div></td>", Utils.GetText(model.Achieve, 30), model.Achieve); strInfoHtml.Append("</tr>"); strInfoHtml.Append("</table>"); } } AdvList = null; IAdvisorBll = null; break; #endregion #region 宾访谈 case PartTypes.宾访谈: EyouSoft.IBLL.CommunityStructure.IHonoredGuest IGuestBll = EyouSoft.BLL.CommunityStructure.HonoredGuest.CreateInstance(); IList <EyouSoft.Model.CommunityStructure.HonoredGuest> GuestList = IGuestBll.GetTopNumList(TopNumber); if (GuestList != null && GuestList.Count > 0) { foreach (EyouSoft.Model.CommunityStructure.HonoredGuest model in GuestList) { strInfoHtml.Append("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border-bottom:1px dashed #ccc; margin-top:5px; padding-bottom:2px;\">"); strInfoHtml.Append("<tr>"); strInfoHtml.AppendFormat("<td width=\"30%\"><img src=\"{0}\" width=\"50\" height=\"50\" /></td>", FileServerUrl + model.ImgThumb); strInfoHtml.AppendFormat("<td width=\"70%\" valign=\"top\" style=\"text-align:left\"><strong title=\"{2}\">{0}</strong><br /><div style=\"margin-top:2px; color:#585858;\">{1}<br />", Utils.GetText(model.Title, 13), Utils.GetText(model.Content, 13), model.Title); strInfoHtml.AppendFormat("<span class=\"lanse\"><a href=\"/SupplierInfo/HonoredGuestInfo.aspx?id={0}\">[详细]</a></span></div></td>", model.ID); strInfoHtml.Append("</tr>"); strInfoHtml.Append("</table>"); } } GuestList = null; break; #endregion #region 业之星访谈 case PartTypes.业之星访谈: list = InfoBll.GetTopNumPicList(TopNumber, TopicClass, TopicArea, true, null); if (list != null && list.Count > 0) { foreach (EyouSoft.Model.CommunityStructure.InfoArticle model in list) { strInfoHtml.Append("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"border-bottom:1px dashed #ccc; margin-top:5px; padding-bottom:2px;\">"); strInfoHtml.Append("<tr>"); strInfoHtml.AppendFormat("<td width=\"30%\"><img src=\"{0}\" width=\"50\" height=\"50\" /></td>", FileServerUrl + model.ImgThumb); strInfoHtml.AppendFormat("<td width=\"70%\" valign=\"top\" style=\"text-align:left\"><strong title=\"{2}\">{0}</strong><div style=\"margin-top:2px; color:#585858;\">{1}<br />", Utils.GetText(model.ArticleTitle, 26), "", model.ArticleTitle); strInfoHtml.AppendFormat("<span class=\"lanse\"><a target=\"_blank\" href=\"/SupplierInfo/ArticleInfo.aspx?id={0}\">[详细]</a></span></div></td>", model.ID); strInfoHtml.Append("</tr>"); strInfoHtml.Append("</table>"); } } list = null; break; #endregion } mainDiv.Controls.Add(new LiteralControl(string.Format(PicListHtmlFormat, PartCss, PartText, PartType == PartTypes.顾问团队 ? " <a href=\"/SupplierInfo/ApplicationTeam.aspx\" target=\"_blank\" class=\"heise12\">访谈申请</a>" : string.Empty, TextCss.Length > 0 ? " class=" + TextCss : "", strInfoHtml.ToString()))); }