private void UpdateFieldsFromObject() { Name.Text = selectedItem.Name; MediaTypeHandler.SetValue(selectedItem.MediaTypeHandler); if (selectedItem.MasterPage != null) { MasterPageSelector.SelectedValue = selectedItem.MasterPage.ID.ToString(); } Label.Text = selectedItem.Label; IsActive.Checked = selectedItem.IsActive; ShowInMenu.Checked = selectedItem.ShowInMenu; ShowInSiteTree.Checked = selectedItem.ShowInSiteTree; ShowInSearchResults.Checked = selectedItem.ShowInSearchResults; EnableCaching.Checked = selectedItem.EnableCaching; MainLayout.Text = selectedItem.MainLayout; SummaryLayout.Text = selectedItem.SummaryLayout; FeaturedLayout.Text = selectedItem.FeaturedLayout; UseMediaTypeLayouts.Checked = selectedItem.UseMediaTypeLayouts; MultiRoleSelector.SetSelectedRoles(selectedItem.GetRoles()); MultiMediaTypeSelector.SetMediaTypes(selectedItem.MediaTypes.ToList()); OnPublishExecuteCode.Text = selectedItem.OnPublishExecuteCode; }
public void UpdateFieldsFromObject() { CanLimitedRolesAccessAllChildPages.Checked = selectedItem.CanLimitedRolesAccessAllChildPages; EnforceRoleLimitationOnFrontEnd.Checked = selectedItem.EnforceRoleLimitationsOnFrontEnd; if (!IsPostBack) { MultiRoleSelector.SetSelectedRoles(this.selectedItem.Media.RolesMedias.Select(i => i.Role).ToList()); } }