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); }
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); }
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; } } }