/// <summary> /// 初始化 /// </summary> private void InitPage() { CompanyId = ((SeniorOnlineShop.master.ScenicSpotsT1)base.Master).CompanyId; CurrencyPage = StringValidate.GetIntValue(Request.QueryString["Page"], 1); var qmodel = new EyouSoft.Model.ScenicStructure.MScenicImgSearch { ImgType = new EyouSoft.Model.ScenicStructure.ScenicImgType?[] { EyouSoft.Model.ScenicStructure.ScenicImgType.景区形象, EyouSoft.Model.ScenicStructure.ScenicImgType.其他 } }; IList <EyouSoft.Model.ScenicStructure.MScenicImg> list = EyouSoft.BLL.ScenicStructure.BScenicImg.CreateInstance().GetList(intPageSize, CurrencyPage, ref intRecordCount, CompanyId, qmodel); if (list != null && list.Count > 0) { //加上文件系统URL前缀 ((List <EyouSoft.Model.ScenicStructure.MScenicImg>)list).ForEach(item => { item.Address = EyouSoft.Common.Domain.FileSystem + item.Address; item.ThumbAddress = EyouSoft.Common.Domain.FileSystem + item.ThumbAddress; }); this.rptData.DataSource = list; this.rptData.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 = "/scenicspots/t1/ScenicBeauties.aspx?"; this.ExporPageInfoSelect1.LinkType = 3; if (EyouSoft.Common.URLREWRITE.UrlReWriteUtils.IsReWriteUrl(Request)) { //是否重写 分页的链接 this.ExporPageInfoSelect1.IsUrlRewrite = true; //设置需要替换的值 this.ExporPageInfoSelect1.Placeholder = "#PageIndex#"; //获得线路的url 赋值给分页控件 this.ExporPageInfoSelect1.PageLinkURL = EyouSoft.Common.URLREWRITE.UrlReWriteUtils.GetUrlForPage(Request) + "_#PageIndex#"; } else { this.ExporPageInfoSelect1.PageLinkURL = Request.ServerVariables["SCRIPT_NAME"].ToString() + "?"; this.ExporPageInfoSelect1.UrlParams = Request.QueryString; } } else { NoData.Visible = true; } list = null; }
protected void Page_Load(object sender, EventArgs e) { CompanyId = Request.QueryString["cid"]; TabIndex = Request.QueryString["st"]; type = (SeniorOnlineShop.master.SPOTT1TAB)Enum.Parse(typeof(SeniorOnlineShop.master.SPOTT1TAB), TabIndex); StrTitle = EyouSoft.Common.Utils.GetQueryStringValue("title").Trim(); CurrencyPage = StringValidate.GetIntValue(Request.QueryString["Page"], 1); InitPage(); }
private void ShowGuides(int TypeId) { EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType tripguidetype = EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.风土人情; switch (TypeId) { case 1: tripguidetype = EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.风土人情; break; case 2: tripguidetype = EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.温馨提醒; break; case 3: tripguidetype = EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.综合介绍; break; } guidType = tripguidetype.ToString(); CurrencyPage = StringValidate.GetIntValue(Request.QueryString["Page"], 1); IList <EyouSoft.Model.ShopStructure.HighShopTripGuide> list = EyouSoft.BLL.ShopStructure.HighShopTripGuide.CreateInstance().GetList(intPageSize, CurrencyPage, ref intRecordCount, Master.CompanyId, "", tripguidetype); if (list != null && list.Count > 0) { this.rptGuides.DataSource = list; this.rptGuides.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 { GuideHtml = "<div style=\"text-align:center;margin-top:75px; margin-bottom:75px;\">暂无风土人情信息!</div>"; } list = null; }
/// <summary> /// 读取景区列表 /// </summary> protected void InitPage() { CompanyId = ((SeniorOnlineShop.master.ScenicSpotsT1)base.Master).CompanyId; CurrencyPage = StringValidate.GetIntValue(Request.QueryString["Page"], 1); IList <MScenicArea> listArea = BScenicArea.CreateInstance().GetList(intPageSize, CurrencyPage, ref intRecordCount, CompanyId); if (listArea != null && listArea.Count > 0) { rpt_Scenic.DataSource = listArea; rpt_Scenic.DataBind(); //绑定分页控件 this.ExporPageInfoSelect1.intPageSize = intPageSize; this.ExporPageInfoSelect1.intRecordCount = intRecordCount; this.ExporPageInfoSelect1.CurrencyPage = CurrencyPage; this.ExporPageInfoSelect1.CurrencyPageCssClass = "RedFnt"; this.ExporPageInfoSelect1.UrlParams = Request.QueryString; if (EyouSoft.Common.URLREWRITE.UrlReWriteUtils.IsReWriteUrl(Request)) { //是否重写 分页的链接 this.ExporPageInfoSelect1.IsUrlRewrite = true; //设置需要替换的值 this.ExporPageInfoSelect1.Placeholder = "#Page#"; //获得线路的url 赋值给分页控件 this.ExporPageInfoSelect1.PageLinkURL = EyouSoft.Common.URLREWRITE.UrlReWriteUtils.GetUrlForPage(Request) + "_#Page#"; } else { this.ExporPageInfoSelect1.PageLinkURL = Request.ServerVariables["SCRIPT_NAME"].ToString() + "?"; this.ExporPageInfoSelect1.UrlParams = Request.QueryString; } //this.ExporPageInfoSelect1.PageLinkURL = "/scenicspots/t1/ScenicArea.aspx?"; this.ExporPageInfoSelect1.LinkType = 3; } }