protected override void OnPreRender(EventArgs e) { cMaster = (SeniorOnlineShop.master.ScenicSpotsT1) this.Page.Master; if (cMaster == null) { Utils.ShowError("当前页面模板页错误!", "景区网店"); return; } 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(RowSize * CellSize, cMaster.CompanyId, qmodel); if (list != null && list.Count > 0) { dlPics.RepeatColumns = CellSize; dlPics.DataSource = list; dlPics.DataBind(); } list = null; base.OnPreRender(e); }
/// <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; }
/// <summary> /// 初始化景区美图 /// </summary> private void InitJQMT() { var qmodel = new EyouSoft.Model.ScenicStructure.MScenicImgSearch { ImgType = new EyouSoft.Model.ScenicStructure.ScenicImgType?[] { EyouSoft.Model.ScenicStructure.ScenicImgType.景区形象, EyouSoft.Model.ScenicStructure.ScenicImgType.其他 } }; var items = EyouSoft.BLL.ScenicStructure.BScenicImg.CreateInstance().GetList(8, Master.CompanyId, qmodel); this.rptJQMT.DataSource = items; this.rptJQMT.DataBind(); }
private void InitTradeGuid() { IList <EyouSoft.Model.ShopStructure.HighShopTripGuide> list = null; list = EyouSoft.BLL.ShopStructure.HighShopTripGuide.CreateInstance().GetWebList(5, SiteUserInfo.CompanyID, (int)EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.景区动态, string.Empty); if (list != null && list.Count > 0) { this.rptTripGuideDT.DataSource = list; this.rptTripGuideDT.DataBind(); } list = null; list = EyouSoft.BLL.ShopStructure.HighShopTripGuide.CreateInstance().GetWebList(5, SiteUserInfo.CompanyID, (int)EyouSoft.Model.ShopStructure.HighShopTripGuide.TripGuideType.景区线路, string.Empty); if (list != null && list.Count > 0) { this.rptTripGuideXL.DataSource = list; this.rptTripGuideXL.DataBind(); } list = null; var qmodel = new EyouSoft.Model.ScenicStructure.MScenicImgSearch { ImgType = new EyouSoft.Model.ScenicStructure.ScenicImgType?[] { EyouSoft.Model.ScenicStructure.ScenicImgType.景区形象, EyouSoft.Model.ScenicStructure.ScenicImgType.其他 } }; var listImg = EyouSoft.BLL.ScenicStructure.BScenicImg.CreateInstance().GetList(8, SiteUserInfo.CompanyID, qmodel); if (listImg != null && listImg.Count > 0) { this.rptTripGuideMT.DataSource = listImg; this.rptTripGuideMT.DataBind(); } list = null; }
/// <summary> /// 初始化 /// </summary> private void InitPage() { int intRecordCount = 0; int count = 0; string CompanyId = ((SeniorOnlineShop.master.ScenicSpotsT1)base.Master).CompanyId; string NeedId = Request.QueryString["id"]; var qmodel = new EyouSoft.Model.ScenicStructure.MScenicImgSearch { ImgType = new EyouSoft.Model.ScenicStructure.ScenicImgType?[] { EyouSoft.Model.ScenicStructure.ScenicImgType.景区导游地图, EyouSoft.Model.ScenicStructure.ScenicImgType.景区形象, EyouSoft.Model.ScenicStructure.ScenicImgType.其他 } }; IList <EyouSoft.Model.ScenicStructure.MScenicImg> list = EyouSoft.BLL.ScenicStructure.BScenicImg.CreateInstance().GetList(0, CompanyId, qmodel); if (list != null && list.Count > 0) { AllImagePathString = "["; ((List <EyouSoft.Model.ScenicStructure.MScenicImg>)list).ForEach(item => { count++; if (NeedId == item.ImgId) { index = count; CurrImagePath = EyouSoft.Common.Domain.FileSystem + item.Address; } AllImagePathString += "'" + item.ThumbAddress + "',"; }); AllImagePathString = AllImagePathString.TrimEnd(','); AllImagePathString += "]"; } list = null; }