Esempio n. 1
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);
        }
Esempio n. 2
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);
        }
Esempio n. 3
0
        protected void List_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e == null)
            {
                return;
            }

            if ((e.Row != null) && (e.Row.DataItem != null))
            {
                if (RoleProvider.IsBuiltIn((Guid)DataBinder.Eval(e.Row.DataItem, "RoleId")))
                {
                    e.Row.Attributes["enableSelect"] = bool.FalseString;
                }
                else
                {
                    e.Row.ToolTip = Resources.RolesControl_List_Row_ToolTip;
                }
            }
        }