Пример #1
0
    //Convert.ToInt32(Session["RoleID"])
    private bool roleview(int role_id, int nav_id, string action_type)
    {
        ax_manager_role bll    = new ax_manager_role();
        bool            result = bll.Exists(role_id, nav_id, action_type);

        return(result);
    }
Пример #2
0
    /// <summary>
    /// 检查管理权限
    /// </summary>
    /// <param name="nav_id">菜单id</param>
    /// <param name="action_type">操作类型</param>
    public bool ChkAdminLevel(System.Web.UI.Page page, int nav_id, string action_type)
    {
        ax_manager_role bll    = new ax_manager_role();
        bool            result = bll.Exists(Convert.ToInt32(Session["RoleID"]), nav_id, action_type);

        if (!result)
        {
            if (action_type == "View")
            {
                JscriptMsg(page, "对不起!您没有查看该栏目的权限!", "../error.html", "Error");
                return(false);
            }
            else
            {
                JscriptMsg(page, "对不起!您没有操作该功能的权限!", "", "Error");
                return(false);
            }
        }
        return(true);
    }