protected void SubmitButton_Click(object sender, EventArgs e) { ProductBrandInfo productBrand = new ProductBrandInfo();; productBrand.ID = RequestHelper.GetQueryString <int>("ID"); productBrand.Name = this.Name.Text; productBrand.Logo = this.Logo.Text; productBrand.Url = this.Url.Text; productBrand.Description = this.Description.Text; productBrand.IsTop = Convert.ToInt32(this.IsTop.Text); productBrand.ProductCount = 0; string alertMessage = ShopLanguage.ReadLanguage("AddOK"); if (productBrand.ID == -2147483648) { base.CheckAdminPower("AddProductBrand", PowerCheckType.Single); int id = ProductBrandBLL.AddProductBrand(productBrand); AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("AddRecord"), ShopLanguage.ReadLanguage("ProductBrand"), id); } else { base.CheckAdminPower("UpdateProductBrand", PowerCheckType.Single); ProductBrandBLL.UpdateProductBrand(productBrand); AdminLogBLL.AddAdminLog(ShopLanguage.ReadLanguage("UpdateRecord"), ShopLanguage.ReadLanguage("ProductBrand"), productBrand.ID); alertMessage = ShopLanguage.ReadLanguage("UpdateOK"); } AdminBasePage.Alert(alertMessage, RequestHelper.RawUrl); }