void btnSaveOtherLanguage_Click(object sender, EventArgs e)
{
if (ViewState[CMSViewStateManager.CatalogID] != null && ucPortalLanguage.SelectedLanguageID > 0)
{
try
{
// Update Info Except Language Info :
Catalog catalog =
CatalogManager.GetCatalog(Convert.ToInt32(ViewState[CMSViewStateManager.CatalogID]), CMSContext.LanguageID);
if (catalog != null)
{
catalog.IsDisplayed = cbIsDisplayed.Checked;
catalog.IsGalleryOnly = cbIsGalleryOnly.Checked;
catalog.IsPublished = cbIsPublishedOnslider.Checked;
int parentCatalogId = -1;
int.TryParse(ddlParentCatalog.SelectedValue, out parentCatalogId);
catalog.ParentCalalogID = parentCatalogId;
CatalogManager.Update(catalog);
//SaveLanguage Info Only :
Catalog langCatalog = new Catalog
{
ID = Convert.ToInt32(ViewState[CMSViewStateManager.CatalogID]),
Name = txtName.Text,
Description = txtDescription.Text,
MetaTitle = txtMetaTitle.Text,
MetaDescription = txtMetaDescription.Text,
MetaKeywords = txtMetaKeywords.Text,
LanguageID = ucPortalLanguage.SelectedLanguageID,
ModuleID = (int)CMSEnums.ECommerceModule.Catalog,
};
CatalogManager.AddOtherLanguage(langCatalog);
BeginAddMode();
FillCatalogTree();
upnlCatalog.Update();
upnlCatalogItem.Update();
}
}
catch (Exception ex)
{
dvProblems.Visible = true;
dvProblems.InnerText = ex.ToString();
upnlCatalog.Update();
}
}
}
#endregion