Пример #1
0
        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}\">更多&gt&gt</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");
            }
        }
Пример #2
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
            }
        }
Пример #3
0
        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();
            }
        }
Пример #4
0
        /// <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.宾访谈下资讯 ? "&nbsp;&nbsp;" : "")));
        }