예제 #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
        protected static string GetUrl(object roleId, object actionId)
        {
            string str = null;

            if (RoleProvider.IsBuiltIn((Guid)roleId))
            {
                str = Resources.RolesControl_BuiltInRoleUrl;
            }
            else
            {
                Micajah.Common.Bll.Action action = ActionProvider.PagesAndControls.FindByActionId((Guid)actionId);
                str = ((action == null) ? string.Empty : CustomUrlProvider.CreateApplicationRelativeUrl(action.AbsoluteNavigateUrl));
            }
            return(str);
        }
예제 #3
0
        protected virtual void AddBreadcrumbs()
        {
            if (this.MasterPage != null)
            {
                Micajah.Common.Bll.Action item = new Micajah.Common.Bll.Action();
                item.ActionId     = Guid.NewGuid();
                item.Name         = EditForm.Caption;
                item.ParentAction = this.MasterPage.ActiveAction;
                UserContext.Breadcrumbs.Add(item);

                if (this.EnablePartialRendering)
                {
                    this.MasterPage.UpdateBreadcrumbs();
                }
            }
        }
예제 #4
0
        protected void LdapGroupMappingsLink_Init(object sender, EventArgs e)
        {
            HyperLink lnk = sender as HyperLink;

            if (lnk != null)
            {
                Micajah.Common.Bll.Action action = ActionProvider.FindAction(ActionProvider.LdapGroupMappingsPageActionId);
                if (action != null)
                {
                    if (action.AccessDenied())
                    {
                        lnk.Visible = false;
                    }
                    else
                    {
                        lnk.Text        = action.Name;
                        lnk.NavigateUrl = action.AbsoluteNavigateUrl;
                    }
                }
            }
        }
예제 #5
0
 protected void RedirectToActionOrStartPage(Guid actionId)
 {
     Micajah.Common.Bll.Action action = ActionProvider.PagesAndControls.FindByActionId(actionId);
     Response.Redirect((action != null) ? action.CustomAbsoluteNavigateUrl : UserContext.Current.StartPageUrl);
 }