private void BeginEditMode()
{
if (ViewState[CMSViewStateManager.CatalogID] != null)
{
Catalog catalog =
CatalogManager.GetCatalog(Convert.ToInt32(ViewState[CMSViewStateManager.CatalogID]), CMSContext.LanguageID);
if (catalog != null)
{
pnlCatalogItem.Visible = true;
ucPortalLanguage.Visible = true;
ucPortalLanguage.SelectedLanguageID = catalog.LanguageID;
txtName.Text = catalog.Name;
cbIsDisplayed.Checked = catalog.IsDisplayed;
cbIsGalleryOnly.Checked = catalog.IsGalleryOnly;
cbIsPublishedOnslider.Checked = catalog.IsPublished;
cddlParentCatalog.Category = catalog.ID.ToString();
if (catalog.ParentCalalogID > 0)
cddlParentCatalog.SelectedValue = catalog.ParentCalalogID.ToString();
txtDescription.Text = catalog.Description;
txtMetaTitle.Text = catalog.MetaTitle;
txtMetaDescription.Text = catalog.MetaDescription;
txtMetaKeywords.Text = catalog.MetaKeywords;
txtCatalogOrder.Text = catalog.Order.ToString();
btnSave.Visible = false;
btnSaveOtherLanguage.Visible = false;
btnUpdate.Visible = true;
//Fill all Products:
FillAllProducts(catalog.ID, ucPortalLanguage.SelectedLanguageID);
FillCatalogProducts(catalog.ID, ucPortalLanguage.SelectedLanguageID);
//Fill Catalog Images :
FillCatalogImages(catalog.ID);
upnlCatalogImage.Update();
upnlProductCatalog.Update();
}
}
}
#endregion