private void InitPage() { int intRecordCount = 0; #region 初始化查询条件 intPageIndex = Utils.GetInt(Request.QueryString["Page"], 1); //SceniceId = Utils.GetQueryStringValue("SceniceId"); SceniceName = Utils.GetQueryStringValue("SceniceName"); this.txtSceniceName.Value = SceniceName; #endregion EyouSoft.Model.ScenicStructure.MSearchSceniceArea Search = new EyouSoft.Model.ScenicStructure.MSearchSceniceArea(); Search.CompanyId = CompanyId; Search.ScenicName = SceniceName; SceniceListAndTickets = EyouSoft.BLL.ScenicStructure.BScenicArea.CreateInstance().GetListAndTickets(intPageSize, intPageIndex, ref intRecordCount, Search); this.repSceniceList.DataSource = SceniceListAndTickets; this.repSceniceList.DataBind(); if (SceniceListAndTickets.Count <= 0) { this.NoData.Visible = true; } SceniceListAndTickets = null; this.ExportPageInfo1.intPageSize = intPageSize; this.ExportPageInfo1.CurrencyPage = intPageIndex; this.ExportPageInfo1.intRecordCount = intRecordCount; this.ExportPageInfo1.PageLinkURL = Request.ServerVariables["SCRIPT_NAME"].ToString() + "?"; }
//绑定页面列表 protected void BingPageList() { intPageIndex = Utils.GetInt(Request.QueryString["Page"], 1); //景区门票查询实体 EyouSoft.Model.ScenicStructure.MSearchSceniceArea SearchTicket = new EyouSoft.Model.ScenicStructure.MSearchSceniceArea(); if (Utils.GetQueryStringValue("LevelID") != "") { SearchTicket.Level = (EyouSoft.Model.ScenicStructure.ScenicLevel)Enum.Parse(typeof(EyouSoft.Model.ScenicStructure.ScenicLevel), Utils.GetQueryStringValue("LevelID")); } //景区主题 SearchTicket.ThemeId = Utils.GetIntNull(Utils.GetQueryStringValue("themeId")); //省份 SearchTicket.ProvinceId = Utils.GetIntNull(Utils.GetQueryStringValue("ProvinceId")); if (Utils.GetIntNull(Utils.GetQueryStringValue("ProvinceId")) == 0) { SearchTicket.ProvinceId = null; } //城市 SearchTicket.CityId = Utils.GetIntNull(Utils.GetQueryStringValue("CityId")); if (Utils.GetIntNull(Utils.GetQueryStringValue("CityId")) == 0) { SearchTicket.CityId = null; } //县区 SearchTicket.CountyId = Utils.GetIntNull(Utils.GetQueryStringValue("CountyID")); if (Utils.GetIntNull(Utils.GetQueryStringValue("CountyID")) == 0) { SearchTicket.CountyId = null; } //排序方式 if (Utils.GetQueryStringValue("sortType") != "") { SearchTicket.Type = Convert.ToInt32(Utils.GetQueryStringValue("sortType")); } //景区名称 SearchTicket.ScenicName = Utils.GetQueryStringValue("SceniceName"); SearchTicket.Status = EyouSoft.Model.ScenicStructure.ExamineStatus.已审核; //绑定列表 //这个到时候底层会在加一个参数----易诺景区编号(char(36))的 到时候你从webconfig中取值后传给底层 SearchTicket.YiNuo = EyouSoft.Common.ConfigModel.ConfigClass.GetConfigString("appSettings", "TongYe114SightId"); System.Collections.Generic.IList <EyouSoft.Model.ScenicStructure.MScenicArea> Ticketslist = new EyouSoft.BLL.ScenicStructure.BScenicArea().GetListAndTickets(intPageSize, intPageIndex, ref RecordCount, SearchTicket); if (Ticketslist != null && Ticketslist.Count > 0) { this.CustomRepeater1.DataSource = Ticketslist; this.CustomRepeater1.DataBind(); InitPage(); } else { this.ExportPageInfo1.Visible = false; this.lit_msg.Text = "对不起,暂时没有景区门票信息!"; } }
/// <summary> /// 查询 /// </summary> /// <param name="searchVal"></param> /// <param name="ProvinceRequired"></param> /// <param name="CityRequired"></param> protected void DataInitBySearch(string searchVal, int ProvinceRequired, int CityRequired, int ThemeId) { EyouSoft.Model.ScenicStructure.MSearchSceniceArea SearchModel = new EyouSoft.Model.ScenicStructure.MSearchSceniceArea(); if (ThemeId != 0) { SearchModel.ThemeId = ThemeId; } else { SearchModel.ThemeId = null; } if (ProvinceRequired != 0) { SearchModel.ProvinceId = ProvinceRequired; } else { SearchModel.ProvinceId = null; } if (CityRequired != 0) { SearchModel.CityId = CityRequired; } else { SearchModel.CityId = null; } SearchModel.ScenicName = searchVal; IList <EyouSoft.Model.ScenicStructure.MScenicArea> SceniceList = EyouSoft.BLL.ScenicStructure.BScenicArea.CreateInstance().GetPublicList(pageSize, pageIndex, ref recordCount, SearchModel); if (SceniceList != null) { foreach (var item in SceniceList) { //if (item.B2B == EyouSoft.Model.ScenicStructure.ScenicB2BDisplay.隐藏) //{ // SceniceList.Remove(item); //} SceniceNameList += item.ScenicName + ","; } } this.SceniceList.DataSource = null; this.SceniceList.DataSource = SceniceList; this.SceniceList.DataBind(); BindPage(); SceniceList = null; }
protected void Page_Load(object sender, EventArgs e) { EyouSoft.Model.ScenicStructure.MSearchSceniceArea model = new EyouSoft.Model.ScenicStructure.MSearchSceniceArea(); FrontPage page = this.Page as FrontPage; cityid = page.CityId; model.IsQH = false; model.B2B = (ScenicB2BDisplay)0; IList <MScenicArea> HotSceniclist = EyouSoft.BLL.ScenicStructure.BScenicArea.CreateInstance().GetList(6, "", model); if (HotSceniclist != null && HotSceniclist.Count > 0) { //IList<MScenicImg> imglist = new List<MScenicImg>(); //Img ScenicName ScenicId this.rptHotScenic.DataSource = HotSceniclist; this.rptHotScenic.DataBind(); } }
/// <summary> /// 绑定会员列表 /// </summary> protected void BindCompanyList() { int recordCount = 0; int ProvinceId = EyouSoft.Common.Function.StringValidate.GetIntValue(Request.QueryString["ProvinceId"]); int CityId = EyouSoft.Common.Function.StringValidate.GetIntValue(Request.QueryString["CityId"]); int CountyId = EyouSoft.Common.Function.StringValidate.GetIntValue(Request.QueryString["CountyId"]); int Status = EyouSoft.Common.Function.StringValidate.GetIntValue(Request.QueryString["Status"]); int B2B = -1; if (Request.QueryString["B2B"] != "") { B2B = EyouSoft.Common.Function.StringValidate.GetIntValue(Request.QueryString["B2B"]); } int B2C = -1; if (Request.QueryString["B2C"] != "") { B2C = EyouSoft.Common.Function.StringValidate.GetIntValue(Request.QueryString["B2C"]); } string ScenicName = Utils.InputText(Request.QueryString["ScenicName"]); EyouSoft.Model.ScenicStructure.MSearchSceniceArea SearchModel = new EyouSoft.Model.ScenicStructure.MSearchSceniceArea(); if (ProvinceId > 0) { SearchModel.ProvinceId = ProvinceId; } if (CityId > 0) { SearchModel.CityId = CityId; } if (CountyId > 0) { SearchModel.CountyId = CountyId; } if (ScenicName != "") { SearchModel.ScenicName = ScenicName; } if (Status != 0) { SearchModel.Status = (ExamineStatus)Status; } if (B2B > 0 || B2B == 0) { SearchModel.B2B = (ScenicB2BDisplay)B2B; } if (B2C > 0 || B2C == 0) { SearchModel.B2C = (ScenicB2CDisplay)B2C; } IList <MScenicArea> listScenicArea = EyouSoft.BLL.ScenicStructure.BScenicArea.CreateInstance().GetList(PageSize, PageIndex, ref recordCount, SearchModel); if (listScenicArea.Count > 0) { this.ExporPageInfoSelect1.intPageSize = PageSize; this.ExporPageInfoSelect1.intRecordCount = recordCount; this.ExporPageInfoSelect1.CurrencyPage = PageIndex; this.ExporPageInfoSelect1.HrefType = Adpost.Common.ExporPage.HrefTypeEnum.JsHref; this.ExporPageInfoSelect1.AttributesEventAdd("onclick", "ScenicManage.LoadData(this);", 1); this.ExporPageInfoSelect1.AttributesEventAdd("onchange", "ScenicManage.LoadData(this);", 0); this.repList.DataSource = listScenicArea; this.repList.DataBind(); } else { StringBuilder strEmptyText = new StringBuilder(); strEmptyText.Append("<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"1\" class=\"kuang\">"); strEmptyText.Append("<tr background=\"" + ImageServerUrl + "/images/yunying/hangbg.gif\" class=\"white\" height=\"23\">"); strEmptyText.AppendFormat("<td width=\"5%\" height=\"23\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"> <strong>序号</strong> </td> <td width=\"7%\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"> <strong>经营范围</strong></td>", ImageServerUrl); strEmptyText.AppendFormat("<td width=\"15%\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"><strong>景区名</strong></td><td width=\"10%\" align=\"center\" background=\"{0}/images/yunying/hangbg.gif\"> <strong>地区</strong></td>", ImageServerUrl); strEmptyText.AppendFormat("<td width=\"12%\" align=\"center\" background=\"{0}/images/yunying/hangbg.gif\"><strong>管理公司</strong></td><td width=\"13%\" align=\"center\" background=\"{0}/images/yunying/hangbg.gif\"> <strong>联系方式</strong></td>", ImageServerUrl); strEmptyText.AppendFormat("<td align=\"center\" background=\"{0}/images/yunying/hangbg.gif\"> <strong>状态</strong></td><td width=\"11%\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"><strong>B2B</strong></td>", ImageServerUrl); strEmptyText.AppendFormat("<td width=\"7%\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"><strong>B2C</strong> </td><td width=\"8%\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"><strong>点击量</strong></td>", ImageServerUrl); strEmptyText.AppendFormat("<td width=\"7%\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"><strong>景区管理</strong> </td><td width=\"8%\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"><strong>门票管理</strong></td>", ImageServerUrl); strEmptyText.Append("<tr class=\"huanghui\" ><td align='center' colspan='10' height='100px'>暂无景区信息</td></tr>"); strEmptyText.Append("</tr>"); strEmptyText.Append("<tr background=\"" + ImageServerUrl + "/images/yunying/hangbg.gif\" class=\"white\" height=\"23\">"); strEmptyText.AppendFormat("<td width=\"5%\" height=\"23\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"> <strong>序号</strong> </td> <td width=\"7%\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"> <strong>经营范围</strong></td>", ImageServerUrl); strEmptyText.AppendFormat("<td width=\"15%\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"><strong>景区名</strong></td><td width=\"10%\" align=\"center\" background=\"{0}/images/yunying/hangbg.gif\"> <strong>地区</strong></td>", ImageServerUrl); strEmptyText.AppendFormat("<td width=\"12%\" align=\"center\" background=\"{0}/images/yunying/hangbg.gif\"><strong>管理公司</strong></td><td width=\"13%\" align=\"center\" background=\"{0}/images/yunying/hangbg.gif\"> <strong>联系方式</strong></td>", ImageServerUrl); strEmptyText.AppendFormat("<td align=\"center\" background=\"{0}/images/yunying/hangbg.gif\"> <strong>状态</strong></td><td width=\"11%\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"><strong>B2B</strong></td>", ImageServerUrl); strEmptyText.AppendFormat("<td width=\"7%\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"><strong>B2C</strong> </td><td width=\"8%\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"><strong>点击量</strong></td>", ImageServerUrl); strEmptyText.AppendFormat("<td width=\"7%\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"><strong>景区管理</strong> </td><td width=\"8%\" align=\"center\" valign=\"middle\" background=\"{0}/images/yunying/hangbg.gif\"><strong>门票管理</strong></td>", ImageServerUrl); strEmptyText.Append("</tr>"); strEmptyText.Append("</table>"); this.repList.EmptyText = strEmptyText.ToString(); } SearchModel = null; listScenicArea = null; }