protected void Page_Load(object sender, EventArgs e) { if (!base.IsPostBack) { PubFunction.BindSysAreaNew(this.sltProvince, 0); Chain.BLL.SysShop bllShop = new Chain.BLL.SysShop(); DataTable dt = bllShop.GetList("ShopID>0").Tables[0]; string strSql = "ShopID>0 and ShopType=3 "; if (base.Request.QueryString["key"] != null) { string key = base.Request.QueryString["key"].ToString(); if (key != "") { strSql = strSql + " and ShopName like'%" + key + "%'"; this.txtKey.Value = key; } } if (base.Request.QueryString["pid"] != null) { if (base.Request.QueryString["pid"] != "") { strSql = strSql + " and ShopProvince=" + base.Request.QueryString["pid"]; PubFunction.BindSysAreaNew(this.sltCity, int.Parse(base.Request.QueryString["pid"])); } this.txtPID.Value = base.Request.QueryString["pid"]; this.sltProvince.Value = base.Request.QueryString["pid"]; } if (base.Request.QueryString["cid"] != null) { if (base.Request.QueryString["cid"] != "") { strSql = strSql + " and ShopCity=" + base.Request.QueryString["cid"]; PubFunction.BindSysAreaNew(this.sltCounty, int.Parse(base.Request.QueryString["cid"])); } this.txtCID.Value = base.Request.QueryString["cid"]; this.sltCity.Value = base.Request.QueryString["cid"]; } if (base.Request.QueryString["cyid"] != null) { if (base.Request.QueryString["cyid"] != "") { strSql = strSql + " and ShopCounty=" + base.Request.QueryString["cyid"]; } this.txtCYID.Value = base.Request.QueryString["cyid"]; this.sltCounty.Value = base.Request.QueryString["cyid"]; } if (base.Request.QueryString["type"] == "all") { dt = bllShop.GetList(strSql).Tables[0]; } else { dt = bllShop.GetList(10, strSql, "ShopCreateTime").Tables[0]; } this.rptShop.DataSource = dt; this.rptShop.DataBind(); if (dt.Rows.Count < 10 || base.Request.QueryString["type"] == "all") { this.moreShop.Attributes.Add("style", "display:none"); } } }