Пример #1
0
        /// <summary>
        /// 绑定同业资讯
        /// </summary>
        private void GetIndustrylist()
        {
            EyouSoft.Model.NewsStructure.MQueryPeerNews    mquery      = new EyouSoft.Model.NewsStructure.MQueryPeerNews();
            IList <EyouSoft.Model.NewsStructure.MPeerNews> PeerNewList = EyouSoft.BLL.NewsStructure.BPeerNews.CreateInstance().GetGetPeerNewsList(5, null);

            if (PeerNewList != null && PeerNewList.Count > 0)
            {
                //Title   TypeId  AreaName   AreaId  ScenicId  CompanyId
                this.rptPeerNewList.DataSource = PeerNewList;
                this.rptPeerNewList.DataBind();
            }
        }
Пример #2
0
        protected string GetOrationByUser()
        {
            StringBuilder sb = new StringBuilder();

            EyouSoft.IBLL.NewsStructure.IPeerNews bll = EyouSoft.BLL.NewsStructure.BPeerNews.CreateInstance();
            int count = 0;

            EyouSoft.Model.NewsStructure.MQueryPeerNews searchModel = new EyouSoft.Model.NewsStructure.MQueryPeerNews();
            //searchModel.CompanyId = UserInfoModel.CompanyID;
            searchModel.KeyWord       = "";
            searchModel.OrderIndex    = 4;
            searchModel.TypeId        = null;
            searchModel.IsShowHideNew = false;
            IList <EyouSoft.Model.NewsStructure.MPeerNews> list = bll.GetGetPeerNewsList(6, 1, ref count, searchModel);

            if (list != null && list.Count > 0)
            {
                for (int i = 0; i < list.Count; i++)
                {
                    sb.Append("<li>");
                    switch (list[i].TypeId)
                    {
                    case EyouSoft.Model.NewsStructure.PeerNewType.活动资讯:
                        sb.Append("<span class=\"hailan\"><strong>[活动资讯]</strong></span>");
                        break;

                    case EyouSoft.Model.NewsStructure.PeerNewType.旅行动态:
                        sb.Append("<span class=\"chengse\"><strong>[旅行动态]</strong></span>");
                        break;

                    case EyouSoft.Model.NewsStructure.PeerNewType.特价促销:
                        sb.Append("<span class=\"caolv\"><strong>[特价促销]</strong></span>");
                        break;

                    case EyouSoft.Model.NewsStructure.PeerNewType.业资料:
                        sb.Append("<span class=\"shenlan\"><strong>[同业资料]</strong></span>");
                        break;
                    }

                    //sb.Append("<a href='javascript:void(0)' onclick='return topTab.open('/TongYeInfo/InfoShow.aspx?infoId='" + list[i].NewId+",'我的同业资讯'); " + Utils.GetText(list[i].Title, 15, true) + "</a></li>");
                    sb.AppendFormat("<a href='javascript:void(0)' onclick=\"return topTab.open('/TongYeInfo/InfoShow.aspx?infoId={0}','查看同业资讯');\">{1}</a></li>", list[i].NewId, Utils.GetText(list[i].Title, 15, true));
                }
            }
            else
            {
                sb.Append("暂无资讯");
            }

            return(sb.ToString());
        }
Пример #3
0
        private void GetIndustrylList()
        {
            EyouSoft.Model.NewsStructure.MQueryPeerNews mquery = new EyouSoft.Model.NewsStructure.MQueryPeerNews();
            mquery.CompanyId = Master.CompanyId;
            IList <EyouSoft.Model.NewsStructure.MPeerNews> PeerNewList = EyouSoft.BLL.NewsStructure.BPeerNews.CreateInstance().GetGetPeerNewsList(PageSize, PageIndex, ref RecordCount, mquery);

            if (PeerNewList != null && PeerNewList.Count > 0)
            {
                this.ExporPageInfoSelect1.intPageSize    = PageSize;
                this.ExporPageInfoSelect1.intRecordCount = RecordCount;
                this.ExporPageInfoSelect1.CurrencyPage   = PageIndex;
                this.rptNewsList.DataSource = PeerNewList;
                this.rptNewsList.DataBind();
            }
            else
            {
                this.rptNewsList.EmptyText        = "无同业资讯!";
                this.ExporPageInfoSelect1.Visible = false;
            }
        }
Пример #4
0
        protected void BindInfo()
        {
            int intRecordCount = 0;
            //查询关键字
            string keyWord = Utils.InputText(Request.QueryString["k"]);

            if (Request.QueryString["Page"] == "" || StringValidate.IsInteger(Request.QueryString["Page"]) == false || Int32.Parse(Request.QueryString["Page"]) == 0)
            {
                CurrencyPage = 1;
            }
            else
            {
                CurrencyPage = Convert.ToInt32(Request.QueryString["Page"]);
            }

            EyouSoft.Model.NewsStructure.MQueryPeerNews querySearch = new EyouSoft.Model.NewsStructure.MQueryPeerNews();
            querySearch.CompanyId = this.Master.CompanyId;
            querySearch.KeyWord   = keyWord;
            IList <EyouSoft.Model.NewsStructure.MPeerNews> listNews = EyouSoft.BLL.NewsStructure.BPeerNews.CreateInstance().GetGetPeerNewsList(intPageSize, CurrencyPage, ref intRecordCount, querySearch);

            if (listNews != null && listNews.Count > 0)
            {
                //绑定数据源
                this.rptNewsList.DataSource = listNews;
                this.rptNewsList.DataBind();
                //绑定分页控件
                this.ExporPageInfoSelect1.intPageSize          = intPageSize;
                this.ExporPageInfoSelect1.intRecordCount       = intRecordCount;
                this.ExporPageInfoSelect1.CurrencyPage         = CurrencyPage;
                this.ExporPageInfoSelect1.CurrencyPageCssClass = "RedFnt";
                this.ExporPageInfoSelect1.UrlParams            = Request.QueryString;
                this.ExporPageInfoSelect1.PageLinkURL          = Request.ServerVariables["SCRIPT_NAME"].ToString() + "?";
                this.ExporPageInfoSelect1.LinkType             = 3;
            }
            else
            {
                this.ExporPageInfoSelect1.Visible = false;
            }
            listNews = null;
        }