Exemplo n.º 1
0
        private static void AddSiftaAdminLinks(Telerik.Web.UI.RadMenu menu)
        {
            var mainItem = new Telerik.Web.UI.RadMenuItem()
            {
                Text = "SIFTA Admin", OuterCssClass = "adminMenuItem"
            };

            mainItem.Items.Add(new Telerik.Web.UI.RadMenuItem("Metrics", "~/Reports/Metrics/national.aspx"));
            mainItem.Items.Add(new Telerik.Web.UI.RadMenuItem("Image Search", "~/Reports/Metrics/ImageSearch.aspx"));
            menu.Items.Add(mainItem);
        }
Exemplo n.º 2
0
        private void LoadMenu()
        {
            //Get the theme name if it isn't Orchestrator so that it can be used to select the menu
            string themeName = Page.Theme;

            if (themeName.Equals("Orchestrator", StringComparison.CurrentCultureIgnoreCase))
            {
                themeName = string.Empty;
            }

            if (user.IsInRole(((int)eUserRole.ClientUser).ToString()))
            {
                RadMenu1.LoadContentFile(string.Format("~/UserControls/menu{0}Client.xml", themeName));

                Telerik.Web.UI.RadMenuItem knaufMenuItem = null;

                // The knauf menu item must be on the First Menu
                knaufMenuItem = RadMenu1.Items.FindItemByText("Knauf Shunt Loading Sheet");

                if (knaufMenuItem != null)
                {
                    if (user.IsInRole(((int)eUserRole.KnaufLoadingSheetInClientPortal).ToString()))
                    {
                        knaufMenuItem.Visible = true;
                    }
                    else
                    {
                        knaufMenuItem.Visible = false;
                    }
                }
            }
            else if (!Page.IsPostBack)
            {
                RadMenu1.LoadContentFile(string.Format("~/UserControls/menu{0}Default.xml", themeName));
            }

            WhiteLabelHeader();
        }