Esempio n. 1
0
        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
            }
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            cMaster = (SeniorOnlineShop.master.T4) this.Master;
            if (!IsPostBack)
            {
                if (cMaster == null)
                {
                    return;
                }
                #region 设置导航栏Tab索引
                cMaster.CTAB = master.T4TAB.出游指南;
                #endregion

                #region 初始化风土人情列表
                LocalCultures.DataSource = EyouSoft.BLL.ShopStructure.HighShopTripGuide.CreateInstance().GetWebList(9, cMaster.CompanyId, 1, "");
                LocalCultures.DataBind();
                #endregion

                #region 初始化温馨提醒列表
                IList <EyouSoft.Model.ShopStructure.HighShopTripGuide> list = EyouSoft.BLL.ShopStructure.HighShopTripGuide.CreateInstance().GetWebList(10, cMaster.CompanyId, 2, "");
                if (list != null && list.Count > 0)
                {
                    ltrTopOneWarm.Text   = string.Format("<a target=\"_blank\" href=\"/GuideBookInfo_{1}_{0}\"><img src=\"{2}\" width=\"79\" height=\"67\" border=\"0\"/></a>", cMaster.CompanyId, list[0].ID, Utils.GetLineShopImgPath(list[0].ImagePath, 4));
                    lbTopOneTitle.Text   = string.Format("<a target=\"_blank\" href=\"/GuideBookInfo_{1}_{0}\">{2}</a>", cMaster.CompanyId, list[0].ID, Utils.GetText2(list[0].Title, 8, false));
                    lbTopOneContent.Text = string.Format("<a style=\"color:#999;\" target=\"_blank\" href=\"/GuideBookInfo_{1}_{0}\">{2}</a>", cMaster.CompanyId, list[0].ID, Utils.GetText2(StringValidate.LoseHtml(list[0].ContentText), 38, true));
                    list.RemoveAt(0);
                    rpWarmInfos.DataSource = list;
                    rpWarmInfos.DataBind();
                }
                #endregion

                #region 初始化综合介绍列表
                CompositeReferral.DataSource = EyouSoft.BLL.ShopStructure.HighShopTripGuide.CreateInstance().GetWebList(10, cMaster.CompanyId, 3, "");
                CompositeReferral.DataBind();
                #endregion

                #region 初始化旅游资源推荐
                HotResource.DataSource = EyouSoft.BLL.ShopStructure.HighShopTripGuide.CreateInstance().GetWebList(30, cMaster.CompanyId, 4, "");
                HotResource.DataBind();
                #endregion

                Page.Title = "出游指南";
            }
        }