// 对当前要进行的操作进行检验
    public bool opCheck(string right, HttpSessionState session, HttpResponse response)
    {
        RightResCode code = hasRight(right, session);

        if (code == RightResCode.right_success)
        {
            return(true);
        }
        if (code == RightResCode.right_not_login)
        {
            response.Redirect("~/Account/Login.aspx");
        }
        if (code == RightResCode.right_no_right)
        {
            response.Redirect("~/appaspx/Error.aspx?right=" + right);
        }
        return(false);
    }
示例#2
0
    // 对当前要进行的操作进行检验
    public bool opCheck(string right, HttpSessionState session, HttpResponse response)
    {
        RightResCode code = hasRight(right, session);

        if (code == RightResCode.right_success)
        {
            return(true);
        }
        if (code == RightResCode.right_not_login)
        {
            response.Redirect(DefCC.ASPX_LOGIN_STEP1);
        }
        if (code == RightResCode.right_no_right)
        {
            response.Redirect(DefCC.ASPX_EMPTY);
        }
        if (code == RightResCode.right_need_switch)
        {
            response.Redirect("~/appaspx/Error.aspx?right=" + "@@");
        }
        return(false);
    }
示例#3
0
    // 对当前要进行的操作进行检验
    public bool opCheck(string right, HttpSessionState session, HttpResponse response)
    {
        RightResCode code = hasRight(right, session);

        if (code == RightResCode.right_success)
        {
            return(true);
        }
        if (code == RightResCode.right_not_login)
        {
            response.Write("<script>location.href='/Account/Login.aspx';</script>");
            response.End();
            //  response.Redirect("~/Account/Login.aspx");
        }
        if (code == RightResCode.right_no_right)
        {
            response.Redirect("~/appaspx/Error.aspx?right=" + right);
        }
        if (code == RightResCode.right_need_switch)
        {
            response.Redirect("~/appaspx/Error.aspx?right=" + "@@");
        }
        return(false);
    }