void btnUpdate_Click(object sender, EventArgs e)
{
if (ViewState[CMSViewStateManager.AttributeID] != null && ucPortalLanguage.SelectedLanguageID > 0)
{
try
{
AJH.CMS.Core.Entities.Attribute attribute =
AttributeManager.GetAttribute(Convert.ToInt32(ViewState[CMSViewStateManager.AttributeID]), CMSContext.LanguageID);
if (attribute != null)
{
attribute.Name = txtName.Text;
attribute.GroupID = Convert.ToInt32(ddlGroup.SelectedValue);
attribute.LanguageID = ucPortalLanguage.SelectedLanguageID;
attribute.ModuleID = (int)CMSEnums.ECommerceModule.Attribute;
AttributeManager.Update(attribute);
FillAttributes(-1);
upnlAttribute.Update();
}
}
catch (Exception ex)
{
dvProblems.Visible = true;
dvProblems.InnerText = ex.ToString();
upnlAttribute.Update();
}
}
}