Exemplo n.º 1
0
        public ActionResult GetMenuHtml()
        {
            // TODO:Fix RollEnum
            var model    = SessionLoginInfo.GetInstance(Session);
            var RollEnum = model.SystemRoll;// (SystemRoll)Session[LoginSessionKeys.RollEnum];

            return(Content(SystemMenuListModel.GetInstance().GetHtml(RollEnum, Url)));
        }
Exemplo n.º 2
0
        public ActionResult GetMenuHTML()
        {
            var at = "OrganizationAdmin";

            if (User.Identity.IsAuthenticated)
            {
                var roles = UserManager.GetRoles(User.Identity.GetUserId());
                if (roles.Count > 0)
                {
                    at = roles[0];
                }
            }
            var menus    = RoleManager.GetMenusByRoleName(at);
            var menuHtml = SystemMenuListModel.GetInstance().GetHtml(menus, Url);

            return(Content(menuHtml));
        }
Exemplo n.º 3
0
        public ActionResult GetBootStrapMenuHTML()
        {
            var at = this.WorkContext.GlobalConfig.DefaultRole;

            if (User.Identity.IsAuthenticated)
            {
                var user  = UserManager.FindById(User.Identity.GetUserId());
                var roles = UserManager.GetRoles(User.Identity.GetUserId());
                if (roles.Count > 0)
                {
                    at = roles[0];
                }
            }
            var menus    = RoleManager.GetMenusByRoleName(at);
            var menuHtml = SystemMenuListModel.GetInstance().GetBootStrapHtml(menus, Url);

            return(Content(menuHtml));
        }