Exemple #1
0
        /// <summary>
        /// 初使化绑定
        /// </summary>
        private void Bind()
        {
            int totalc    = 0;
            int pageSize  = 40;
            int pageIndex = Utils.GetInt(Request.QueryString["page"], 1);

            EyouSoft.Model.CommunityStructure.SearchInfo se = new EyouSoft.Model.CommunityStructure.SearchInfo();

            se.BeforeOrAfter = false;
            plist            = EyouSoft.BLL.SystemStructure.SysProvince.CreateInstance().GetProvinceList();
            exList           = EyouSoft.BLL.CommunityStructure.ExchangeList.CreateInstance().GetList(pageSize, pageIndex, ref totalc, se);
            piclist          = EyouSoft.BLL.CommunityStructure.BSupplyDemandPic.CreateInstance().GetList();
            msrlist          = EyouSoft.BLL.CommunityStructure.BSupplyDemandRule.CreateInstance().GetList();

            //分页控件初始化
            if (exList != null && exList.Count > 0)
            {
                if (EyouSoft.Common.URLREWRITE.UrlReWriteUtils.IsReWriteUrl(Request))
                {
                    this.ExporPageInfoSelect1.Placeholder  = "#PageIndex#";
                    this.ExporPageInfoSelect1.IsUrlRewrite = true;
                    this.ExporPageInfoSelect1.PageLinkURL  =
                        EyouSoft.Common.URLREWRITE.UrlReWriteUtils.GetUrlForPage(Request) + "_p#PageIndex#";
                }
                else
                {
                    this.ExporPageInfoSelect1.PageLinkURL = Request.ServerVariables["SCRIPT_NAME"].ToString() + "?";
                    this.ExporPageInfoSelect1.UrlParams   = Request.QueryString;
                }

                this.ExporPageInfoSelect1.intPageSize    = pageSize;
                this.ExporPageInfoSelect1.CurrencyPage   = pageIndex;
                this.ExporPageInfoSelect1.intRecordCount = totalc;
            }
        }
Exemple #2
0
        protected void BindInitPage()
        {
            CurrencyPage = Utils.GetInt(Request.QueryString["Page"], 1);
            EyouSoft.Model.CommunityStructure.SearchInfo Searchinfo = new EyouSoft.Model.CommunityStructure.SearchInfo();
            Searchinfo.ExchangeTitle    = Utils.GetQueryStringValue("KeyWord");
            Searchinfo.OfferId          = Utils.GetQueryStringValue("messageID");
            Searchinfo.ExchangeCategory = EyouSoft.Model.CommunityStructure.ExchangeCategory.QGroup;
            System.Collections.Generic.IList <EyouSoft.Model.CommunityStructure.ExchangeList> List = new EyouSoft.BLL.CommunityStructure.ExchangeList().GetList(intPageSize, CurrencyPage, ref intRecordCount, Searchinfo);
            if (List != null && List.Count > 0)
            {
                this.rptSupplierList.DataSource = List;
                this.rptSupplierList.DataBind();
                //绑定分页控件
                this.ExportPageInfo.intPageSize          = intPageSize;
                this.ExportPageInfo.intRecordCount       = intRecordCount;
                this.ExportPageInfo.CurrencyPage         = CurrencyPage;
                this.ExportPageInfo.CurrencyPageCssClass = "RedFnt";
                this.ExportPageInfo.UrlParams            = Request.QueryString;
                this.ExportPageInfo.PageLinkURL          = "/SupplierManage/QInformationManager.aspx?";
                this.ExportPageInfo.LinkType             = 3;
            }
            else
            {
                this.trNoData.Visible       = true;
                this.ExportPageInfo.Visible = false;
            }

            if (List != null)
            {
                List.Clear();
            }
            List = null;
        }
Exemple #3
0
        private void Bind()
        {
            sTime   = EyouSoft.Common.Utils.GetInt(Request.QueryString["stime"], 0);
            sTage   = EyouSoft.Common.Utils.GetInt(Request.QueryString["stag"], 0);
            sType   = EyouSoft.Common.Utils.GetInt(Request.QueryString["stype"], 0);
            sCat    = EyouSoft.Common.Utils.GetInt(Request.QueryString["sCat"], 0);
            sProvid = EyouSoft.Common.Utils.GetInt(Request.QueryString["sProvid"], -1);
            if (sProvid < 0)
            {
                sProvid = 0;
            }
            keyword = EyouSoft.Common.Utils.GetQueryStringValue("keyword");
            if (keyword == "请输入关键字")
            {
                keyword = "";
            }

            EyouSoft.Model.CommunityStructure.SearchInfo searchinfo = new EyouSoft.Model.CommunityStructure.SearchInfo();
            //searchinfo.City = CityId;
            searchinfo.ExchangeCategory = null;
            if (sCat > 0 && !IsLogin)
            {
                string strLoginUrl = EyouSoft.Security.Membership.UserProvider.BuildLoginAndReturnUrl(EyouSoft.Common.Domain.UserPublicCenter + Request.RawUrl, string.Empty);
                Response.Redirect(strLoginUrl);
            }
            else if (sCat > 0)
            {
                searchinfo.ExchangeCategory = (EyouSoft.Model.CommunityStructure.ExchangeCategory)sCat;
            }
            searchinfo.ExchangeTag = null;
            if (sTage > 0)
            {
                searchinfo.ExchangeTag = (EyouSoft.Model.CommunityStructure.ExchangeTag)sTage;
            }
            searchinfo.ExchangeTitle = keyword;
            searchinfo.ExchangeType  = null;
            if (sType > 0)
            {
                searchinfo.ExchangeType = (EyouSoft.Model.CommunityStructure.ExchangeType)sType;
            }
            searchinfo.Province = null;
            if (sProvid > 0)
            {
                searchinfo.Province = sProvid;
            }
            searchinfo.SearchDateTimeType = (EyouSoft.Model.CommunityStructure.SearchDateTimeTyoe)sTime;

            pageindex = EyouSoft.Common.Utils.GetInt(Request.QueryString["page"], 1);
            exList    = EyouSoft.BLL.CommunityStructure.ExchangeList.CreateInstance().GetList(pagesize, pageindex, ref totalcount, searchinfo);
            PageBind();
        }
Exemple #4
0
 /// <summary>
 /// 分页获取供求信息(请指定SearchInfo的BeforeOrAfter属性)
 /// </summary>
 /// <param name="pageSize">每页显示记录数</param>
 /// <param name="pageIndex">当前页</param>
 /// <param name="recordCount">总记录数</param>
 /// <param name="info">搜索实体</param>
 /// <returns>供求信息列表</returns>
 public IList <EyouSoft.Model.CommunityStructure.ExchangeList> GetList(int pageSize, int pageIndex, ref int recordCount, EyouSoft.Model.CommunityStructure.SearchInfo info)
 {
     if (info == null)
     {
         return(null);
     }
     return(dal.GetList(pageSize, pageIndex, ref recordCount, info));
 }