/// <summary> /// 页面加载方法 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { CheckAdminPower("ReadProductBrand", PowerCheckType.Single); ProductBrandSearchInfo brandSearch = new ProductBrandSearchInfo(); brandSearch.Key = RequestHelper.GetQueryString <string>("Key"); brandSearch.IsTop = RequestHelper.GetQueryString <int>("IsTop"); Key.Text = brandSearch.Key; IsTop.Text = brandSearch.IsTop.ToString(); PageSize = Session["AdminPageSize"] == null ? 20 : Convert.ToInt32(Session["AdminPageSize"]); AdminPageSize.Text = Session["AdminPageSize"] == null ? "20" : Session["AdminPageSize"].ToString(); brandList = ProductBrandBLL.SearchList(CurrentPage, PageSize, brandSearch, ref Count); //BindControl(ProductBrandBLL.ReadList(), RecordList); BindControl(brandList, RecordList, MyPager); if (RequestHelper.GetQueryString <string>("Action") == "Delete") { int brandId = RequestHelper.GetQueryString <int>("ID"); if (brandId > 0) { CheckAdminPower("DeleteProductBrand", PowerCheckType.Single); string URL = "ProductBrand.aspx?Action=search&"; URL += "Key=" + Key.Text + "&"; URL += "IsTop=" + IsTop.Text; ProductBrandBLL.Delete(brandId); AdminLogBLL.Add(ShopLanguage.ReadLanguage("DeleteRecord"), ShopLanguage.ReadLanguage("ProductBrand"), brandId.ToString()); ScriptHelper.Alert(ShopLanguage.ReadLanguage("DeleteOK"), URL); } } } }