Ejemplo n.º 1
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            //if (this.HideSummary)
            //    this.tabSummary.Visible = false;

            if (this.HideAttachments)
            {
                this.tabAttachments.Visible = false;
            }
            else
            {
                this.conAttachments.ShowBookingRelatedFields = ShowAttachmentBookingFields;
            }

            if (this.HideComments)
            {
                this.tabComments.Visible = false;
            }

            BaseStandardPage basePage = (Page as BaseStandardPage);

            if (basePage != null)
            {
                basePage.PopulateLink(this.tabControlFooter);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Occurs during the "PreRender" phase of the ASP.NET lifecycle.
        /// </summary>
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);



            // Set the user dropdown menu
            BasePage basePage = this.Page as BasePage;

            if (basePage != null && basePage.CurrentSession != null && basePage.CurrentSession.User != null && basePage.CurrentSession.User.Person != null)
            {
                //this.UserDropdown.InnerText = basePage.CurrentSession.User.Person.FullName;
                this.UserDropDownLink.Text = string.Concat(basePage.CurrentSession.User.Person.FirstName, " ", basePage.CurrentSession.User.Person.Surname);
            }
            this.loggedUser.Value = basePage.CurrentSession.User.Username;
            // Set the page header and icon
            BaseStandardPage standardPage = this.Page as BaseStandardPage;

            if (this.PageHeader.Visible = (standardPage != null && !String.IsNullOrEmpty(standardPage.Title)))
            {
                this.PageHeader.Text = standardPage.Title;
            }
            if (this.PageIcon.Visible = (standardPage != null && !String.IsNullOrEmpty(standardPage.Icon)))
            {
                this.PageIcon.Attributes["class"] += " icons8-" + standardPage.Icon;
            }

            // Populate the menus
            this.MainMenuRepeater.DataSource = this.MainMenu;
            this.MainMenuRepeater.DataBind();
            this.SideMenuRepeater.DataSource = this.SideMenu;
            this.SideMenuRepeater.DataBind();
            this.QuickLinkRepeater.DataSource = this.QuickLink;
            this.QuickLinkRepeater.DataBind();
            this.UserHistoryRepeater.DataSource = this.UserHistory;
            this.UserHistoryRepeater.DataBind();
            this.PageMenuRepeater.DataSource = this.PageMenu;
            this.PageMenuRepeater.DataBind();


            // Toggle the option header visibility
            if (this.SideMenuRepeater.Items.Count == 0)
            {
                this.OptionHeader.Visible = false;
            }
        }