Esempio n. 1
0
        /// <summary>
        /// 列表初始化
        /// </summary>
        protected void InitListData()
        {
            this.pageIndex = Utils.GetInt(Request.QueryString["Page"], 1);
            string         kw    = Server.UrlDecode(Utils.GetQueryStringValue("kw"));//关键字(标题、发布单位、资讯相关)
            MQueryPeerNews Model = new MQueryPeerNews();

            Model.KeyWord   = kw.Trim();
            Model.CompanyId = this.SiteUserInfo.CompanyID;
            IPeerNews         BLL = BPeerNews.CreateInstance();
            IList <MPeerNews> lst = BLL.GetGetPeerNewsList(this.pageSize, this.pageIndex, ref this.recordCount, Model);

            if (null != lst && lst.Count > 0)
            {
                this.RepList.DataSource = lst;
                this.RepList.DataBind();
                this.BindPage(kw);
            }
            else
            {
                this.RepList.Controls.Add(new Literal()
                {
                    Text = "<tr><td colspan='4' align='center'>暂无信息!</td></tr>"
                });
                this.ExportPageInfo1.Visible = false;
            }
        }
Esempio n. 2
0
        protected void InitData()
        {
            this.pageIndex = Utils.GetInt(Request.QueryString["Page"], 1);
            //是否显示”添加“按钮 //说明:添加按钮只对“专线商(地接)、景区、酒店“显示
            bool myShopFlag = !this.SiteUserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.组团);//this.SiteUserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.专线)||this.SiteUserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.地接) || this.SiteUserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.机票供应商) || this.SiteUserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.酒店) || this.SiteUserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.景区) || this.SiteUserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.车队) || this.SiteUserInfo.CompanyRole.HasRole(EyouSoft.Model.CompanyStructure.CompanyType.旅游用品店);

            this.btnAddInfo.Visible = myShopFlag;
            string         kw    = Server.UrlDecode(Utils.GetQueryStringValue("kw"));   //关键字(标题、发布单位)
            int            type  = Utils.GetInt(Utils.GetQueryStringValue("type"), -1); //分类
            MQueryPeerNews Model = new MQueryPeerNews();

            Model.KeyWord = kw.Trim();
            if (type != -1)
            {
                Model.TypeId = (PeerNewType)type;
            }
            IPeerNews         BLL = BPeerNews.CreateInstance();
            IList <MPeerNews> lst = BLL.GetGetPeerNewsList(this.pageSize, this.pageIndex, ref this.recordCount, Model);

            if (null != lst && lst.Count > 0)
            {
                this.RepList.DataSource = lst;
                this.RepList.DataBind();
                this.BindPage(kw, type.ToString());
            }
            else
            {
                this.RepList.Controls.Add(new Literal()
                {
                    Text = "<tr><td colspan='4' align='center'>暂无信息!</td></tr>"
                });
                this.ExportPageInfo1.Visible = false;
            }
        }