コード例 #1
0
        /// <summary>
        /// Initializes the controls.
        /// </summary>
        /// <param name="container">The container.</param>
        protected override void InitializeControls(Telerik.Sitefinity.Web.UI.GenericContainer container)
        {
            base.DesignerMode = ControlDesignerModes.Simple;

            // set root node for page selector
            PageSelector.RootNodeID = Telerik.Sitefinity.Abstractions.SiteInitializer.CurrentFrontendRootNodeId;
        }
コード例 #2
0
        /// <summary>
        /// Initializes the controls.
        /// </summary>
        /// <param name="container"></param>
        /// <remarks>
        /// Initialize your controls in this method. Do not override CreateChildControls method.
        /// </remarks>
        protected override void InitializeControls(Telerik.Sitefinity.Web.UI.GenericContainer container)
        {
            ((ITextControl)this.TitleControl).Text       = this.Title;
            ((ITextControl)this.ExampleControl).Text     = this.Example;
            ((ITextControl)this.DescriptionControl).Text = this.Description;

            this.PaymentMethodIdHidden.Value = this.Value.ToString();
        }
コード例 #3
0
 protected override void InitializeControls(Telerik.Sitefinity.Web.UI.GenericContainer container)
 {
     TwitterWidgetRenderMode.Items.Add(new ListItem()
     {
         Text = "Homepage", Value = "1"
     });
     TwitterWidgetRenderMode.Items.Add(new ListItem()
     {
         Text = "Interior page", Value = "2"
     });
 }
コード例 #4
0
        protected override void InitializeControls(Telerik.Sitefinity.Web.UI.GenericContainer container)
        {
            base.InitializeControls(container);

            List <string> taxonNames = new List <string>();

            GetAllTaxonNamesForDataItem(taxonNames);

            //gets the current user
            var user = ClaimsManager.GetCurrentIdentity();

            if (!user.IsUnrestricted)
            {
                //gets current user role names
                var currentUserRoleNames = user.Roles.Select(r => r.Name.ToLower());

                bool isDynamicItemAllowed = false;

                //always allowed for everyone
                if (taxonNames.Contains("pm-everyone"))
                {
                    isDynamicItemAllowed = true;
                    return;
                }

                foreach (var roleName in currentUserRoleNames)
                {
                    //filter dynamic items for Enterprise customers
                    if (taxonNames.Contains(roleName))
                    {
                        isDynamicItemAllowed = true;
                        break;
                    }
                }

                if (!isDynamicItemAllowed)
                {
                    Redirect403();
                }
            }
        }
コード例 #5
0
 protected override void InitializeControls(Telerik.Sitefinity.Web.UI.GenericContainer container)
 {
     base.DesignerMode = ControlDesignerModes.Simple;
 }
コード例 #6
0
 protected override void InitializeControls(Telerik.Sitefinity.Web.UI.GenericContainer container)
 {
     // Place your initialization logic here
     this.ConfigureMetaFieldName();
 }
コード例 #7
0
 protected override void InitializeControls(Telerik.Sitefinity.Web.UI.GenericContainer container)
 {
     base.DesignerMode = ControlDesignerModes.Simple;
     this.TempSelector.DesignedControlType = this.PropertyEditor.Control.GetType().FullName;
 }
コード例 #8
0
        protected override void InitializeControls(Telerik.Sitefinity.Web.UI.GenericContainer container)
        {
            base.InitializeControls(container);

            AddToCartButton.Command += new CommandEventHandler(AddToCartRentalButton_Command);
        }
コード例 #9
0
 protected override void InitializeControls(Telerik.Sitefinity.Web.UI.GenericContainer container)
 {
     this.PageSelector.RootNodeID = Telerik.Sitefinity.Abstractions.SiteInitializer.CurrentFrontendRootNodeId;
 }
コード例 #10
0
 protected override void InitializeControls(Telerik.Sitefinity.Web.UI.GenericContainer container)
 {
     // Place your initialization logic here
 }
コード例 #11
0
 protected override void InitializeControls(Telerik.Sitefinity.Web.UI.GenericContainer container)
 {
     base.InitializeControls(container);
     ShoppingCartGrid.ItemDataBound += ShoppingCartGrid_RentalsItemDataBound;
 }