private void btnSaveAddCategory_Click(object sender, EventArgs e) { CategoryInfo category = this.GetCategory(); if (category != null) { if (ProductHelper.AddCategory(category) == CategoryActionStatus.Success) { this.ShowMsg("成功添加了商品类目", true); this.dropCategories.DataBind(); this.dropProductTypes.DataBind(); this.TerCateName.Text = string.Empty; this.TerCateImage.UploadedImageUrl = string.Empty; this.IsSuggest.Checked = false; this.txtCategoryName.Text = string.Empty; this.txtSKUPrefix.Text = string.Empty; this.txtRewriteName.Text = string.Empty; this.txtPageKeyTitle.Text = string.Empty; this.txtPageKeyWords.Text = string.Empty; this.txtPageDesc.Text = string.Empty; this.fckNotes1.Text = string.Empty; this.fckNotes2.Text = string.Empty; this.fckNotes3.Text = string.Empty; } else { this.ShowMsg("添加商品类目失败,未知错误", false); } } }
protected void btnAddCategory_Click(object sender, EventArgs e) { bool categoryAdded = ProductHelper.AddCategory(txtCategoryName.Text, Membership.GetUser().UserName, txtCategorySeoTitle.Text, txtCategorySeoDescription.Text, txtCategorySeoMetaKeywords.Text); if (categoryAdded) { lblCategoryStatus.Text = "Category Added"; lblCategoryStatus.ForeColor = System.Drawing.Color.Green; } else { lblCategoryStatus.Text = "Category Addition Failed"; lblCategoryStatus.ForeColor = System.Drawing.Color.Red; } }
private void btnSaveCategory_Click(object sender, EventArgs e) { CategoryInfo category = this.GetCategory(); if (category != null) { if (ProductHelper.AddCategory(category) == CategoryActionStatus.Success) { base.Response.Redirect(Globals.GetAdminAbsolutePath("/product/ManageCategories.aspx"), true); } else { this.ShowMsg("添加商品类目失败,未知错误", false); } } }