Пример #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
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ColorScheme selectedScheme = ColorScheme.White;
            if (Request.QueryString["ColorScheme"] != null)
            {
                selectedScheme = (ColorScheme)Enum.Parse(typeof(ColorScheme), Request.QueryString["ColorScheme"]);
            }

            foreach (ColorScheme scheme in Enum.GetValues(typeof(ColorScheme)))
            {
                ListItem item = new ListItem(scheme.ToString(), scheme.ToString());
                DropDownList1.Items.Add(item);
                if (scheme == selectedScheme)
                {
                    item.Selected = true;
                }
            }

            MagicForm1.ColorScheme = selectedScheme;
            MagicForm.ApplyStyle(Table1, MagicForm1.ColorScheme);
            MagicForm.ApplyStyle(Table2, MagicForm1.ColorScheme, false, false);

            if (Micajah.Common.Configuration.FrameworkConfiguration.Current.WebApplication.MasterPage.Theme == Micajah.Common.Pages.MasterPageTheme.Modern)
            {
                SelectHolder.Visible = false;
            }
        }
    }
Пример #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.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)));
            }
        }
Пример #5
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);
            }
        }
Пример #6
0
        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)));
            }
        }
 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));
 }
Пример #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Micajah.Common.Pages.MasterPage.InitializeSetupPage(this.Page);

            if (!IsPostBack)
            {
                LoadResources();
                Tree_DataBind();
            }

            MagicForm.ApplyStyle(CommandTable, EditForm.ColorScheme);
        }
Пример #9
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);
        }
Пример #10
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;
            }
        }
Пример #11
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            this.InitializeParameters();

            if (!this.IsPostBack)
            {
                Micajah.Common.Pages.MasterPage.SetPageTitle(this.Page, ActionProvider.GlobalNavigationLinks.FindByActionId(ActionProvider.LoginGlobalNavigationLinkActionId));

                if (string.Compare(Request.QueryString["ac"], "1", StringComparison.OrdinalIgnoreCase) == 0)
                {
                    ShowErrorMessage(Resources.LogOnControl_YouAreLoggedFromAnotherComputer);
                }

                m_MainContainerHeight = 220;

                this.CheckSignupUser();
                this.LoadResources();
                this.LoadLogos();

                if (!string.IsNullOrEmpty(this.LoginName))
                {
                    LoginTextBox.Text = this.LoginName;
                }
            }

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

                MagicForm.ApplyStyle(FormTable);
            }
            else
            {
                this.Page.Header.Controls.Add(Support.CreateStyleSheetLink(ResourceProvider.GetResourceUrl(ResourceProvider.LogOnStyleSheet, true)));
            }

            if (LoginTextBox.Text.Length > 0)
            {
                PasswordTextBox.Focus();
            }
            else
            {
                LoginTextBox.Focus();
            }
        }
Пример #12
0
        protected void Page_PreRender(object sender, EventArgs e)
        {
            if (LdapGroupMappingsTable.Visible)
            {
                MagicForm.ApplyStyle(LdapGroupMappingsTable);
            }

            if (FrameworkConfiguration.Current.WebApplication.MasterPage.Theme == Pages.MasterPageTheme.Modern)
            {
                ButtonHeaderCell.Visible = true;
                ButtonCell.ColumnSpan    = 0;
            }
            else
            {
                ButtonHeaderCell.Visible = false;
                ButtonCell.ColumnSpan    = 2;
            }
        }
Пример #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Micajah.Common.Pages.MasterPage.InitializeSetupPage(this.Page);

            if (!IsPostBack)
            {
                bool editMode = (this.RoleId != Guid.Empty);
                if (RoleProvider.IsBuiltIn(this.RoleId) || (editMode && (RoleProvider.GetRoleRow(RoleId) == null)))
                {
                    this.RedirectToRolePage();
                }

                LoadResources();
                ActionsTree_DataBind();
            }

            MagicForm.ApplyStyle(CommandTable, EditForm.ColorScheme);
        }
Пример #14
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, false);

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

            this.LoadResources();

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

                MagicForm.ApplyStyle(FormTable);
            }
            else
            {
                this.Page.Header.Controls.Add(Support.CreateStyleSheetLink(ResourceProvider.GetResourceUrl(ResourceProvider.LogOnStyleSheet, true)));
            }
        }
Пример #15
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;
            }
        }
Пример #16
0
        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            if (this.IsEmpty)
            {
                return;
            }

            this.CreateFormTable();

            int             columnIndex       = 0;
            int             columnsCount      = this.RepeatColumns - 1;
            int             rowIndex          = 0;
            bool            showRequiredTable = false;
            TableRow        row   = null;
            MasterPageTheme theme = this.Theme;

            foreach (EntityField field in m_Entity.CustomFields)
            {
                if (row == null)
                {
                    row = new TableRow();
                }
                TableCell cell = new TableCell();
                Label     lbl  = new Label();
                lbl.Text = field.Name;
                if (columnIndex > 0)
                {
                    cell.CssClass = "Mf_HcPl";
                }
                cell.Controls.Add(lbl);
                row.Cells.Add(cell);

                CustomField customField = new CustomField();
                customField.Theme           = theme;
                customField.Entity          = this.Entity;
                customField.EntityField     = field;
                customField.OrganizationId  = this.OrganizationId;
                customField.InstanceId      = this.InstanceId;
                customField.LocalEntityId   = this.LocalEntityId;
                customField.ValidationGroup = this.ValidationGroup;
                customField.ID = "CustomField" + rowIndex.ToString(CultureInfo.InvariantCulture);
                this.CustomFields.Add(customField);
                cell = new TableCell();
                cell.Controls.Add(customField);
                row.Cells.Add(cell);

                if (columnIndex == columnsCount)
                {
                    m_FormTable.Rows.Add(row);
                    columnIndex = 0;
                    row         = null;
                }
                else
                {
                    columnIndex++;
                }

                rowIndex++;
                if (!field.AllowDBNull)
                {
                    showRequiredTable = true;
                }
            }

            if (!this.IsInMagicForm)
            {
                m_FormTable.Rows.Add(this.GetFooterRow(showRequiredTable));
            }

            MagicForm.ApplyStyle(m_FormTable, this.ColorScheme, this.IsInMagicForm, false);
        }