Пример #1
0
        /// <summary>
        /// 初始化区域信息
        /// </summary>
        private void InitQuYu(int tourAreaId)
        {
            EyouSoft.BLL.NewsStructure.NewsBll bll = new EyouSoft.BLL.NewsStructure.NewsBll();
            lsNews = new List <EyouSoft.Model.NewsStructure.NewsModel>();

            queryModel            = new EyouSoft.Model.NewsStructure.SearchOrderInfo();
            queryModel.ProvinceId = tourAreaId;
            lsNews = bll.GetList(pageSize, pageIndex, ref recordCount, queryModel);

            if (lsNews != null && lsNews.Count > 0)
            {
                rptQuYu.DataSource = lsNews;
                rptQuYu.DataBind();

                BindPageDown();
                BindPageUp();
            }
            else
            {
                this.ExportPageInfoUp.Visible   = false;
                this.ExportPageInfoDown.Visible = false;
            }

            this.Page.Title = string.Format(EyouSoft.Common.PageTitle.Information_List_Title, provinceName + "-大全");
            AddMetaTag("keywords", string.Format(EyouSoft.Common.PageTitle.Information_List_Keywords, provinceName));
            AddMetaTag("description", string.Format(EyouSoft.Common.PageTitle.Information_List_Des, provinceName));
        }
Пример #2
0
        /// <summary>
        /// 初始化资讯列表
        /// </summary>
        private void InitList(int typeId)
        {
            EyouSoft.BLL.NewsStructure.NewsBll bll = new EyouSoft.BLL.NewsStructure.NewsBll();
            lsNews = new List <EyouSoft.Model.NewsStructure.NewsModel>();

            //typeId=0表示是推荐资讯列表
            if (typeId == 0)
            {
                cateName         = "推荐资讯";
                queryModel       = new EyouSoft.Model.NewsStructure.SearchOrderInfo();
                queryModel.IsPic = true;
                lsNews           = bll.GetList(pageSize, pageIndex, ref recordCount, queryModel);
            }
            //不为0表示专题列表
            else
            {
                if (newTypeBll.GetCategoryById(typeId) != null)
                {
                    cateName  = ((EyouSoft.Model.NewsStructure.NewsCategory)newTypeBll.GetCategoryById(typeId)).ToString();
                    className = newTypeBll.GetNewsTypeName(typeId).ToString();
                }

                queryModel      = new EyouSoft.Model.NewsStructure.SearchOrderInfo();
                queryModel.Type = typeId;
                lsNews          = bll.GetList(pageSize, pageIndex, ref recordCount, queryModel);
            }

            if (lsNews != null && lsNews.Count > 0)
            {
                rptList.DataSource = lsNews;
                rptList.DataBind();

                BindPageDown();
                BindPageUp();
            }
            else
            {
                this.ExportPageInfoDown.Visible = false;
                this.ExportPageInfoUp.Visible   = false;
            }

            this.Page.Title = string.Format(EyouSoft.Common.PageTitle.Information_List_Title, cateName == ""?className:cateName);
            AddMetaTag("keywords", string.Format(EyouSoft.Common.PageTitle.Information_List_Keywords, cateName == ""?className:cateName));
            AddMetaTag("description", string.Format(EyouSoft.Common.PageTitle.Information_List_Des, cateName == ""?className:cateName));
        }
Пример #3
0
        /// <summary>
        /// 显示全国信息
        /// </summary>
        /// <returns></returns>
        private void ShowQuanGuoNews()
        {
            int pageSize    = 1;
            int pageIndex   = 1;
            int recordCount = 0;

            EyouSoft.Model.NewsStructure.SearchOrderInfo   queryModel = null;
            EyouSoft.BLL.NewsStructure.NewsBll             bll        = new EyouSoft.BLL.NewsStructure.NewsBll();
            IList <EyouSoft.Model.NewsStructure.NewsModel> lsNews     = new List <EyouSoft.Model.NewsStructure.NewsModel>();

            queryModel            = new EyouSoft.Model.NewsStructure.SearchOrderInfo();
            queryModel.ProvinceId = 35;
            lsNews = bll.GetList(pageSize, pageIndex, ref recordCount, queryModel);
            if (lsNews != null)
            {
                if (lsNews.Count > 0)
                {
                    string url = EyouSoft.Common.URLREWRITE.Infomation.GetNewsListAreaUrl(35);
                    ShowQuanGuoHtml = string.Format("<a href='{0}' target=\"_blank\">全国</a> ", url);
                }
            }
        }
Пример #4
0
        /// <summary>
        /// 新闻列表初始化
        /// </summary>
        private void DataInit()
        {
            EyouSoft.Model.NewsStructure.SearchOrderInfo SearchOrderInfo = new EyouSoft.Model.NewsStructure.SearchOrderInfo();
            //标题
            string Title = Utils.GetQueryStringValue("Title");

            //页数
            CurrencyPage = Utils.GetInt(Utils.GetQueryStringValue("page"), 1);
            //类别
            int ClassId = Utils.GetInt(Utils.GetQueryStringValue("ClassId"));
            //省份
            int ProId = Utils.GetInt(Utils.GetQueryStringValue("ProId"));
            //城市
            int CityId = Utils.GetInt(Utils.GetQueryStringValue("CityId"));
            //排序
            int Zhidin = Utils.GetInt(Utils.GetQueryStringValue("selZhidin"));
            //推荐
            string TueiJian = Utils.GetQueryStringValue("chkTueiJian").ToLower();

            SearchOrderInfo.Title = Title;
            if (ClassId != 0)
            {
                SearchOrderInfo.Type = ClassId;
            }
            if (ProId != 0)
            {
                SearchOrderInfo.ProvinceId = ProId;
            }
            if (CityId != 0)
            {
                SearchOrderInfo.City = CityId;
            }
            if (TueiJian == "true")
            {
                SearchOrderInfo.IsRecPositionId = true;
            }
            if (Zhidin != 0)
            {
                SearchOrderInfo.Source = (EyouSoft.Model.NewsStructure.AfficheSource)Zhidin;
            }

            if (ProId != 0)
            {
                ProvinceAndCityList1.SetProvinceId = ProId;
            }
            if (CityId != 0)
            {
                ProvinceAndCityList1.SetCityId = CityId;
            }
            if (Zhidin != 0)
            {
                selZhidin.Items.FindByValue(Zhidin.ToString()).Selected = true;
            }
            if (ClassId != 0)
            {
                selNewClass.Items.FindByValue(ClassId.ToString()).Selected = true;
            }
            chkTueiJian.Checked = TueiJian == "true" ? true : false;
            txtNewTitle.Value   = Title;
            EyouSoft.BLL.NewsStructure.NewsBll             NewsBll = new EyouSoft.BLL.NewsStructure.NewsBll();
            IList <EyouSoft.Model.NewsStructure.NewsModel> list    = NewsBll.GetList(intPageSize, CurrencyPage, ref RecordCount, SearchOrderInfo);

            this.repList.DataSource = list;
            this.repList.DataBind();
            BindFenYe();
        }
Пример #5
0
        /// <summary>
        /// 初始化资讯列表
        /// </summary>
        private void InitNewsList(int typeId)
        {
            lsNews = new List <EyouSoft.Model.NewsStructure.NewsModel>();

            //如果是关键字列表
            if (Request["TagId"] != null)
            {
                string tagName = string.Empty;
                EyouSoft.BLL.NewsStructure.TagKeyInfo   tagBll   = new EyouSoft.BLL.NewsStructure.TagKeyInfo();
                EyouSoft.Model.NewsStructure.TagKeyInfo tagModel = tagBll.GetModel(int.Parse(Request["TagId"].ToString()), EyouSoft.Model.NewsStructure.ItemCategory.Tag);

                if (tagModel != null)
                {
                    tagName = tagModel.ItemName;
                }

                this.Page.Title = string.Format(EyouSoft.Common.PageTitle.Information_List_Title, tagName + "-相关内容");

                //cateName = tagName == "" ? "行业资讯":tagName;
                cateName = "行业资讯";
                EyouSoft.Model.NewsStructure.SearchOrderInfo queryModel = new EyouSoft.Model.NewsStructure.SearchOrderInfo();
                queryModel.Tag = typeId;
                lsNews         = bll.GetList(pageSize, pageIndex, ref recordCount, queryModel);
            }
            else
            {
                //type<0表示是大类
                if (typeId < 0)
                {
                    queryModel          = new EyouSoft.Model.NewsStructure.SearchOrderInfo();
                    queryModel.Category = (EyouSoft.Model.NewsStructure.NewsCategory)(-typeId);
                    lsNews          = bll.GetList(pageSize, pageIndex, ref recordCount, queryModel);
                    cateName        = queryModel.Category.ToString();
                    this.Page.Title = string.Format(EyouSoft.Common.PageTitle.Information_List_Title, cateName);
                }
                else
                {
                    cateName        = newTypeBll.GetCategoryById(typeId) == null ? "" : ((EyouSoft.Model.NewsStructure.NewsCategory)newTypeBll.GetCategoryById(typeId)).ToString();
                    this.Page.Title = cateName;
                    className       = newTypeBll.GetNewsTypeName(typeId).ToString();
                    this.Page.Title = string.Format(EyouSoft.Common.PageTitle.Information_List_Title, className);

                    queryModel      = new EyouSoft.Model.NewsStructure.SearchOrderInfo();
                    queryModel.Type = typeId;
                    lsNews          = bll.GetList(pageSize, pageIndex, ref recordCount, queryModel);
                }
            }

            AddMetaTag("keywords", string.Format(EyouSoft.Common.PageTitle.Information_List_Keywords, cateName == "" ? className : cateName));
            AddMetaTag("description", string.Format(EyouSoft.Common.PageTitle.Information_List_Des, cateName == "" ? className : cateName));

            //如果有数据
            if (lsNews != null && lsNews.Count > 0)
            {
                rptNewsList.DataSource = lsNews;
                rptNewsList.DataBind();

                BindPage();
                BindUpPage();
            }
        }