private void BindData() { ProductAttribute productAttribute = ProductAttributeManager.GetProductAttributeByID(this.ProductAttributeID); if (productAttribute != null) { this.txtName.Text = productAttribute.Name; this.txtDescription.Text = productAttribute.Description; } }
public ProductAttribute SaveInfo() { ProductAttribute productAttribute = ProductAttributeManager.GetProductAttributeByID(this.ProductAttributeID); if (productAttribute != null) { productAttribute = ProductAttributeManager.UpdateProductAttribute(productAttribute.ProductAttributeID, txtName.Text, txtDescription.Text); } else { productAttribute = ProductAttributeManager.InsertProductAttribute(txtName.Text, txtDescription.Text); } return(productAttribute); }