public ProductAttribute SaveInfo() { ProductAttribute productAttribute = ProductAttributeManager.GetProductAttributeById(this.ProductAttributeId, 0); if (productAttribute != null) { productAttribute = ProductAttributeManager.UpdateProductAttribute(productAttribute.ProductAttributeId, txtName.Text, txtDescription.Text); } else { productAttribute = ProductAttributeManager.InsertProductAttribute(txtName.Text, txtDescription.Text); } SaveLocalizableContent(productAttribute); return(productAttribute); }
private void BindData() { ProductAttribute productAttribute = ProductAttributeManager.GetProductAttributeById(this.ProductAttributeId, 0); if (this.HasLocalizableContent) { var languages = this.GetLocalizableLanguagesSupported(); rptrLanguageTabs.DataSource = languages; rptrLanguageTabs.DataBind(); rptrLanguageDivs.DataSource = languages; rptrLanguageDivs.DataBind(); } if (productAttribute != null) { this.txtName.Text = productAttribute.Name; this.txtDescription.Text = productAttribute.Description; } }
protected void DeleteButton_Click(object sender, EventArgs e) { try { ProductAttribute productAttribute = ProductAttributeManager.GetProductAttributeById(this.ProductAttributeId); if (productAttribute != null) { ProductAttributeManager.DeleteProductAttribute(productAttribute.ProductAttributeId); CustomerActivityManager.InsertActivity( "DeleteProductAttribute", GetLocaleResourceString("ActivityLog.DeleteProductAttribute"), productAttribute.Name); } Response.Redirect("ProductAttributes.aspx"); } catch (Exception exc) { ProcessException(exc); } }