示例#1
0
    public void JudeUserType(string tId)
    {
        int count = new AuthorityBLL().TwoUser(tId);

        if (count > 1)
        {
            Panel1.Visible = true;
            Panel2.Visible = false;
        }
        else if (count == 1)
        {
            int role = new TeacherBLL().GetTeacherRole(tId);
            Response.Cookies["UserType"].Value = role.ToString();;  //设置为管理员或管理员监考老师
            Response.Redirect(url);
        }
        else
        {
            //Response.Cookies["UserType"].Value = "ExamTeacher"; //设置为监考老师
            //Response.Redirect(url);
            Response.Write("<script>alert('暂无可用功能!')</script>");
        }
    }