コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            m_IsModernTheme = (FrameworkConfiguration.Current.WebApplication.MasterPage.Theme == Pages.MasterPageTheme.Modern);

            MagicForm.ApplyStyle(FormTable);

            if (!IsPostBack)
            {
                this.LoadResources();

                UserContext user = UserContext.Current;
                if (user != null)
                {
                    StyleSheetText.Text = HttpUtility.HtmlDecode(SettingProvider.GetCustomStyleSheet(user.OrganizationId));
                }

                Micajah.Common.Bll.Action action = ActionProvider.PagesAndControls.FindByActionId(ActionProvider.ConfigurationPageActionId);
                if (action != null)
                {
                    CancelLink.NavigateUrl = action.CustomAbsoluteNavigateUrl;
                }
            }

            if (m_IsModernTheme)
            {
                CancelLink.Visible = false;
            }
            else
            {
                AutoGeneratedButtonsField.InsertButtonSeparator(ButtonsSeparator);
            }
        }
コード例 #2
0
        /// <summary>
        /// Occurs when the page is being loaded.
        /// </summary>
        /// <param name="sender">The sourceRow of the event.</param>
        /// <param name="e">An EventArgs that contains no event data.</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            Micajah.Common.Pages.MasterPage.CreatePageHeader(this.Page, false, true);

            AutoGeneratedButtonsField.InsertButtonSeparator(ButtonsSeparator);

            if (!this.IsPostBack)
            {
                Micajah.Common.Pages.MasterPage.SetPageTitle(this.Page, ActionProvider.FindAction(CustomUrlProvider.CreateApplicationAbsoluteUrl(Request.Url.PathAndQuery)));

                this.LoadResources();
                this.ValidateResetPasswordRequest();
            }

            if (FrameworkConfiguration.Current.WebApplication.MasterPage.Theme == Pages.MasterPageTheme.Modern)
            {
                this.Page.Header.Controls.Add(Support.CreateStyleSheetLink(ResourceProvider.GetResourceUrl(ResourceProvider.LogOnModernStyleSheet, true)));

                MagicForm.ApplyStyle(FormTable);

                PasswordCompareValidator.Attributes["controltovalidate2"] = ConfirmPasswordTextBox.ClientID;

                MainContainer.Style[HtmlTextWriterStyle.Height]    = "320px";
                MainContainer.Style[HtmlTextWriterStyle.MarginTop] = "-160px";
            }
            else
            {
                this.Page.Header.Controls.Add(Support.CreateStyleSheetLink(ResourceProvider.GetResourceUrl(ResourceProvider.LogOnStyleSheet, true)));
            }
        }
コード例 #3
0
        /// <summary>
        /// Occurs when the page is being loaded.
        /// </summary>
        /// <param name="sender">The sourceRow of the event.</param>
        /// <param name="e">An EventArgs that contains no event data.</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            Micajah.Common.Pages.MasterPage.CreatePageHeader(this.Page, false, true);

            AutoGeneratedButtonsField.InsertButtonSeparator(ButtonsSeparator);

            if (!IsPostBack)
            {
                Micajah.Common.Pages.MasterPage.SetPageTitle(this.Page, ActionProvider.FindAction(CustomUrlProvider.CreateApplicationAbsoluteUrl(Request.Url.PathAndQuery)));

                LoadResources();

                string loginName = Request.QueryString["l"];
                if (!string.IsNullOrEmpty(loginName))
                {
                    LoginTextBox.Text = loginName;
                }

                LoginTextBox.Focus();

                ResultTable.Visible = false;
            }

            if (FrameworkConfiguration.Current.WebApplication.MasterPage.Theme == Pages.MasterPageTheme.Modern)
            {
                this.Page.Header.Controls.Add(Support.CreateStyleSheetLink(ResourceProvider.GetResourceUrl(ResourceProvider.LogOnModernStyleSheet, true)));

                MagicForm.ApplyStyle(FormTable);
                MagicForm.ApplyStyle(ResultTable);
            }
            else
            {
                this.Page.Header.Controls.Add(Support.CreateStyleSheetLink(ResourceProvider.GetResourceUrl(ResourceProvider.LogOnStyleSheet, true)));
            }
        }
コード例 #4
0
        /// <summary>
        /// Occurs when the page is being loaded.
        /// </summary>
        /// <param name="sender">The sourceRow of the event.</param>
        /// <param name="e">An EventArgs that contains no event data.</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            Micajah.Common.Pages.MasterPage.InitializeSetupPage(this.Page);
            this.MasterPage.VisibleBreadcrumbs = false;

            m_UserContext = UserContext.Current;

            this.LoadResources();
            this.ParseParams();

            MagicForm.ApplyStyle(SearchTable);
            AutoGeneratedButtonsField.InsertButtonSeparator(ButtonsSeparator);
            Control container = MagicForm.AddRequiredTable(FooterCell);

            container.Controls.Add(ButtonsHolder);

            if (this.IsPostBack)
            {
                BaseControl.LoadResources(List, this.GetType().BaseType.Name);
            }
            else
            {
                InstanceListRow.Visible = FrameworkConfiguration.Current.WebApplication.EnableMultipleInstances;
                InstanceList.Required   = (m_RoleId != RoleProvider.OrganizationAdministratorRoleId);
            }
        }
コード例 #5
0
ファイル: SignupUserControl.cs プロジェクト: jy4618272/Common
        protected void Page_Load(object sender, EventArgs e)
        {
            Micajah.Common.Pages.MasterPage.CreatePageHeader(this.Page, false, true);

            AutoGeneratedButtonsField.InsertButtonSeparator(ButtonsSeparator0);
            AutoGeneratedButtonsField.InsertButtonSeparator(ButtonsSeparator1);
            AutoGeneratedButtonsField.InsertButtonSeparator(ButtonsSeparator2);

            Micajah.Common.Pages.MasterPage.SetPageTitle(this.Page, Resources.SignupUserControl_TitleLabel_Text);

            if (!IsPostBack)
            {
                string url = LoginProvider.Current.GetLoginUrl(false);
                if (this.InvitedLoginId == Guid.Empty)
                {
                    if (!string.IsNullOrEmpty(Request.Url.Query))
                    {
                        url += Request.Url.Query;
                    }
                }
                LogOnPageLink2.NavigateUrl = LogOnPageLink1.NavigateUrl = url;

                this.EnsureOrganization();

                this.LoadResources();

                if (this.LoginName != null)
                {
                    int errorCode = ValidateLoginName(this.LoginName);
                    if (errorCode > 0)
                    {
                        LoginTextBox.Text     = this.LoginName;
                        LoginTextBox.ReadOnly = true;
                        SubmitButton1.Enabled = false;
                    }
                    Step1ButtonHolder.Visible = false;
                }
            }
            else
            {
                this.EnsureOrganization();
            }


            if (FrameworkConfiguration.Current.WebApplication.MasterPage.Theme == Pages.MasterPageTheme.Modern)
            {
                this.Page.Header.Controls.Add(Support.CreateStyleSheetLink(ResourceProvider.GetResourceUrl(ResourceProvider.LogOnModernStyleSheet, true)));

                MagicForm.ApplyStyle(Step1Table);
                MagicForm.ApplyStyle(Step2Table);

                PasswordCompareValidator.Attributes["controltovalidate2"] = ConfirmPasswordTextBox.ClientID;
            }
            else
            {
                this.Page.Header.Controls.Add(Support.CreateStyleSheetLink(ResourceProvider.GetResourceUrl(ResourceProvider.LogOnStyleSheet, true)));
            }
        }
コード例 #6
0
 protected void Page_PreRender(object sender, EventArgs e)
 {
     if (ActionsTable.Visible)
     {
         MagicForm.ApplyStyle(ActionsTable);
     }
     AutoGeneratedButtonsField.InsertButtonSeparator(ButtonsSeparator);
     List.ShowAddLink = ((List.Rows.Count == 0) || (FrameworkConfiguration.Current.WebApplication.EnableMultipleInstances));
 }
コード例 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Tree.EntityNodeId = UserId;
                Tree.LoadTree();
            }

            SaveButton.Text   = string.Concat(Resources.AutoGeneratedButtonsField_SaveButton_Text, Resources.AutoGeneratedButtonsField_CloseButtonSeparator, Resources.AutoGeneratedButtonsField_CloseButton_Text);
            CancelButton.Text = Resources.AutoGeneratedButtonsField_CancelButton_Text;
            AutoGeneratedButtonsField.InsertButtonSeparator(ButtonsSeparator);

            MagicForm.ApplyStyle(MagicFormTable);
        }
コード例 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MagicForm.ApplyStyle(FormTable, ColorScheme.White, false, true);
            AutoGeneratedButtonsField.InsertButtonSeparator(ButtonsSeparator);

            if (!this.IsPostBack)
            {
                this.LoadResources();
                CancelLink.NavigateUrl      = CustomUrlProvider.CreateApplicationAbsoluteUrl(ResourceProvider.UsersPageVirtualPath);
                EmailValidator.ErrorMessage = Resources.TextBox_RegularExpressionValidator_ErrorMessage;

                EmailValidator.Attributes["controltovalidate2"] = EmailTextBox.ClientID;
            }
        }
コード例 #9
0
        protected void Page_PreRender(object sender, EventArgs e)
        {
            MagicForm.ApplyStyle(FormTable);

            if (FrameworkConfiguration.Current.WebApplication.MasterPage.Theme == Pages.MasterPageTheme.Modern)
            {
                CancelLink.Visible = false;
            }
            else
            {
                HtmlTable table = MagicForm.RequiredTable;
                if (table != null)
                {
                    RequiredCell.Controls.Add(table);
                }
                else
                {
                    RequiredCell.Visible = false;
                }
                AutoGeneratedButtonsField.InsertButtonSeparator(ButtonsSeparator);
            }

            if (InstanceListRow.Visible)
            {
                InstanceListRow.Visible = FrameworkConfiguration.Current.WebApplication.EnableMultipleInstances;
            }

            if (FrameworkConfiguration.Current.WebApplication.MasterPage.Theme == Pages.MasterPageTheme.Modern)
            {
                ButtonHeaderCell.Visible = true;
                ButtonCell.ColumnSpan    = 0;
            }
            else
            {
                ButtonHeaderCell.Visible = false;
                ButtonCell.ColumnSpan    = 2;
            }
        }
コード例 #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            m_IsModernTheme = (FrameworkConfiguration.Current.WebApplication.MasterPage.Theme == Pages.MasterPageTheme.Modern);
            m_UserContext   = UserContext.Current;

            this.LoadResources();

            if (!this.IsPostBack)
            {
                this.EnsureActiveInstance();
            }

            this.List_DataBind();

            if (!string.IsNullOrEmpty(this.ReturnUrl))
            {
                CancelLink.NavigateUrl = this.ReturnUrl;
            }

            DetailMenu1.ShowDescriptionAsToolTip = true;

            if (this.DisplayedSettingLevel != SettingLevels.Group)
            {
                if (this.MasterPage != null)
                {
                    if (this.ActionId != Guid.Empty)
                    {
                        this.MasterPage.CustomName = this.Action.CustomName;
                    }

                    Micajah.Common.Bll.Action action = this.MasterPage.ActiveAction;
                    while ((action != null) && (action.ActionId != ActionProvider.ConfigurationPageActionId))
                    {
                        action = action.ParentAction;
                        if (action != null)
                        {
                            if (!action.GroupInDetailMenu)
                            {
                                break;
                            }
                        }
                    }

                    if (string.IsNullOrEmpty(this.ReturnUrl))
                    {
                        if (action != null)
                        {
                            CancelLink.NavigateUrl = action.CustomAbsoluteNavigateUrl;
                        }
                    }
                }

                if (this.Action == null)
                {
                    DetailMenu1.Visible = false;
                }
                else
                {
                    DetailMenu1.ParentActionId = m_Action.ActionId;
                }
            }
            else
            {
                if (string.IsNullOrEmpty(this.ReturnUrl))
                {
                    CancelLink.NavigateUrl = string.Concat(CustomUrlProvider.CreateApplicationAbsoluteUrl(ResourceProvider.GroupsInstancesRolesPageVirtualPath), "?GroupId=", GroupId.ToString("N"));
                }

                DetailMenu1.Visible = false;

                if (this.DiagnoseConflictingSettings)
                {
                    CommandBar.Visible = false;
                }
            }

            if (m_IsModernTheme)
            {
                CancelLink.Visible = false;
            }
            else
            {
                AutoGeneratedButtonsField.InsertButtonSeparator(ButtonsSeparator);
            }
        }