/// <summary> /// 获取横幅广告的地址和连接 /// </summary> protected void GetBannerImg() { EyouSoft.IBLL.AdvStructure.IAdv iBll = EyouSoft.BLL.AdvStructure.Adv.CreateInstance(); IList <EyouSoft.Model.AdvStructure.AdvInfo> AdvListBanner = null; //第一张横向大广告 AdvListBanner = iBll.GetAdvs(CityId, EyouSoft.Model.AdvStructure.AdvPosition.机票频道通栏banner1); if (AdvListBanner != null && AdvListBanner.Count > 0) { BannerImgUrl1 = Utils.GetImgOrFalash(AdvListBanner[0].ImgPath, AdvListBanner[0].RedirectURL); } //第二张横向大广告 AdvListBanner = iBll.GetAdvs(CityId, EyouSoft.Model.AdvStructure.AdvPosition.机票频道通栏banner2); if (AdvListBanner != null && AdvListBanner.Count > 0) { BannerImgUrl2 = Utils.GetImgOrFalash(AdvListBanner[0].ImgPath, AdvListBanner[0].RedirectURL); } //释放资源 AdvListBanner = null; iBll = null; }
/// <summary> /// 绑定线路区域 /// </summary> /// <returns></returns> protected void BindRouteArea() { EyouSoft.Model.SystemStructure.SysCity model = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(CityId); EyouSoft.IBLL.AdvStructure.IAdv advBll = EyouSoft.BLL.AdvStructure.Adv.CreateInstance(); #region 国内长线 IList <EyouSoft.Model.AdvStructure.AdvInfo> inAdvList = advBll.GetNotFillAdvs(CityId, EyouSoft.Model.AdvStructure.AdvPosition.国内长线5张logo图片); IEnumerable <EyouSoft.Model.SystemStructure.SysCityArea> inAreaList = model.CityAreaControls.Where(i => i.RouteType == EyouSoft.Model.SystemStructure.AreaType.国内长线 && i.IsDefaultShow == true).OrderBy(p => p.SortId); inAreaHtml = GetAreaHtml(inAdvList, inAreaList, 0); #endregion #region 国际长线 IList <EyouSoft.Model.AdvStructure.AdvInfo> outAdvList = advBll.GetNotFillAdvs(CityId, EyouSoft.Model.AdvStructure.AdvPosition.国际长线5张logo图片); IEnumerable <EyouSoft.Model.SystemStructure.SysCityArea> outAreaList = model.CityAreaControls.Where(i => i.RouteType == EyouSoft.Model.SystemStructure.AreaType.国际线 && i.IsDefaultShow == true).OrderBy(p => p.SortId); outAreaHtml = GetAreaHtml(outAdvList, outAreaList, 1); #endregion #region 周边线路 IList <EyouSoft.Model.AdvStructure.AdvInfo> sideAdvList = advBll.GetNotFillAdvs(CityId, EyouSoft.Model.AdvStructure.AdvPosition.周边长线5张logo图片); IEnumerable <EyouSoft.Model.SystemStructure.SysCityArea> sideAreaList = model.CityAreaControls.Where(i => i.RouteType == EyouSoft.Model.SystemStructure.AreaType.国内短线 && i.IsDefaultShow == true).OrderBy(p => p.SortId); sideAreaHtml = GetAreaHtml(sideAdvList, sideAreaList, 2); #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(); } }