private IActionResult CreateView(string viewName, IEnumerable <MenuItem> menu, string controller, string method, MsgVue msg = null) { ViewData["Controller"] = controller; ViewData["Method"] = method; ViewData["Roles"] = RoleM.GetRoles().Where(i => RoleM.ValidationAllowed(i.Id)); if (msg != null) { ViewData["ERROR"] = msg; } return(GetView(viewName, menu)); }
public override bool IsValid(object value) => RM.ValidationAllowed((int)value);